diff options
author | Chris Robinson <[email protected]> | 2018-11-19 04:46:49 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-19 04:46:49 -0800 |
commit | ad5f9d9b22f8860f0c6ca06004c134182dda95df (patch) | |
tree | aac46dac1585e5f58ba8bc1be6bb06d3a36e9ab6 /Alc/backends/oss.cpp | |
parent | a14f39ea06a458e6b3b70e0428264967847da7f4 (diff) |
Return the ringbuffer data pointers as a pair
Diffstat (limited to 'Alc/backends/oss.cpp')
-rw-r--r-- | Alc/backends/oss.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Alc/backends/oss.cpp b/Alc/backends/oss.cpp index 32ee1022..3985cd27 100644 --- a/Alc/backends/oss.cpp +++ b/Alc/backends/oss.cpp @@ -582,11 +582,10 @@ int ALCcaptureOSS_recordProc(ALCcaptureOSS *self) continue; } - ll_ringbuffer_data_t vec[2]; - ll_ringbuffer_get_write_vector(self->ring, vec); - if(vec[0].len > 0) + auto vec = ll_ringbuffer_get_write_vector(self->ring); + if(vec.first.len > 0) { - amt = read(self->fd, vec[0].buf, vec[0].len*frame_size); + amt = read(self->fd, vec.first.buf, vec.first.len*frame_size); if(amt < 0) { ERR("read failed: %s\n", strerror(errno)); |