Do not attempt to deregister the same emitter more than once
This commit is contained in:
@@ -418,7 +418,7 @@ void SGSoundMgr::release_source( unsigned int source )
|
|||||||
{
|
{
|
||||||
aax::Emitter& emitter = source_it->second;
|
aax::Emitter& emitter = source_it->second;
|
||||||
enum aaxState state = emitter.state();
|
enum aaxState state = emitter.state();
|
||||||
if (state == AAX_PLAYING || state == AAX_SUSPENDED) {
|
if (state != AAX_PROCESSED) {
|
||||||
TRY( emitter.set(AAX_PROCESSED) );
|
TRY( emitter.set(AAX_PROCESSED) );
|
||||||
TRY( d->_aax.remove(emitter) );
|
TRY( d->_aax.remove(emitter) );
|
||||||
}
|
}
|
||||||
@@ -590,7 +590,6 @@ void SGSoundMgr::sample_stop( SGSoundSample *sample )
|
|||||||
#ifdef ENABLE_SOUND
|
#ifdef ENABLE_SOUND
|
||||||
aax::Emitter& emitter = d->get_emitter(source);
|
aax::Emitter& emitter = d->get_emitter(source);
|
||||||
TRY( emitter.set(AAX_PROCESSED) );
|
TRY( emitter.set(AAX_PROCESSED) );
|
||||||
TRY( d->_aax.remove(emitter) );
|
|
||||||
#endif
|
#endif
|
||||||
stopped = is_sample_stopped(sample);
|
stopped = is_sample_stopped(sample);
|
||||||
}
|
}
|
||||||
@@ -610,7 +609,6 @@ void SGSoundMgr::sample_destroy( SGSoundSample *sample )
|
|||||||
if ( sample->is_playing() ) {
|
if ( sample->is_playing() ) {
|
||||||
aax::Emitter& emitter = d->get_emitter(source);
|
aax::Emitter& emitter = d->get_emitter(source);
|
||||||
TRY( emitter.set(AAX_PROCESSED) );
|
TRY( emitter.set(AAX_PROCESSED) );
|
||||||
TRY( d->_aax.remove(emitter) );
|
|
||||||
}
|
}
|
||||||
release_source( source );
|
release_source( source );
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user