1 #ifndef __STREAM_SOUND_SOURCE_H__
2 #define __STREAM_SOUND_SOURCE_H__
6 #include "sound_source.hpp"
10 class StreamSoundSource : public SoundSource
14 virtual ~StreamSoundSource();
16 void set_sound_file(SoundFile* file);
18 enum FadeState { NoFading, FadingOn, FadingOff };
20 void set_fading(FadeState state, float fadetime);
21 FadeState get_fade_state() const
28 static const size_t STREAMBUFFERSIZE = 1024 * 500;
29 static const size_t STREAMFRAGMENTS = 5;
30 static const size_t STREAMFRAGMENTSIZE
31 = STREAMBUFFERSIZE / STREAMFRAGMENTS;
33 void fillBufferAndQueue(ALuint buffer);
35 ALuint buffers[STREAMFRAGMENTS];
38 Uint32 fade_start_ticks;