com.beaglebuddy.mpeg

## Class MPEGAudioSamples

- java.lang.Object
- - com.beaglebuddy.mpeg.MPEGAudioSamples

-     public class MPEGAudioSamples
      extends java.lang.Object

  The MPEG audio samples follows the MPEG side information in an MPEG audio frame. It contains the actual digital audio samples used by mp3 players to produce the sound.

  See Also:
    `MPEGFrame`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MPEGAudioSamples()` default constructor.
    `MPEGAudioSamples(byte[] bytes, int index)` constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getData()` gets the raw digital audio samples stored in the mpeg audio frame.
    `int` | `getSize()` gets the size (in bytes) of the raw binary data comprising the mpeg audio samples.
    `java.lang.String` | `toString()` gets a string representation of the mpeg audio frame's audio samples.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### MPEGAudioSamples

          public MPEGAudioSamples()

      default constructor.

    - #### MPEGAudioSamples

          public MPEGAudioSamples(byte[] bytes,
                          int index)
                           throws ParseException

      constructor.
      Parameters:
        `bytes` - the raw bytes of an MPEG audio frame.
        `index` - the offset into the bytes of the MPEG audio frame where the audio samples begin.
      Throws:
        `ParseException` - if the offset into the byte stream is larger than the size of the mpeg audio frame.

  - ### Method Detail

    - #### getData

          public byte[] getData()

      gets the raw digital audio samples stored in the mpeg audio frame.
      Returns:
        the raw digital audio samples stored in the mpeg audio frame.

    - #### getSize

          public int getSize()

      gets the size (in bytes) of the raw binary data comprising the mpeg audio samples.
      Returns:
        the size (in bytes) of the raw binary data comprising the mpeg audio samples.

    - #### toString

          public java.lang.String toString()

      gets a string representation of the mpeg audio frame's audio samples.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a string representation of the mpeg audio frame's audio samples.