- delete soundSource;
- soundSource = sound_manager->create_sound_source("sounds/willowisp.wav");
- if(!soundSource) {
- log_warning << "Couldn't start WillOWisp sound" << std::endl;
- return;
- }
- soundSource->set_position(get_pos());
- soundSource->set_looping(true);
- soundSource->set_gain(2.0);
- soundSource->set_reference_distance(32);
- soundSource->play();
+ sound_source.reset(sound_manager->create_sound_source(SOUNDFILE));
+ sound_source->set_position(get_pos());
+ sound_source->set_looping(true);
+ sound_source->set_gain(2.0);
+ sound_source->set_reference_distance(32);
+ sound_source->play();