1. Download our Official Android App: Forums for Android!

How to Read Samples of an Audio File?

Discussion in 'Android Apps & Games' started by Testing Test, Mar 31, 2011.

  1. Testing Test

    Testing Test Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Mar 31, 2011

    Mar 31, 2011
    1
    0
    5
    Hi,

    I am a beginner to android SDK and have almost no idea of using it. But I have to do it in any case.

    What I want is to select a .wav or .mp3 file stored on my android 2.2 phone. I want to read the samples of the audio file like 16 bit or 8 bit sample (whichever possible). Then I need to modify it and save the modified file back with some other name.

    Please guide me that how can I get started by reading a .wav or .mp3 and reading its samples.

    P.S.: I am a beginner. So, don't try to be over smart :)

    Thank you.
     

    Advertisement

  2. alostpacket

    alostpacket Over Macho Grande?
    Rank:
    None
    Points:
    513
    Posts:
    7,972
    Joined:
    Nov 29, 2009

    Nov 29, 2009
    7,972
    3,603
    513
    Android App Developer
    NY
    I dont think there is any real-time access to audio data samples in the SDK or even the NDK at the moment. You can get the file bytes easy enough, but you need to understand what they represent. This is very, very far from a beginner's topic though. Just understanding how PCM data works is very complex, not to mention how mpeg 3 encoding works.

    Anyways, I googled a bit and found libpd seems promising:

    Some links:
    libpd - Libpd - Open wiki - Gitorious

    http://createdigitalmusic.com/2010/...-on-an-iphone-or-android-and-everywhere-free/


    I'd also suggest you read up on PCM data. Just some possible places to start.

    hth
     

Share This Page

Loading...