std::auto_ptr<StreamSoundSource> newmusic (new StreamSoundSource());
alSourcef(newmusic->source, AL_ROLLOFF_FACTOR, 0);
newmusic->set_sound_file(load_sound_file(filename));
+ newmusic->set_looping(true);
if(fade)
newmusic->set_fading(StreamSoundSource::FadingOn, .5f);
newmusic->play();
#include "sound_file.hpp"
StreamSoundSource::StreamSoundSource()
- : file(0), fade_state(NoFading)
+ : file(0), fade_state(NoFading), looping(false)
{
alGenBuffers(STREAMFRAGMENTS, buffers);
SoundManager::check_al_error("Couldn't allocate audio buffers: ");