Small change to avoid dangling audio resources.
This commit is contained in:
parent
5329ed10a7
commit
311b85a11d
1 changed files with 3 additions and 2 deletions
|
@ -139,8 +139,9 @@ FGFX::update (double dt)
|
||||||
// still playing, do nothing
|
// still playing, do nothing
|
||||||
is_playing = true;
|
is_playing = true;
|
||||||
} else {
|
} else {
|
||||||
// current message finished, remove
|
// current message finished, stop and remove
|
||||||
smgr->remove( msgid );
|
smgr->stop( msgid ); // removes source
|
||||||
|
smgr->remove( msgid ); // removes buffer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !is_playing ) {
|
if ( !is_playing ) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue