Commit Diff
Diff:
463ce8791b0da705a2cfd040324fc8dd3c2fd9b9
f523773656c7fb53c7ec2f373fb48da5c2f1d788
Commit:
f523773656c7fb53c7ec2f373fb48da5c2f1d788
Tree:
9db08156a5cf796b9916200381ec73b16fb96852
Author:
Omar Polo <op@omarpolo.com>
Date:
Fri Jun 10 07:57:19 2022 UTC
Message:
don't sio_start if we're not stopped
commit - 463ce8791b0da705a2cfd040324fc8dd3c2fd9b9
commit + f523773656c7fb53c7ec2f373fb48da5c2f1d788
blob - 799f7f0b9bc6053228cbc1b6342d4997b9df18cb
blob + a1a9f1a0edf23a6ff4657c04dc5d1e0993898c96
--- player.c
+++ player.c
@@ -66,8 +66,11 @@ player_setup(int bits, int rate, int channels)
/* don't stop if the parameters are the same */
if (bits == par.bits && channels == par.pchan &&
- par.rate - fpct <= rate && rate <= par.rate + fpct)
- goto end;
+ par.rate - fpct <= rate && rate <= par.rate + fpct) {
+ if (stopped)
+ goto start;
+ return 0;
+ }
again:
if (!stopped) {
@@ -102,7 +105,7 @@ end:
/* TODO: check the sample rate? */
-end:
+start:
if (!sio_start(hdl)) {
log_warn("sio_start");
return -1;
Omar Polo