Skip to content

Commit

Permalink
portaudio: fix paused state when resuming session
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba160 committed Mar 9, 2019
1 parent a10d603 commit 3429401
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugins/portaudio/portaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,11 @@ static int
portaudio_pause (void) {
trace ("portaudio_pause\n");
if (state == OUTPUT_STATE_STOPPED) {
return -1;
// If option 'Resume previous session on startup' is enabled deadbeef will call:
// portaudio_stop() and portaudio_pause() (no portaudio_play()).
// If it's the case we should just set the state and do the main job later.
state = OUTPUT_STATE_PAUSED;
return 0;
}
PaError err;
err = Pa_AbortStream (stream);
Expand Down Expand Up @@ -625,12 +629,14 @@ static DB_output_t plugin = {
.plugin.api_vmajor = 1,
.plugin.api_vminor = 10,
.plugin.version_major = 1,
.plugin.version_minor = 4,
.plugin.version_minor = 5,
.plugin.type = DB_PLUGIN_OUTPUT,
.plugin.id = "portaudio",
.plugin.name = "PortAudio output plugin",
.plugin.descr = "This plugin plays audio using PortAudio library.\n"
"\n"
"Changes in version 1.5:\n"
" * Fixed issues when resuming previous session.\n"
"Changes in version 1.4:\n"
" * Fix device enumeration when ASCII used.\n"
" * Invalid characters will be discarded.\n"
Expand Down

0 comments on commit 3429401

Please sign in to comment.