I have been trying OpenSL for several weeks. I am trying to access the buffer while playing a file on the SD card through SL_DATALOCATOR_URI as the source. I want to write some of my own effects and need a buffer.
I am currently creating two audio players in the code. One reads the file into the buffer, the other writes the buffer to the output. When I test the code with a microphone (recorder), everything is fine. The audio input works as expected.
When I switch the recorder using the uri audio player, the queue goes into haywire mode. Streaming does not listen for thread blocking (this happens as asynchronously, as I understand it), and buffer calls do not start correctly, time flies.
I put the logs for each method, so the result looks something like this:
V/PDecoder( 1292): Position : 15023
V/PDecoder( 1292): Position : 16044
V/PDecoder( 1292): Position : 17043
V/PDecoder Native PL1( 1292): bqPlayerCallback
V/PDecoder Native PL1( 1292): Notify thread lock
V/PDecoder Native PL1( 1292): android_AudioIn 32768
V/PDecoder Native PL1( 1292): Wait thread lock
V/PDecoder Native PL1( 1292): android_AudioOut 32768
V/PDecoder Native PL1( 1292): android_AudioIn 32768
V/PDecoder Native PL1( 1292): android_AudioOut 32768
V/PDecoder Native PL1( 1292): Wait thread lock
V/PDecoder Native PL1( 1292): bqRecorderCallback
V/PDecoder Native PL1( 1292): Notify thread lock
V/PDecoder( 1708): Position : 18041
V/PDecoder( 1708): Position : 19040
V/PDecoder( 1708): Position : 20038
, .
, , ? audioplayer > buffer > output uri? ? - , .
,