Nook Tablet crashes when trying to record audio on the device

13 replies [Last post]
scottadelman
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 30 Jul 2011

I have tried to record audio using my app and also just did a build of the simple audio recorder. When you touch the record button, it quits out of the application and indicates an error. Please let me know if there is a way to do this successfully.

Replies

posburn
User offline. Last seen 24 weeks 1 day ago. Offline
Joined: 17 Jun 2010

Scott: I don't think the Nook has a mic you can use for recording.

paul

scottadelman
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 30 Jul 2011

The newest Nook Tablet does have a built in mic. They try to use this as a selling point so you can record yourself reading an eBook to your child for later playback.

Joshua Quick
User offline. Last seen 5 hours 9 min ago. Offline
Staff
Joined: 31 Jan 2011

Hello Scott,

I've just verified that audio recording does work on a Nook Tablet with sample app "Media\SimpleAudioRecorder" that is included with the Corona SDK. I recommend that you have a look at the sample app and try it for yourself. You'll need to replace its "audio.*" API calls with the equivalent media.playSound() and media.pauseSound() since our audio API is unable to playback the recorded 3GP files, which is the audio format that Android records to.

Joshua Quick
User offline. Last seen 5 hours 9 min ago. Offline
Staff
Joined: 31 Jan 2011

Also, double check that you have the following android permission set in your build.settings file. Otherwise your app won't have permission to use the device's microphone.

"android.permission.RECORD_AUDIO"

scottadelman
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 30 Jul 2011

Hey Joshua,

So I rebuilt the SimpleAudioRecorder for the Nook and this time was sure to double check to make sure the build.settings were correct and the permission was there. They both were setup correct. I then reinstalled it on my Nook.

This time it did allow me to record the sound it it played part of it back. The sound quality was horrible and delayed. After hitting the record/pause button a few times, the app still crashes. Just keep pushing the button and see if this happens for you. Trying to figure out why all this would be.

Thanks,
Scott

Joshua Quick
User offline. Last seen 5 hours 9 min ago. Offline
Staff
Joined: 31 Jan 2011

I re-tested this today. It is not crashing for me. Nor was the audio playback quality bad. Although I did notice that later recordings (after the first recording) did not fully record everything I said into the microphone. So there is definitely something wrong there. I'll probably have to contact Barnes & Noble's tech-support team to see why this is the case.

I'll write up a bug report on this, but to be honest, don't expect this to be fixed anytime soon. I recommend that you remove audio recording from the Nook version of your app at the moment.

And regarding the audio lag, the vast majority of Android devices have this issue. It's not an issue with Corona, but a general Android problem that all Android developers are having problems with. That is, it's an issue that Google needs to fix. Download "Angry Birds" onto your device and you'll notice that it has the same problem. That said, our "media" API has the least amount of audio latency, but it is still noticeable and may not be worth changing to that API. I'll leave that decision up to you.

danedwar
User offline. Last seen 3 days 6 hours ago. Offline
Joined: 22 Jul 2011

Hi Joshua,

I have been having the same problem with the Nook audio recording - The SimpleAudioRecorder sample does work but if you modify it as below then it will crash.

The problem seems to be that if you play any audio using audio.loadSound, audio.play then the record will always crash afterwards.

Add this code to the bottom of the SimpleAudioRecorder and add a test.mp3 file to play when the sample starts. Wait for the Test audio to complete and then try to record.

1
2
3
4
5
6
7
8
9
local audioDelegate = function(event)
        print("Test audio complete");
        audio.stop();
        audio.dispose(audioHandle);
        audioHandle = nil;
end
 
local audioHandle = audio.loadSound("test.mp3");
audio.play(audioHandle, {onComplete=audioDelegate});

Any help with this would be appreciated.

I've tried playing the audio on a specific channel, reserving channels to play the audio on - nothing seems to work.

My only options at the moment seem to be to replace all audio.play calls with media.playSound (not an exciting prospect)

Cheers,

danedwar
User offline. Last seen 3 days 6 hours ago. Offline
Joined: 22 Jul 2011

Update to this - if you use any audio functions before trying to record audio on the Nook it will crash.

Simply add an audio call to the bottom of the SimpleAudioRecorder sample and it will crash when you try to record on a Nook Tablet device.

e.g.

1
audio.getVolume();

or

1
audio.reserveChannels(0);

I guess something is happening during the initialisation of the audio that is causing problems with recording.

Any suggestions?

Cheers,

Joshua Quick
User offline. Last seen 5 hours 9 min ago. Offline
Staff
Joined: 31 Jan 2011

We don't have anyone available to look into this issue right now, so would you mind doing a couple tests for me first?

Can you provide the log output from your Nook when it crashes please? You can do so via the "adb logcat" command line tool or the DDMS tool that is included with the Android SDK. The log should provide clues as to why it is crashing.

Also, does our sample app "Media/SimpleMixer" work okay on your Nook? That sample app extensively uses the audio API.

danedwar
User offline. Last seen 3 days 6 hours ago. Offline
Joined: 22 Jul 2011

Hi Joshua,

I've tried the SimpleMixer app runs fine on the Nook Tablet. Actually our app uses the audio API for audio playback and the media API for playing video and some audio playback. Mixing the audio API and media API are fine in all cases except for when you try to use the media API to record. It only seems to be a problem on the Nook Tablet, we have it running fine on other Android devices.

Let me know if there's anything else you want me to try out.

The log section where it crashes is (I've pasted the entire log at the end of the post incase it's useful) :

D/Omap4ALSA( 1180): open called for devices 00040000 in mode 0 channels 00000010...
E/ALSAControl( 1180): Control 'MUX_UL08' cannot get element info: -2
E/ALSAControl( 1180): Control 'MUX_UL09' cannot get element info: -2
I/Omap4ALSA( 1180): Using FIFO
D/Omap4ALSA( 1180): Requested buffer size 2048 not granted, got 2046
I/Omap4ALSA( 1180): Buffer size: 2046
I/Omap4ALSA( 1180): Latency: 255750
E/Omap4ALSA( 1180): Unable to set hardware parameters: Device or resource busy
I/Omap4ALSA( 1180): Initialized ALSA CAPTURE device 'rate_convert2'
E/AudioRecord( 1180): Could not get audio input for record source 1
E/StagefrightRecorder( 1180): audio source is not initialized
I/MPEG4Writer( 1180): The mp4 file will not be streamable.
E/MediaRecorder( 3557): start failed: -2147483648
W/dalvikvm( 3557): threadid=11: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 3557): FATAL EXCEPTION: GLThread 11
E/AndroidRuntime( 3557): java.lang.RuntimeException: start failed.
E/AndroidRuntime( 3557): at android.media.MediaRecorder.start(Native Method)
E/AndroidRuntime( 3557): at com.ansca.corona.AudioRecorder.startRecording(AudioRecorder.java:81)
E/AndroidRuntime( 3557): at com.ansca.corona.NativeToJavaBridge.callRecordStart(NativeToJavaBridge.java:1618)
E/AndroidRuntime( 3557): at com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method)
E/AndroidRuntime( 3557): at com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:184)
E/AndroidRuntime( 3557): at com.ansca.corona.events.TouchEvent.Send(TouchEvent.java:17)
E/AndroidRuntime( 3557): at com.ansca.corona.events.EventManager.sendEvents(EventManager.java:266)
E/AndroidRuntime( 3557): at com.ansca.corona.Controller.onDrawFrame(Controller.java:232)
E/AndroidRuntime( 3557): at com.ansca.corona.CoronaRenderer.onDrawFrame(CoronaRenderer.java:74)
E/AndroidRuntime( 3557): at android.opengl.derived.SwapGLSurfaceView$GLThread.guardedRun(SwapGLSurfaceView.java:949)
E/AndroidRuntime( 3557): at android.opengl.derived.SwapGLSurfaceView$GLThread.run(SwapGLSurfaceView.java:809)
D/DeviceManagerBroadcastReceiver( 1471): action (com.bn.devicemanager.ACTION_HANDLE_CRASH)
D/DeviceManagerBroadcastReceiver( 1471): Sending Message... ({ what=1 when=-3h22m23s831ms })
D/DeviceManagerBroadcastReceiver( 1471): Action: com.bn.devicemanager.ACTION_HANDLE_CRASH
D/DeviceManagerBroadcastReceiver( 1471): Set Alarm: false
I/Process ( 1290): Sending signal. PID: 3557 SIG: 3
I/dalvikvm( 3557): threadid=4: reacting to signal 3
I/dalvikvm( 3557): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 1290): GC_CONCURRENT freed 1162K, 46% free 4964K/9159K, external 3030K/3164K, paused 2ms+4ms
D/dalvikvm( 1290): GC_EXPLICIT freed <1K, 46% free 4964K/9159K, external 3030K/3164K, paused 46ms
W/ActivityManager( 1290): Force finishing activity com.kabram.audiotest2/com.ansca.corona.CoronaActivity

Here is the entire log output:

D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
I/ApplicationLauncher( 1513): Launching ComponentInfo{com.kabram.audiotest2/com.ansca.corona.CoronaActivity}
D/KeyguardViewMediator( 1290): setHidden false
I/ActivityManager( 1290): Start proc com.kabram.audiotest2 for activity com.kabram.audiotest2/com.ansca.corona.CoronaActivity: pid=3480 uid=10035 gids={3003}
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
I/ActivityThread( 3480): Pub com.kabram.audiotest2.files: com.ansca.corona.FileContentProvider
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/dalvikvm( 3480): Trying to load lib /data/data/com.kabram.audiotest2/lib/liblua.so 0x40513d30
D/dalvikvm( 3480): Added shared lib /data/data/com.kabram.audiotest2/lib/liblua.so 0x40513d30
D/dalvikvm( 3480): No JNI_OnLoad found in /data/data/com.kabram.audiotest2/lib/liblua.so 0x40513d30, skipping init
D/dalvikvm( 3480): Trying to load lib /data/data/com.kabram.audiotest2/lib/libjnlua5.1.so 0x40513d30
D/dalvikvm( 3480): Added shared lib /data/data/com.kabram.audiotest2/lib/libjnlua5.1.so 0x40513d30
D/dalvikvm( 3480): Trying to load lib /data/data/com.kabram.audiotest2/lib/libjnlua5.1.so 0x40513d30
D/dalvikvm( 3480): Shared lib '/data/data/com.kabram.audiotest2/lib/libjnlua5.1.so' already loaded in same CL 0x40513d30
D/KeyguardViewMediator( 1290): setHidden false
I/dalvikvm( 3480): threadid=1: recursive native library load attempt (/data/data/com.kabram.audiotest2/lib/libjnlua5.1.so)
D/dalvikvm( 3480): Trying to load lib /data/data/com.kabram.audiotest2/lib/libopenal.so 0x40513d30
D/dalvikvm( 3480): Added shared lib /data/data/com.kabram.audiotest2/lib/libopenal.so 0x40513d30
D/dalvikvm( 3480): Trying to load lib /data/data/com.kabram.audiotest2/lib/libmpg123.so 0x40513d30
D/dalvikvm( 3480): Added shared lib /data/data/com.kabram.audiotest2/lib/libmpg123.so 0x40513d30
D/dalvikvm( 3480): No JNI_OnLoad found in /data/data/com.kabram.audiotest2/lib/libmpg123.so 0x40513d30, skipping init
D/dalvikvm( 3480): Trying to load lib /data/data/com.kabram.audiotest2/lib/libvorbisidec.so 0x40513d30
D/dalvikvm( 3480): Added shared lib /data/data/com.kabram.audiotest2/lib/libvorbisidec.so 0x40513d30
D/dalvikvm( 3480): No JNI_OnLoad found in /data/data/com.kabram.audiotest2/lib/libvorbisidec.so 0x40513d30, skipping init
D/dalvikvm( 3480): Trying to load lib /data/data/com.kabram.audiotest2/lib/libalmixer.so 0x40513d30
D/dalvikvm( 3480): Added shared lib /data/data/com.kabram.audiotest2/lib/libalmixer.so 0x40513d30
D/dalvikvm( 3480): No JNI_OnLoad found in /data/data/com.kabram.audiotest2/lib/libalmixer.so 0x40513d30, skipping init
D/dalvikvm( 3480): Trying to load lib /data/data/com.kabram.audiotest2/lib/libcorona.so 0x40513d30
D/dalvikvm( 3480): Added shared lib /data/data/com.kabram.audiotest2/lib/libcorona.so 0x40513d30
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/libEGL ( 3480): loaded /system/lib/egl/libGLES_android.so
D/KeyguardViewMediator( 1290): setHidden false
D/libEGL ( 3480): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
D/libEGL ( 3480): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
D/libEGL ( 3480): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
I/ActivityManager( 1290): Displayed com.kabram.audiotest2/com.ansca.corona.CoronaActivity: +252ms (total +289ms)
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
W/IInputConnectionWrapper( 1693): showStatusIcon on inactive InputConnection
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
I/ActivityManager( 1290): No longer want com.bn.nook.email (pid 1554): hidden #16
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/dalvikvm( 3480): Note: class Landroid/opengl/GLWrapperBase; has 211 unimplemented (abstract) methods
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/skia ( 3480): Loading ARM decoder...
D/skia ( 3480): Loading ARM decoder...
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/dalvikvm( 3480): GC_EXTERNAL_ALLOC freed 169K, 47% free 2925K/5511K, external 668K/1039K, paused 32ms
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/dalvikvm( 3480): GC_FOR_MALLOC freed 17K, 48% free 2909K/5511K, external 1515K/2027K, paused 21ms
I/dalvikvm-heap( 3480): Grow heap (frag case) to 7.500MB for 866416-byte allocation
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/dalvikvm( 3480): GC_FOR_MALLOC freed 0K, 42% free 3755K/6407K, external 1515K/2027K, paused 19ms
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
I/Corona ( 3480): testfile.3gp
I/System.out( 3480): WARNING: Could not load font AmericanTypewriter-Bold. Using default.
D/dalvikvm( 3480): GC_CONCURRENT freed 112K, 42% free 3853K/6535K, external 899K/1515K, paused 2ms+2ms
I/SoundDecoder( 3480): ALL MPG123 DECODERS:
I/SoundDecoder( 3480): generic
I/SoundDecoder( 3480):
I/SoundDecoder( 3480): SUPPORTED MPG123 DECODERS:
I/SoundDecoder( 3480): generic
I/SoundDecoder( 3480):
D/AudioFlinger( 1180): createTrack_l() Bad parameter: sampleRate 22050 format 1, channelCount 2 for output 0x565d8
D/AudioResampler( 1180): forcing AudioResampler quality to 3
D/Omap4ALSA( 1180): open called for devices 00000002 in mode 0 channels 00000000...
I/Omap4ALSA( 1180): Using ping-pong!
I/Omap4ALSA( 1180): Buffer size: 4096
I/Omap4ALSA( 1180): Latency: 92879
I/Omap4ALSA( 1180): Initialized ALSA PLAYBACK device 'plughw:0,0'
E/AudioHardwareALSA( 1180): RE-OPEN AFTER STANDBY:: took 401 msecs
W/AudioFlinger( 1180): write blocked for 403 msecs, 3 delayed writes, thread 0x55e48
E/WifiStateTracker( 1290): EVENT_SUPPLICANT_PING
E/WifiStateTracker( 1290): EVENT_SUPPLICANT_PING
D/dalvikvm( 1587): GC_EXPLICIT freed 12K, 48% free 2946K/5575K, external 668K/1039K, paused 59ms
D/Omap4ALSA( 1180): open called for devices 00040000 in mode 0 channels 00000010...
E/ALSAControl( 1180): Control 'MUX_UL08' cannot get element info: -2
E/ALSAControl( 1180): Control 'MUX_UL09' cannot get element info: -2
I/Omap4ALSA( 1180): Using FIFO
D/Omap4ALSA( 1180): Requested buffer size 2048 not granted, got 2046
I/Omap4ALSA( 1180): Buffer size: 2046
I/Omap4ALSA( 1180): Latency: 255750
E/Omap4ALSA( 1180): Unable to set hardware parameters: Device or resource busy
I/Omap4ALSA( 1180): Initialized ALSA CAPTURE device 'rate_convert2'
E/AudioRecord( 1180): Could not get audio input for record source 1
E/StagefrightRecorder( 1180): audio source is not initialized
I/MPEG4Writer( 1180): The mp4 file will not be streamable.
E/MediaRecorder( 3480): start failed: -2147483648
W/dalvikvm( 3480): threadid=11: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 3480): FATAL EXCEPTION: GLThread 12
E/AndroidRuntime( 3480): java.lang.RuntimeException: start failed.
E/AndroidRuntime( 3480): at android.media.MediaRecorder.start(Native Method)
E/AndroidRuntime( 3480): at com.ansca.corona.AudioRecorder.startRecording(AudioRecorder.java:81)
E/AndroidRuntime( 3480): at com.ansca.corona.NativeToJavaBridge.callRecordStart(NativeToJavaBridge.java:1618)
E/AndroidRuntime( 3480): at com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method)
E/AndroidRuntime( 3480): at com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:184)
E/AndroidRuntime( 3480): at com.ansca.corona.events.TouchEvent.Send(TouchEvent.java:17)
E/AndroidRuntime( 3480): at com.ansca.corona.events.EventManager.sendEvents(EventManager.java:266)
E/AndroidRuntime( 3480): at com.ansca.corona.Controller.onDrawFrame(Controller.java:232)
E/AndroidRuntime( 3480): at com.ansca.corona.CoronaRenderer.onDrawFrame(CoronaRenderer.java:74)
E/AndroidRuntime( 3480): at android.opengl.derived.SwapGLSurfaceView$GLThread.guardedRun(SwapGLSurfaceView.java:949)
E/AndroidRuntime( 3480): at android.opengl.derived.SwapGLSurfaceView$GLThread.run(SwapGLSurfaceView.java:809)
D/DeviceManagerBroadcastReceiver( 1471): action (com.bn.devicemanager.ACTION_HANDLE_CRASH)
D/DeviceManagerBroadcastReceiver( 1471): Sending Message... ({ what=1 when=-3h18m51s696ms })
D/DeviceManagerBroadcastReceiver( 1471): Action: com.bn.devicemanager.ACTION_HANDLE_CRASH
D/DeviceManagerBroadcastReceiver( 1471): Set Alarm: false
I/Process ( 1290): Sending signal. PID: 3480 SIG: 3
I/dalvikvm( 3480): threadid=4: reacting to signal 3
I/dalvikvm( 3480): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 1290): GC_CONCURRENT freed 1805K, 47% free 4927K/9159K, external 2957K/3164K, paused 2ms+5ms
D/dalvikvm( 1290): GC_EXPLICIT freed 42K, 47% free 4910K/9159K, external 2957K/3164K, paused 46ms
W/ActivityManager( 1290): Force finishing activity com.kabram.audiotest2/com.ansca.corona.CoronaActivity
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
W/InputManagerService( 1290): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@40586b20 (uid=10035 pid=3480)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/DeviceManagerProvider( 1471): query(): uri (content://com.bn.provider.devicemanagerprovider/registry?notify=false)
D/DeviceManagerProvider( 1471): query(): selection (name = 'com.bn.device.fota.mode')
D/DeviceManagerProvider( 1471): query(): selectionArgs (null)
D/DeviceManagerProvider( 1471): query(): Product.BN_FEATURE_ROM_TOKENS_ENABLED (true)
D/DeviceManagerProvider( 1471): query(): Table (registry)
D/DeviceManagerProvider( 1471): Query from ROM Token!
D/DeviceManagerProvider( 1471): query(): name after()
D/DeviceManagerProvider( 1471): deviceInfoQuery: uri (content://com.bn.provider.devicemanagerprovider/registry?notify=false)
D/DeviceManagerProvider( 1471): deviceInfoQuery: return false
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/Utils ( 1471): getRegistryValue(): Name = com.bn.device.fota.mode Value: auto
D/MediaProvider( 1432): Where clause :(productSubTypeCode IS null OR productSubTypeCode NOT IN ('N1','B0')) AND globalsearch LIKE ?
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/Utils ( 1471): FOTA mode: auto
I/DeviceManagerHandler( 1471): HandleMessage(): msg.what (1)
D/DeviceManagerHandler( 1471): HandleMessage(): Handling crash
D/AnrParser( 1471): +start
D/KeyguardViewMediator( 1290): setHidden false
D/AnrParser( 1471): Found crashlog marker, timestamp Thu Aug 16 04:59:19 EDT 2012
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/dalvikvm( 1481): GC_EXTERNAL_ALLOC freed 49K, 47% free 2967K/5511K, external 3437K/3455K, paused 64ms
E/libEGL ( 3480): call to OpenGL ES API with no current context (logged once per thread)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/AnrParser( 1471): Logcat file: /data/anr/anrlogs/com.kabram.audiotest2-logcat.log
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/AnrParser( 1471): Waiting kernel log . . .
D/Logcatter( 1471): continues? false done? false
D/Logcatter( 1471): LOG AUTO END.
D/Logcatter( 1471): Verbose level
D/KeyguardViewMediator( 1290): setHidden false
D/Logcatter( 1471): compress? false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/WindowManager( 1290): updating statusbarHeight (40)
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/Logcatter( 1471): Log file: /data/anr/anrlogs/com.kabram.audiotest2-logcat.log
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/dalvikvm( 1471): GC_CONCURRENT freed 386K, 51% free 2978K/5959K, external 668K/1039K, paused 1ms+10ms
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
W/QSB.PackageIconLoader( 1693): Icon not found: /mnt/media/.docThumbs/Quick_Startepub.png, No content provider: /mnt/media/.docThumbs/Quick_Startepub.png
D/KeyguardViewMediator( 1290): setHidden false
W/QSB.PackageIconLoader( 1693): Icon not found: /mnt/media/.docThumbs/User_Guideepub.png, No content provider: /mnt/media/.docThumbs/User_Guideepub.png
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/Logcatter( 1471): LOG END.
D/Logcatter( 1471): LOG STOP.
I/Logcatter( 1471): Total lines: 1698
D/Logcatter( 1471): Closing file
D/Logcatter( 1471): +closeFile
D/Logcatter( 1471): -closeFile
D/Logcatter( 1471): Capture Dmesg
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/Logcatter( 1471): Logcat done=true
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/dalvikvm( 1471): GC_CONCURRENT freed 444K, 51% free 2920K/5959K, external 668K/1039K, paused 1ms+3ms
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
D/KeyguardViewMediator( 1290): setHidden false
E/Omap4ALSA( 1180): called drain&close
D/Utils ( 1471): Copy From: /data/kdebug/kdebug.log
D/Utils ( 1471): Copy To: /data/anr/anrlogs/dmesg-20120816-045920.log
D/AnrParser( 1471): File not found : /data/kdebug/kdebug.log
D/AnrParser( 1471): Kernal log: /data/anr/anrlogs/dmesg-20120816-045920.log
D/AnrParser( 1471): Crash info:
D/AnrParser( 1471): Component: com.kabram.audiotest2
D/AnrParser( 1471): Date: Thu Aug 16 04:59:19 EDT 2012
D/AnrParser( 1471): Crash files:
D/AnrParser( 1471): /data/anr/anrlogs/ANR_com.kabram.audiotest2_20120816-045919.log
D/AnrParser( 1471): /data/anr/anrlogs/com.kabram.audiotest2-logcat.log
D/AnrParser( 1471): /data/anr/anrlogs/dmesg-20120816-045920.log
D/DeviceManagerFsUtil( 1471): totalFileSize()-->170878
D/DeviceManagerFsUtil( 1471): totalFileSize()-->755323
D/DeviceManagerFsUtil( 1471): prune(-67, -122375)
E/AnrParser( 1471): Deleted file/data/anr/anrlogs/ANR_com.kabram.audiotest2_20120816-045919.log
E/AnrParser( 1471): Deleted file/data/anr/anrlogs/com.kabram.audiotest2-logcat.log
E/AnrParser( 1471): Deleted file/data/anr/anrlogs/dmesg-20120816-045920.log
D/AnrParser( 1471): -start

Joshua Quick
User offline. Last seen 5 hours 9 min ago. Offline
Staff
Joined: 31 Jan 2011

Thanks for posting the results. I think the following log entry is a clear indicator of what's going wrong...
E/Omap4ALSA( 1180): Unable to set hardware parameters: Device or resource busy

It appears to be a hardware limitation that we're running into. It can't stream out to the audio hardware and stream in from the microphone at the same time. I think the only work-around that will work today is to not use the audio API and use the media API instead, just as you said.

I'm sure there is a way for us to work-around this issue on our end, but I suspect it will require a lot of experimentation and won't be trivial. Don't count on this happening anytime soon. But the good news is that the media API actually has the less latency on Android compared to audio, so that's a plus. Also, only the media API can play back recorded audio files on Android, which normally records to the 3GP format which the audio API does not support.

posburn
User offline. Last seen 24 weeks 1 day ago. Offline
Joined: 17 Jun 2010

For what it's worth, this is what I found as well. We released SparkleFish on the Nook Tablet last month. Its basic function is recording audio and playing it back. I too had to use the media interface and not the audio interface. Once I did that, my crashes stopped. I was getting resource busy as well. I was glad that when I wrote the audio portion of the app last year, I put things in different .lua files, isolating the audio calls. Changing to media calls for the Nook Tablet turned out to be pretty easy as a result. I had to add some if statements but at least my codebase is the same for both platforms.

I also found that there is a delay when starting the recording, and that it trims the recording when you stop. I modified the UI in our app so that when you touch the microphone button to start recording, it delays 1-2 seconds. When you touch the microphone button again to stop, it delays 1-2 seconds before actually stopping. The button is animated so that the user knows that something is going on.

Its not as good a solution as we have in the iOS version of the app, but it is workable and I think the UI makes sense.

Paul

Joshua Quick
User offline. Last seen 5 hours 9 min ago. Offline
Staff
Joined: 31 Jan 2011

Thanks for sharing Paul. We do have a bug report written up (case #12503) about recordings getting truncated on Nook. This sounds exactly like what you were running into. I'll write up what you've mentioned as a work-around until we resolve it on our end.

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.