# Speex decoding in SDL\_mixer

**URL:** <https://discourse.libsdl.org/t/speex-decoding-in-sdl-mixer/10569>\
**Category:** SDL Development\
**Created:** [April 22, 2004, 8:54am UTC](https://discourse.libsdl.org/t/speex-decoding-in-sdl-mixer/10569 "2004-04-22T08:54:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Holth](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/d/ba8739/32.png) [@Daniel\_Holth](https://discourse.libsdl.org/u/Daniel_Holth)\
**Post date:** [April 22, 2004, 8:54am UTC](https://discourse.libsdl.org/t/speex-decoding-in-sdl-mixer/10569/1 "2004-04-22T08:54:06Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

I’ve got a patch here: [http://dingoskidneys.com/fishmixer/](http://dingoskidneys.com/fishmixer/) to add  
ogg/vorbis and ogg/speex decoding (and other formats libfishsound may  
be enhanced to support) to SDL\_mixer.

The conversion from .wav to ogg/vorbis sfx and voice acting turns  
freedroidRPG’s 41 megabytes of audio into only 14; even more space  
will be saved when speex is used for the voice acting.

The alternative to adding this to SDL\_mixer seems to be to decode the  
effects to an in-memory .wav and then load that with SDL\_RWops. It’d  
be nicer to just have SDL\_mixer do it out of the box. How can I help  
make that happen?

Thanks,

Daniel Holth  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.2.4 (GNU/Linux)  
Comment: Using GnuPG with Thunderbird - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iD8DBQFAh+pmVh4W2pVfoMsRAs8OAKC4Vh+/l950Rvz5Nn3it9X2Xx+oxwCgk9hj  
g0+yZxu7S9NjMnu7/HKes2Y=  
=R3Rn  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![Olivier\_Fabre](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/o/59ef9b/32.png) [@Olivier\_Fabre](https://discourse.libsdl.org/u/Olivier_Fabre)\
**Post date:** [April 23, 2004, 2:12am UTC](https://discourse.libsdl.org/t/speex-decoding-in-sdl-mixer/10569/2 "2004-04-23T02:12:08Z")

</div>

> I’ve got a patch here: [http://dingoskidneys.com/fishmixer/](http://dingoskidneys.com/fishmixer/) to add  
> ogg/vorbis and ogg/speex decoding (and other formats libfishsound may  
> be enhanced to support) to SDL\_mixer.

SDL\_mixer already supports ogg vorbis (in the precompiled Windows DLLs  
I’ve got at least).On 22/04/2004, Daniel Holth, you wrote:

–  
Please remove “.ARGL.invalid” from my email when replying.  
Incoming HTML mails are automatically deleted.

---

<div class="post-metadata">

**Author:** ![Daniel\_Holth](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/d/ba8739/32.png) [@Daniel\_Holth](https://discourse.libsdl.org/u/Daniel_Holth)\
**Post date:** [April 23, 2004, 2:48pm UTC](https://discourse.libsdl.org/t/speex-decoding-in-sdl-mixer/10569/3 "2004-04-23T14:48:08Z")

</div>

> SDL\_mixer already supports ogg vorbis (in the precompiled Windows DLLs  
> I’ve got at least).

The patch adds Ogg/Speex support but it also takes over loading Ogg/Vorbis SFX. SDL\_Mixer looks at the first four bytes of a file to decide which loader to delegate to, but whether a file is Ogg/Vorbis, Ogg/Speex or something else isn’t in that four bytes.

Since there doesn’t seem to be much interest in adding this free and patent-free speech codec to SDL\_Mixer, is there an easy way for me to make an SDL\_RWops object that references a region of memory?

- Daniel

---

<div class="post-metadata">

**Author:** ![icculus](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/icculus/32/81_2.png) [@icculus](https://discourse.libsdl.org/u/icculus)\
**Post date:** [April 25, 2004, 12:58am UTC](https://discourse.libsdl.org/t/speex-decoding-in-sdl-mixer/10569/4 "2004-04-25T00:58:44Z")

</div>

> Since there doesn’t seem to be much interest in adding this free and  
> patent-free speech codec to SDL\_Mixer, is there an easy way for me to  
> make an SDL\_RWops object that references a region of memory?

SDL\_RWFromMem().

–ryan.

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [May 16, 2004, 6:53pm UTC](https://discourse.libsdl.org/t/speex-decoding-in-sdl-mixer/10569/5 "2004-05-16T18:53:31Z")

</div>

> I’ve got a patch here: [http://dingoskidneys.com/fishmixer/](http://dingoskidneys.com/fishmixer/) to add  
> ogg/vorbis and ogg/speex decoding (and other formats libfishsound may  
> be enhanced to support) to SDL\_mixer.

I tried to get to this website, but it appears to be down… ?

```
-Sam Lantinga, Software Engineer, Blizzard Entertainment

```
