ringbuffer: use gcc atomic operations

Remove barrier, use GCC atomic operations for ringbuffer
This commit is contained in:
Wim Taymans 2017-04-24 13:18:57 +02:00
parent 02d4dc0efd
commit baada0a330
7 changed files with 32 additions and 92 deletions

View file

@ -324,7 +324,7 @@ audiotestsrc_make_buffer (SpaAudioTestSrc *this)
} else {
this->render_func (this, SPA_MEMBER (b->outbuf->datas[0].data, offset, void), n_samples);
}
spa_ringbuffer_write_advance (&b->rb->ringbuffer, n_bytes);
spa_ringbuffer_write_update (&b->rb->ringbuffer, index + n_bytes);
} else {
n_samples = n_bytes / this->bpf;
this->render_func (this, b->outbuf->datas[0].data, n_samples);