Android: Steps for reading a wav file
<p>Hey i have imported WavFile from <a href="http://www.labbookpages.co.uk/audio/javaWavFiles.html" rel="nofollow">http://www.labbookpages.co.uk/audio/javaWavFiles.html</a> aim is to plot a waveform from the data retrieved from the wave file that i have read.
However i dont know which variable represents the data retrieved from the wav file.
Can anyone please help... I found many posts but none of them have explained the concepts clearly...</p>

<p>This is my code:</p>

<pre><code>try {
    WavFile fp = WavFile.openWavFile(myFile);
    Log.d(TAG, "Wav file found");
    fp.display();

    // Get the number of audio channels in the wav file
    int numChannels = fp.getNumChannels();

    // Create a buffer of 100 frames
    double[] buffer = new double[100 * numChannels];

    int framesRead;
    do
    {
        // Read frames into buffer
        framesRead = fp.readFrames(buffer, 100);


        for (int s=0 ; s&lt;framesRead * numChannels ; s++)
        {
            Log.d(TAG, "DATA:"+buffer[s]);

            //does buffer[s] has data which i need to plot the waveform

        }
    } while (framesRead != 0);

    // Close the wavFile
    fp.close();

    catch (IOException e) {

        Log.d(TAG, "IOException occoured");
        e.printStackTrace();
    } catch (WavFileException e) {

        Log.d(TAG, "WavFileException occoured");
        e.printStackTrace();
    } 
</code></pre>

<p>}</p>

<p>Does buffer[s] has data which i need to plot the waveform??</p>
