×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    3

    Record Audio in raw audio format and not in amr

    You may have heard this question before many times; though I need a solution.

    1-) I have tried to capture audio on Series 40 6th edition SDK on raw audio format; I have tried encoding=raw; encoding=pcm; encoding=wav all of them failed. Even encoding=amr option fails (if you dont state encoding the format is amr default). My query string is like below.

    m_phoneMicrophone = Manager.createPlayer("capture://audio?encoding=pcm"); or
    m_phoneMicrophone = Manager.createPlayer("capture://audio?encoding=raw"); or
    m_phoneMicrophone = Manager.createPlayer("capture://audio?encoding=wav"); or
    m_phoneMicrophone = Manager.createPlayer("capture://audio?encoding=audio/raw"); or
    m_phoneMicrophone = Manager.createPlayer("capture://audio?encoding=audio/pcm"); or
    m_phoneMicrophone = Manager.createPlayer("capture://audio?encoding=audio/wav"); or

    only

    m_phoneMicrophone = Manager.createPlayer("capture://audio"); //works as default amr encoding.

    2-) I gave up finding an answer to my above question and forgot about performance boundries and searched for JAVAMe arm decoder. I could not find a codec source code

    3-) I tried
    m_phoneMicrophone = Manager.createPlayer("capture://audio?devmic0")

    and failed

    Has anyone come up with a solution? According to my logic if the phone is giving me an amr encoded audio stream; it should more easily give me a raw audio stream? I am not going to record the audio I will just process it with 1s sampling rate for detecting if a noise is present in the ambience...

  2. #2
    Registered User
    Join Date
    Dec 2009
    Posts
    3

    Question Re: Record Audio in raw audio format and not in amr

    According to SDK dcoumentation I found out audio capture is done in amr encoding. But it is not mentioning the word "only" so I still try to find ways to capture raw audio.

    You can play the following audio content types from files:
    application/vnd.nokia.ringing-tone
    audio/3gpp
    audio/amr
    audio/amr-wb
    audio/mid
    audio/midi
    audio/mobile-xmf
    audio/sp-midi
    audio/x-amr
    audio/x-mid
    audio/x-midi
    audio/x-wav
    audio/mp3
    audio/mp4(only amr codec)

    You can play these content types on the device but not in the SDK:
    audio/3gpp2
    audio/aac
    audio/x-ms-wma

    If you attempt to play one of these content types in the SDK, the SDK sends an error message to the Diagnostics log.

    The device supports audio capture from its microphone and the FM radio and stores it as audio/amr content. The SDK does not support a microphone. However, it simulates recording from a microphone using pre-recorded content. The SDK does not support recording from the FM radio.

    If the content is in stereo, the SDK plays it in stereo on the computer’s sound card. However, the SDK does not emulate the enhanced stereo separation supported on the device.

  3. #3
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Record Audio in raw audio format and not in amr

    You can find all the types support for capture on your device:

    Code:
    String[] types = Manager.getSupportedContentTypes("capture");
    Graham.

  4. #4
    Registered User
    Join Date
    Dec 2009
    Posts
    3

    Re: Record Audio in raw audio format and not in amr

    I have already done this the result is video and audio which doesnt mean anything at all in my case.

    Quote Originally Posted by grahamhughes View Post
    You can find all the types support for capture on your device:

    Code:
    String[] types = Manager.getSupportedContentTypes("capture");
    Graham.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •