mirror of
https://github.com/mozilla/cubeb
synced 2024-11-21 06:26:10 -07:00
opensl: Add extra asserts to help track down BMO 1913284.
This commit is contained in:
parent
e0980443d8
commit
f9bf0702bc
1 changed files with 3 additions and 0 deletions
|
@ -1857,6 +1857,9 @@ opensl_stream_get_position(cubeb_stream * stm, uint64_t * position)
|
|||
uint64_t samplerate = stm->user_output_rate;
|
||||
uint32_t output_latency = stm->output_latency_ms;
|
||||
|
||||
XASSERT(stm->written >= 0);
|
||||
XASSERT(stm->user_output_rate > 0);
|
||||
XASSERT(stm->output_configured_rate > 0);
|
||||
pthread_mutex_lock(&stm->mutex);
|
||||
int64_t maximum_position = stm->written * (int64_t)stm->user_output_rate /
|
||||
stm->output_configured_rate;
|
||||
|
|
Loading…
Reference in a new issue