- stop sounds when removing a sound group
This commit is contained in:
committed by
ThorstenB
parent
e0df014acf
commit
5b3dccc1f7
@@ -66,17 +66,7 @@ SGSampleGroup::~SGSampleGroup ()
|
|||||||
{
|
{
|
||||||
_active = false;
|
_active = false;
|
||||||
|
|
||||||
sample_map_iterator sample_current = _samples.begin();
|
this->stop();
|
||||||
sample_map_iterator sample_end = _samples.end();
|
|
||||||
for ( ; sample_current != sample_end; ++sample_current ) {
|
|
||||||
SGSoundSample *sample = sample_current->second;
|
|
||||||
|
|
||||||
if ( sample->is_valid_source() && sample->is_playing() ) {
|
|
||||||
sample->no_valid_source();
|
|
||||||
_smgr->release_source( sample->get_source() );
|
|
||||||
_smgr->release_buffer( sample );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_smgr = 0;
|
_smgr = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user