mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Rewrite assert in cubeb_alsa.c: alsa_refill_stream to pass back a cubeb error instead.
This commit is contained in:
parent
8648eda572
commit
edded63b74
1 changed files with 6 additions and 1 deletions
|
|
@ -317,7 +317,12 @@ alsa_refill_stream(cubeb_stream * stm)
|
|||
snd_pcm_recover(stm->pcm, wrote, 1);
|
||||
wrote = snd_pcm_writei(stm->pcm, p, got);
|
||||
}
|
||||
assert(wrote >= 0 && wrote == got);
|
||||
if (wrote < 0 || wrote != got) {
|
||||
/* Recovery failed, somehow. */
|
||||
pthread_mutex_unlock(&stm->mutex);
|
||||
stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
|
||||
return ERROR;
|
||||
}
|
||||
stm->write_position += wrote;
|
||||
gettimeofday(&stm->last_activity, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue