AudioRecord can't get any notification when record/marker position updated

by Dave Sparks » Fri, 24 Apr 2009 01:10:51 GMT


Sponsored Links
 I suspect the problem is the interval you chose: 50 frames @ 8KHz is
6.25 msecs. Your app is not going to be able to handle a callback
every 6.25 msecs. Try something more reasonable like 50 msecs (400
frames) and see if that works.



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



AudioRecord can't get any notification when record/marker position updated

by Steven_T » Fri, 24 Apr 2009 09:48:27 GMT


 hi Dave Sparks:
   I have changed 50 frames to 400 frmaes, it doesn't work.
   then I set bufferSizeInBytes to 1000000 to init AudioRecord object,
and set update period to 400,
   it dosn't work too. I had used logcat to watch emulator'log, didn't
find this program pid throwed error,
   Can you give me sample?
   thanks






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


Sponsored Links


AudioRecord can't get any notification when record/marker position updated

by Dave Sparks » Sat, 25 Apr 2009 04:45:13 GMT


 id you enable audio input in the emulator?

On Apr 23, 6:48pm, Steven_T <gwb...@126.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



AudioRecord can't get any notification when record/marker position updated

by Steven_T » Sat, 25 Apr 2009 09:04:37 GMT


 i Dave Sparks:
thank you for reply!

I didn't disable audio input in avd
what you means is use option "-audio <backend>" to set an audio input

I had used the next code test audio input
//
====================================================================
Intent intent = new Intent
(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
startActivityForResult(intent, ACTIVITY_RECORD_SOUND);
/
=====================================================================
it can recording and saved audio as a file named "recording47845.3gpp"
in sdcard

the next is logcat out put:
===================================================================================
tag: AudioHardware
Message: AudioStreamInGeneric::read(0x40715b40, 320) from fd 7

tag:AudioFlinger
Message: AudioRecordThread: buffer overflow

tag: InputMangerServic
Message: Starting input on non-focused client
com.android.internal.view.iinputmethodclient$stub$pr...@4360c470
(uid=100118 pid=764)
====================================================================================

Please help me, thanks!



On Apr 25, 4:44am, Dave Sparks <davidspa...@android.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



AudioRecord can't get any notification when record/marker position updated

by Steven_T » Sat, 25 Apr 2009 09:04:41 GMT


 i Dave Sparks:
thank you for reply!

I didn't disable audio input in avd
what you means is use option "-audio <backend>" to set an audio input

I had used the next code test audio input
//
====================================================================
Intent intent = new Intent
(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
startActivityForResult(intent, ACTIVITY_RECORD_SOUND);
/
=====================================================================
it can recording and saved audio as a file named "recording47845.3gpp"
in sdcard

the next is logcat out put:
===================================================================================
tag: AudioHardware
Message: AudioStreamInGeneric::read(0x40715b40, 320) from fd 7

tag:AudioFlinger
Message: AudioRecordThread: buffer overflow

tag: InputMangerServic
Message: Starting input on non-focused client
com.android.internal.view.iinputmethodclient$stub$pr...@4360c470
(uid=100118 pid=764)
====================================================================================

Please help me, thanks!



On Apr 25, 4:44am, Dave Sparks <davidspa...@android.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



AudioRecord can't get any notification when record/marker position updated

by Dave Sparks » Tue, 28 Apr 2009 05:38:41 GMT


 K, so it sounds like audio is being produced by the kernel driver.

I just looked at your code, and I think you need to call read() once
to pass in your first input buffer.

On Apr 24, 6:04pm, Steven_T <gwb...@126.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



AudioRecord can't get any notification when record/marker position updated

by Steven_T » Tue, 28 Apr 2009 15:34:02 GMT


 hanks it works

On Apr 28, 5:38am, Dave Sparks <davidspa...@android.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



AudioRecord can't get any notification when record/marker position updated

by Steven_T » Tue, 28 Apr 2009 15:34:14 GMT


 hanks it works

On Apr 28, 5:38am, Dave Sparks <davidspa...@android.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



AudioRecord can't get any notification when record/marker position updated

by Thomson » Thu, 30 Apr 2009 02:05:57 GMT


 ello Steven_T ,
Can you tell me how you able to fix this issue?.
I am also not getting "onMarkerReached" callback.
Is there any limitation for "setNotificationMarkerPosition".












On Apr 28, 6:34pm, Steven_T <gwb...@126.com> wrote:

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



Other Threads

1. Permission on apk

Hi,

I've a problem to read on an apk File.

I've created my sdcard with command 'mksdcard ...'

I execute this code :

        File tmpdir = new File(tmpdirpath+name);
                if (!tmpdir.exists()) {
                        boolean b = tmpdir.mkdirs();
                } else {
                        if (!tmpdir.isDirectory()) {
                                throw new RuntimeException("here : the tmp dir 
conflicts");
                        }
                }

with name = name of my apk file.

My file is correctly  created on my temporary directory on /sdcard,
but when i try to read it, i've not the permissions.

My permissions are '- - - - r w - r w -'

I tried to change this permission with

       #adb shell
       # chmod 777

There is no error but my permissions are always the same  '- - - - r w
- r w -'

So in my application, i've the exception :

04-28 14:56:16.296: ERROR/dalvikvm(231): Can't open dex cache '/data/
dalvik-cache/
sdc...@.tmpdir@org.python.pycode._p...@org.python.pycode._pyx0.apk@classes.dex':
No such file or directory
04-28 14:56:16.296: INFO/dalvikvm(231): Unable to open or create cache
for /sdcard/.tmpdir/org.python.pycode._pyx0/
org.python.pycode._pyx0.apk
04-28 14:56:16.306: WARN/System.err(231): java.io.IOException: unable
to open DEX file
04-28 14:56:16.326: WARN/System.err(231):     at
dalvik.system.DexFile.openDexFile(Native Method)
04-28 14:56:16.336: WARN/System.err(231):     at
dalvik.system.DexFile.<init>(DexFile.java:55)
04-28 14:56:16.346: WARN/System.err(231):     at
dalvik.system.DexFile.<init>(DexFile.java:41)
04-28 14:56:16.355: WARN/System.err(231):     at
org.python.debug.FixMe.getClassByName(FixMe.java:93)


Some help, please !


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

2. Custom Locale, Spare parts - how to get them?

Like in the topic - after uprading my G1 Dev Phone with recovery
images provided by HTC I don't have those 2 apps.
--~--~---------~--~----~------------~-------~--~----~

3. Call method from Broadcast Receiver

4. how to build the pdk_docs target to generate the document of android

5. Keeping an application transparently on top of all other applications

6. How to change RadioButton size???

7. Anyone working on a Dex decompiler ? I am doing one .