Commit c0e570cd authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #29632: opensl: fix buffer access

parent d092805a
...@@ -448,7 +448,7 @@ OpenSLLayer::startAudioPlayback() ...@@ -448,7 +448,7 @@ OpenSLLayer::startAudioPlayback()
buffer.reset(); buffer.reset();
result = (*playbackBufferQueue_)->Enqueue(playbackBufferQueue_, &buffer.getData(), buffer.size()); result = (*playbackBufferQueue_)->Enqueue(playbackBufferQueue_, buffer.getData()[0].data(), buffer.size());
if (SL_RESULT_SUCCESS != result) { if (SL_RESULT_SUCCESS != result) {
DEBUG("Error could not enqueue initial buffers\n"); DEBUG("Error could not enqueue initial buffers\n");
...@@ -490,7 +490,7 @@ OpenSLLayer::startAudioCapture() ...@@ -490,7 +490,7 @@ OpenSLLayer::startAudioCapture()
buffer.reset(); buffer.reset();
DEBUG("Enqueue record buffer\n"); DEBUG("Enqueue record buffer\n");
result = (*recorderBufferQueue_)->Enqueue(recorderBufferQueue_, &buffer.getData(), buffer.size()); result = (*recorderBufferQueue_)->Enqueue(recorderBufferQueue_, buffer.getData()[0].data(), buffer.size());
// the most likely other result is SL_RESULT_BUFFER_INSUFFICIENT, // the most likely other result is SL_RESULT_BUFFER_INSUFFICIENT,
// which for this code example would indicate a programming error // which for this code example would indicate a programming error
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment