# custom codec sample code

**URL:** <https://qa.fmod.com/t/custom-codec-sample-code/11367>\
**Category:** FMOD Studio\
**Created:** [March 31, 2014, 6:48pm UTC](https://qa.fmod.com/t/custom-codec-sample-code/11367 "2014-03-31T18:48:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![c0diq](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@c0diq](https://qa.fmod.com/u/c0diq)\
**Post date:** [March 31, 2014, 6:48pm UTC](https://qa.fmod.com/t/custom-codec-sample-code/11367/1 "2014-03-31T18:48:35Z")

</div>

Where is it in 1.03.03 or on your site?

-s

---

<div class="post-metadata">

**Author:** ![c0diq](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@c0diq](https://qa.fmod.com/u/c0diq)\
**Post date:** [April 1, 2014, 6:35am UTC](https://qa.fmod.com/t/custom-codec-sample-code/11367/2 "2014-04-01T06:35:01Z")

</div>

Indeed I had 1.03.01 which did not have it.  
However this custom codec is pretty raw. Maybe you’d want to add a note what open should return in case it can’t understand the format.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [April 1, 2014, 7:07am UTC](https://qa.fmod.com/t/custom-codec-sample-code/11367/3 "2014-04-01T07:07:48Z")

</div>

yep i added a seek(0) in with a comment, and another comment below that saying that if you need to check for a format and read metadata, do it here in the read callback using the read and seek function pointers.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [April 1, 2014, 5:31am UTC](https://qa.fmod.com/t/custom-codec-sample-code/11367/4 "2014-04-01T05:31:56Z")

</div>

You must be missing something - i just downloaded 1.03.03 for mac and windows and fmod\_codec\_raw.cpp is there. Are you still using an older installer?

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [April 1, 2014, 3:33am UTC](https://qa.fmod.com/t/custom-codec-sample-code/11367/5 "2014-04-01T03:33:17Z")

</div>

Hi,  
Have a look in the examples, it is in /api/lowlevel/examples/plugins

---

<div class="post-metadata">

**Author:** ![c0diq](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@c0diq](https://qa.fmod.com/u/c0diq)\
**Post date:** [April 1, 2014, 4:15am UTC](https://qa.fmod.com/t/custom-codec-sample-code/11367/6 "2014-04-01T04:15:56Z")

</div>

All there is in there is fmod\_distance\_filter and fmod\_gain both of which are dsp filters and not codecs.  
Am I missing something?
