Results 1 to 2 of 2

Thread: Latency varies on start/stop of Player and Recorder

  1. #1
    Newbie Newbie
    Join Date
    Feb 2017
    Posts
    2

    Question Latency varies on start/stop of Player and Recorder

    Dear all,
    I am modifying the echo example given by Android/Google people.
    What I am doing is: (1) Start Play (2) Start Record (3) Stop Play when my data/tone has played (few thousand samples) (4) Stop Record when all my data has been received (few thousand samples)

    I. I am recording what is being played.
    II. What is being played is a short burst of white noise prefixed and padded with 0x00's.

    Question:
    The very first time I do the operation above, the difference in play/record sample time is very good, about 60 samples and consistently performs this way.
    But when I want to repeat the operation (i.e by a push button), the difference in in record/play sample time is in the order of 1,000 samples to 2,000 samples.

    I have tried doing things like Clearing the SLAndroidSimpleBufferQueueItf on both Playe and Recorder, but makes no difference.
    I quickly looked into the available public methods of SLAndroidSimpleBufferQueueItf , SLRecordItf, and SLObjectItf, but nothing seems to bring the "engine" to the state when it is first created/initialized so I can get the low latency.

    Any ideas?

  2. #2
    Newbie Newbie
    Join Date
    Feb 2017
    Posts
    2

    Latency varies on start/stop of Player and Recorder

    After more tests, what I discovered is that there is no "variable latency" it's actually old data!
    So where is this data coming from? I call the "Clear" method of the Buffer Queue Interface right before "starting" the recorder.

    Ideas?
    Thank you.

    -Saul

Similar Threads

  1. Replies: 1
    Last Post: 06-19-2015, 06:41 PM
  2. voice_call recorder using OpenSL ES
    By kanaan in forum OpenSL ES
    Replies: 2
    Last Post: 05-24-2015, 02:49 PM
  3. Distance between tetris shape-cubes varies...
    By Helgi in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-16-2009, 10:58 AM
  4. Stereo start and stop
    By OpenGHell in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 07-05-2003, 07:03 PM
  5. Texture start/stop inside strips and fans
    By Yigal Eilam in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 03-26-2002, 06:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean