mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-29 10:32:10 +08:00
fix alert sounds looping
old-commit-hash: 78b428e53441da339f8d13b78bfcf1f5ca192d6f
This commit is contained in:
@@ -62,14 +62,6 @@ bool Sound::init(int volume) {
|
||||
}
|
||||
|
||||
AudibleAlert Sound::currentPlaying() {
|
||||
if (currentSound_ != AudibleAlert::NONE) {
|
||||
auto playItf = player_.at(currentSound_)->playItf;
|
||||
SLuint32 state;
|
||||
if (SL_RESULT_SUCCESS == (*playItf)->GetPlayState(playItf, &state) &&
|
||||
(state == SL_PLAYSTATE_STOPPED || state == SL_PLAYSTATE_PAUSED)) {
|
||||
currentSound_ = AudibleAlert::NONE;
|
||||
}
|
||||
}
|
||||
return currentSound_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user