mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #41 from Xele02/master
[Qt-desktop] Correct audio crash on exit
This commit is contained in:
commit
a18fbd0bcc
1 changed files with 3 additions and 2 deletions
|
@ -161,11 +161,11 @@ public:
|
||||||
output = new QAudioOutput(fmt);
|
output = new QAudioOutput(fmt);
|
||||||
output->setBufferSize(mixlen);
|
output->setBufferSize(mixlen);
|
||||||
feed = output->start();
|
feed = output->start();
|
||||||
startTimer(1000*AUDIO_SAMPLES / AUDIO_FREQ);
|
timer = startTimer(1000*AUDIO_SAMPLES / AUDIO_FREQ);
|
||||||
}
|
}
|
||||||
~MainAudio() {
|
~MainAudio() {
|
||||||
|
killTimer(timer);
|
||||||
feed->close();
|
feed->close();
|
||||||
delete feed;
|
|
||||||
output->stop();
|
output->stop();
|
||||||
delete output;
|
delete output;
|
||||||
free(mixbuf);
|
free(mixbuf);
|
||||||
|
@ -182,6 +182,7 @@ private:
|
||||||
QAudioOutput* output;
|
QAudioOutput* output;
|
||||||
int mixlen;
|
int mixlen;
|
||||||
char* mixbuf;
|
char* mixbuf;
|
||||||
|
int timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue