mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-07-16 04:35:17 +02:00
spray two leftover audio bugs
+ BGM doesn't fading back in after playing an ME + `Audio#bgm_play` should stop() every track EXCEPT the first one when called with no track argument
This commit is contained in:
parent
34ef0c34a5
commit
b5e49b7f19
1 changed files with 8 additions and 4 deletions
|
@ -213,10 +213,10 @@ struct AudioPrivate
|
|||
|
||||
if (!track->noResumeStop)
|
||||
track->stream.play();
|
||||
|
||||
meWatch.state = MeNotPlaying;
|
||||
}
|
||||
|
||||
meWatch.state = MeNotPlaying;
|
||||
|
||||
track->unlockStream();
|
||||
}
|
||||
}
|
||||
|
@ -296,8 +296,12 @@ void Audio::bgmPlay(const char *filename,
|
|||
int track)
|
||||
{
|
||||
if (track == -127) {
|
||||
for (auto track : p->bgmTracks)
|
||||
track->stop();
|
||||
for (int i = 0; i < (int)p->bgmTracks.size(); i++) {
|
||||
if (i == 0) {
|
||||
continue;
|
||||
}
|
||||
p->bgmTracks[i]->stop();
|
||||
}
|
||||
|
||||
track = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue