mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
Minor bug fixes.
This commit is contained in:
parent
092b33d6d8
commit
10309ce888
@ -213,8 +213,11 @@ void PortAudioOut::Release() {
|
||||
|
||||
void PortAudioOut::Pause() {
|
||||
std::unique_lock<decltype(this->mutex)> lock(this->mutex);
|
||||
this->state = StatePaused;
|
||||
this->bufferEvent.notify_all();
|
||||
if (this->paStream) {
|
||||
logPaError("Pa_AbortStream", Pa_AbortStream(this->paStream));
|
||||
this->state = StatePaused;
|
||||
this->bufferEvent.notify_all();
|
||||
}
|
||||
}
|
||||
|
||||
void PortAudioOut::Resume() {
|
||||
@ -237,6 +240,9 @@ void PortAudioOut::Stop() {
|
||||
decltype(this->buffers) swap;
|
||||
{
|
||||
std::unique_lock<decltype(this->mutex)> lock(this->mutex);
|
||||
if (this->paStream) {
|
||||
logPaError("Pa_AbortStream", Pa_AbortStream(this->paStream));
|
||||
}
|
||||
this->state = StateStopped;
|
||||
this->buffers.swap(swap);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user