mirror of https://github.com/ericonr/sndio.git
sndiod: remove handling of unreachable state in slot_stop()
This commit is contained in:
parent
eb847f40b4
commit
414e011cf6
12
sndiod/dev.c
12
sndiod/dev.c
|
@ -1867,11 +1867,13 @@ slot_stop(struct slot *s)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (s->pstate == SLOT_START) {
|
if (s->pstate == SLOT_START) {
|
||||||
if (s->mode & MODE_PLAY) {
|
/*
|
||||||
s->pstate = SLOT_READY;
|
* If in rec-only mode, we're already in the READY or
|
||||||
slot_ready(s);
|
* RUN states. We're here because the play buffer was
|
||||||
} else
|
* not full enough, try to start so it's drained.
|
||||||
s->pstate = SLOT_INIT;
|
*/
|
||||||
|
s->pstate = SLOT_READY;
|
||||||
|
slot_ready(s);
|
||||||
}
|
}
|
||||||
if (s->mode & MODE_RECMASK)
|
if (s->mode & MODE_RECMASK)
|
||||||
abuf_done(&s->sub.buf);
|
abuf_done(&s->sub.buf);
|
||||||
|
|
Loading…
Reference in New Issue