1 #ifndef __STREAM_SOUND_SOURCE_H__
2 #define __STREAM_SOUND_SOURCE_H__
5 #include "sound_source.h"
9 class StreamSoundSource : public SoundSource
12 StreamSoundSource(SoundFile* file);
13 virtual ~StreamSoundSource();
18 static const size_t STREAMBUFFERSIZE = 1024 * 500;
19 static const size_t STREAMFRAGMENTS = 5;
20 static const size_t STREAMFRAGMENTSIZE
21 = STREAMBUFFERSIZE / STREAMFRAGMENTS;
23 void fillBufferAndQueue(ALuint buffer);
25 ALuint buffers[STREAMFRAGMENTS];
28 enum FadeState { NoFading, FadingOn, FadingOff };