MMA_Sound_BitsPerSample

[GQ], LONG. (V51)

DESCRIPTION

   Decoder bit resolution. For this class it is 16 always

MMA_StreamPosFrames

[GQ], QUAD*. (V51)

DESCRIPTION

   Returns number of sample frames (time points) pulled from output

NOTES

   This is a 64-bit attribute. Pointer passed to OM_GET must point to a
   64-bit variable. When using macros, use MediaGetPort64().

MMA_StreamPosTime

[GQ], QUAD*. (V51)

DESCRIPTION

   Current output stream position in microseconds

NOTES

   This is a 64-bit attribute. Pointer passed to OM_GET must point to a
   64-bit variable. When using macros, use MediaGetPort64().

MMM_Pull

pulls decoded audio PCM data. (V51)

SYNOPSIS

   LONG DoMethod(Object *obj, MMM_Pull, LONG port, APTR buffer, LONG
   length);

DESCRIPTION

   Pulls specified amount of decoded PCM audio data

INPUTS

   port - this method may be only invoked on output port (port 1).
   buffer - pointer to destination buffer. Must be aligned to 16 bytes,
     preferrably allocated with MediaAllocVec().
   length - number of bytes to store in buffer. This number of bytes is
     rounded down to sample frame boundary (2 bytes for mono, 4 for stereo

RESULT

    Number of bytes stored. Zero means end of data, -1 means error. Error
    code may be obtained by getting MMA_ErrorCode attribute on the object

MMM_Seek

seeks in decoded audio stream. (V51)

SYNOPSIS

   BOOL DoMethod(Object *obj, MMM_Seek, LONG port, LONG type, QUAD
   *position);

DESCRIPTION

   Seeks in decoded audio stream. It may be either frame seek (position is
   in PCM sample frames), or time seek (position in microseconds). Current
   seek is performed with MPEGA_seek() so is not very precise (about 0.1 s

INPUTS

   port - this method may be only invoked on output port (port 1).
   type - type of seek, MMM_SEEK_FRAMES or MMM_SEEK_TIME allowed here.
   position - requested position in data, relative to the beginning of
     output

RESULT

   Boolean, TRUE for success. If FALSE, error code may be obtained by
   getting MMA_ErrorCode attribute

NOTES

   Backward seek will fail if data source is not seekable. Forward seek in
   this case is safe, but will be slow for large offsets.

SEE ALSO

__background__

HISTORY

   51.3   (24.08.2012)
   - If mpegaudio.demuxer provides known stream length, the mpega.library
     decoded output is cut or padded with zeros to match this length exactly.

   51.2   (25.02.2012)
   - MMM_Pull() does not fail on MMERR_END_OF_DATA.

   51.1   (25.08.2009)
   - The first release.

DESCRIPTION

   The class is a decoder for MPEG audio audio streams. The decoding is done
   with mpega.library.

   An object of this class has one input (port 0), which accepts
   MMF_AUDIO_MPEG data type. It has also one output (port 1), which has
   MMFC_AUDIO_INT16 type.

NEW ATTRIBUTES

   Attributes applicability:
     I - may be set at creation time.
     S - may be set on an existing object.
     G - may be get from an object.
     P - may be set for an object's port.
     Q - may be queried from an object's port.

   MMA_StreamPosFrames       (V51)   [..G.Q], QUAD*
   MMA_StreamPosTime         (V51)   [..G.Q], QUAD*
   MMA_Sound_BitsPerSample   (V51)   [..G.Q], LONG

NEW METHODS

   MMM_Pull(port, buffer, length)  (V51)
   MMM_Seek(port, type, position)  (V51)