What build does this device have? There is new update for this device. Did you try on this build ? http://community.sprint.com/baw/thread/26322?featured=true
-Dan On Mon, Jan 18, 2010 at 12:02 PM, Rico <rico....@gmail.com> wrote: > When switching between the emulator (which supports 8KHz) and a real > phone like the G1 (which supports 16KHz), I used the following code to > set up a valid AudioRecord object: > > AudioRecord ar; > > // Try to construct at 16KHz > ar = new AudioRecord( > MediaRecorder.AudioSource.MIC, > 16000, > AudioFormat.CHANNEL_CONFIGURATION_MONO, > AudioFormat.ENCODING_PCM_16BIT, > AUDIO_BUFFER_SIZE); > > if (ar.getState() != AudioRecord.STATE_INITIALIZED) { > // Unable to set up at 16KHz, try at 8KHz > ar = new AudioRecord( > MediaRecorder.AudioSource.MIC, > 8000, > AudioFormat.CHANNEL_CONFIGURATION_MONO, > AudioFormat.ENCODING_PCM_16BIT, > AUDIO_BUFFER_SIZE); > } > > This seems to work just fine, and a 16KHz AudioRecord object is > instantiated on the G1, and a 8KHz object is instantiated on the > emulator. > > However, on the Samsung Moment, which only supports 8KHz, > AudioRecord.getState() returns STATE_INITIALIZED when trying to > construct with 16KHz. This ends up causing recording to fail since > it's trying to record at 16KHz, even though the phone doesn't support > it. Also, I don't see any exceptions thrown when I try to wrap the > construction in a try-catch. > > Does anyone know of a better way to detect 16KHz vs. 8KHz capabilities > on the device? > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en >
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en