Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9130021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:52:46+00:00 2026-06-17T07:52:46+00:00

What I would like to do is record a voice, process it like adding

  • 0

What I would like to do is record a voice, process it like adding some effect to the recorded audio, and then replay it as fast as possible using opensl. I’m having trouble finding information on the net about doing something like this, so I actually have a couple questions.

I’ve looked at the android native audio sample, and the book beginning android ndk, which got me started with opensl, but they didn’t really help me understand recording very well.

1) So first, to play back recorded audio immediately, would i be able to read a buffer from a thread that plays the audio, while the same time the recording thread is writing to the buffer? I know someone will probably go crazy about this idea because the idea of accessing some object in memory by two different threads at the same time could lead to problems, but if the recording thread is made sure to always be writing to memory just ahead of the playing audio thread, then that would be possible right?

2) Or to play back in real time, will i use the buffer queue with two or three very small buffers, and a callback that gets called each time one is filled, then play that buffer while the next buffer is being filled by the recording audio thread? but i was reading and someone said the callbacks are not always called (the most helpful link i’ve found about this is: https://groups.google.com/forum/#!msg/android-ndk/hLSygQrmcPI/qtwB76JNa_EJ). also, that means that the time difference between the recorded audio and the played back audio would be the size of the buffer plus the time it takes for the callback to let the recording object know to start recording using the next buffer. I think there would be a gap between when the recorder stops recording and when it starts recording again.

3) The android recording buffer queue is also where i’m having problems understanding. Do i have to use a buffer queue in android to record audio? or is it possible to record directly to a buffer without using a buffer queue? I’m having problems with this because the clear method of SLAndroidSimpleBufferQueueItf doesn’t actually seem to work. apparently its a bug. and I can’t seem to record over a buffer after its already been filled with data. since the clear method doesn’t seem to work, how can i tell the recorder which buffer in the queue to record to?

I know this is kind of a lot to ask, and i didn’t say everything i’ve tried, but i was hoping someone has some experience with this and can shed some light for me and anybody else that has a problem playing back recorded audio in real-time using opensl.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:52:47+00:00Added an answer on June 17, 2026 at 7:52 am

    I found pretty much exactly what i’m looking for. A way to play recorded audio back in real time is to use something called a circular buffer (or round buffer), where basically the recorded audio is read into it, while the played back audio reads everything up to where the recorded audio is writing.

    http://audioprograming.wordpress.com/

    OpenSL ES in Android still does not exactly support “Low-latency”, as there is still a slight delay, but it still works really well, it just sounds more like a slight echo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to record audio to know the noise level. I do not
I would like to know how do I declare a record, that has some
I would like to know if it exist a solution to record audio which
I would like to record user interaction in a video that people can then
I would like to record from the device microphone and then be able to
I would like to develop an application in which voice can be recorded &
I have an application for which I would like to record some statistics for
I am developing an app to record voice. I would like to increase the
I have an automation system and I would like to record user logins and
I would like to know how I can record a video in MATLAB with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.