Cannot create AudioTrack with larger audio output latency.

by AndroidJimmy » Fri, 27 Feb 2009 15:03:46 GMT


Sponsored Links
 I meet a problem about creating AudioTrack failed with larger audio
output latency.
It fails in AudioTrack::set(), blocked by codes below:

    if (frameCount < minFrameCount) {
      LOGE("Invalid buffer size: minFrameCount %d, frameCount %d",
minFrameCount, frameCount);
      return BAD_VALUE;
    }

I think this code is for guaranteeing there are enough buffer and
sample in AudioTrack to wait for audio output consuming the output
data.

In MediaPlayerService::AudioOutput::open(),  AudioTrack is created by
codes below:

    new AudioTrack(mStreamType, sampleRate, format, channelCount,
frameCount*bufferCount);

framecount is determined by frameCount = (sampleRate*afFrameCount)/
afSampleRate; In most situation, sampleRate is usually 44100,
bufferCount is hard-code in PV(4) and SONIVOX_PLAYER/VORBIS_PLAYER
(DEFAULT_AUDIOSINK_BUFFERCOUNT 4).

So if there is a larger output latency, PV/SONIVOX_PLAYER/
VORBIS_PLAYER may not create an AudioTrack with enough bufferCount.
These may happen when output is a larger latency network device, such
as BlueTooth, etc.

Is there a way to prevent from creating AudioTrack fail under this
situation?
Thanks.
--~--~---------~--~----~------------~-------~--~----~



Cannot create AudioTrack with larger audio output latency.

by Dave Sparks » Sat, 28 Feb 2009 03:15:30 GMT


 There are a bunch of patches coming related to this in Cupcake. The
app can either ask for the default latency or it can ask for the
latency and request something bigger.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. is it possible to change the application name dynamically???




Nope.



If these are separate apps, this is a moot point. If you're using some
unlock key or something, leave the app name as XYZ and change the title in
the activity window.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 

2. Ordered List

I have to display an ordered list of items (expected level of nesting
= 2) in a TextView.

What is the best way to do this?

I have tried creating a string resource such as:
<string name="html_list"><ol><li>item 1\n</li><li>item 2\n</li></ol></
string>
and then setting this text in TextView.

This just displayed the two list items one below the other without the
default disc(bullets). It did not work.

Please help.

Thanks.


-- 

3. Rss yg bagus

4. Need applications using framebuffer

5. Janky Custom Cursor Adapter

6. QC Snapdragon: access HW codecs

7. x86 Atom board