# Mixing and streaming compressed audio

**URL:** <https://discourse.libsdl.org/t/mixing-and-streaming-compressed-audio/7810>\
**Category:** SDL Development\
**Created:** [November 25, 2002, 2:12am UTC](https://discourse.libsdl.org/t/mixing-and-streaming-compressed-audio/7810 "2002-11-25T02:12:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Eder](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/t/d78d45/32.png) [@Thomas\_Eder](https://discourse.libsdl.org/u/Thomas_Eder)\
**Post date:** [November 25, 2002, 2:12am UTC](https://discourse.libsdl.org/t/mixing-and-streaming-compressed-audio/7810/1 "2002-11-25T02:12:01Z")

</div>

Hello!

I am developing an application with many sound files (hours), so I cant  
load all them into memory, and there may even be a problem with  
CD-space (using WAVs).

So it seems that the best solution would be to use compression (e.g.  
ogg vorbis) and stream the sounds from CD (or maybe HD).  
In addition it is necessary to play multiple sounds at the same time (mixing  
channels).

I have tried up to now

SDL\_Sound: provides streaming and compression (e.g. ogg), but no mixing  
SDL\_mixer: provides mixing, but no streaming and compression only for one  
(music) channel

Right?  
So do I have to write my own version/combination of SDL\_Sound+SDL\_mixer or  
is there  
any other solution (LGPL preferred) ?

Currently I am using SDL\_mixer and loading the wav-sounds using a separate  
thread, so  
at least the loading doesnt freeze the application, but if possible I would  
like to use  
compression+streaming.

thx,  
Thomas Eder
