MMA_StreamPosFrames

[GQ], UQUAD*. (V51)

DESCRIPTION

   Returns current absolute stream position in sample frames. It is exactly
   the number of the whole sample frames pulled from object's output

NOTES

   This is a 64-bit attribute passed by pointer to UQUAD variable, not by
   value.

MMA_StreamPosTime

[GQ], UQUAD*. (V51)

DESCRIPTION

   Returns absolute stream time position in microseconds. This time position
   is strictly based on stream sampling rate, and reflects only the whole
   sample frames already pulled from the object output. The exact formula
   is:

   time_pos = whole_frames_pulled / sample_rate

NOTES

   This is a 64-bit attribute passed by pointer to UQUAD variable, not by
   value.

MMM_Pull

pulls a block of decoded audio data from object. (V50)

SYNOPSIS

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

DESCRIPTION

   Places required amount of sound common format data (in bytes) in the
   specified buffer. Pulls need not to be aligned to the codec output block
   size, all neccessary buffering is done automatically. Note that requested
   number of bytes should be a multiply of sample frame size. If it is not,
   it will be rounded down to the nearest frame boundary, left bytes are
   undefined

INPUTS

   port - number of port is always 1 (the output port).
   buffer - a memory buffer for pulled data, must be aligned to 16-byte
     boundary (preferrably allocated with MediaAllocVec()).
   length - amount of pulled data in bytes. Will be rounded down to the
     nearest frame boundary

RESULT

   Number of bytes pulled actually. If less than requested, check
   MMA_ErrorCode

MMM_Seek

MMM_Seek - moves read position in decoded audio stream. (V51)

SYNOPSIS

   BOOL DoMethod(Object *obj, MMM_Seek, ULONG port, ULONG type, UQUAD *pos);

DESCRIPTION

   The method seeks in the audio stream to the specified absolute position.
   It automatically handles data block switching as well as buffer flushing
   and reloading. For frame seeks, position is specified in frames, for time
   seeks it is specified in microseconds and converted to frames the same
   way as for MMA_StreamPosTime. Note that time to frame conversion here
   uses stream defined sampling rate, not playback sampling rate

INPUTS

   port - number of port is usually 1 (the output port). Seek on the port
     0 is immediately forwarded to the previous connected object.
   type - the class support MMM_SEEK_FRAMES and MMM_SEEK_TIME. Byte seek is
     not allowed.
   pos - absolute seek position in sample frames or microseconds,
     depending on seek type. Note this is 64-bit value passed via pointer

RESULT

   Boolean. Secondary error information is available via MMA_ErrorCode. The
   method can return following errors:
   - MMERR_WRONG_ARGUMENTS - wrong port, unsupported type.
   - MMERR_END_OF_DATA - seek past stream end.
   - MMERR_NOT_SEEKABLE - source stream is not seekable.
   - MMERR_BROKEN_PIPE - nothing is connected to the input port

__background__

HISTORY

   51.4  (10.06.2015)
   - Fixed: succesfull SeekStream() now clears the object error.

   51.3  (12.04.2007)
   - Added optimized scalar routines for mono and stereo streams.

   51.2  (10.04.2007)
   - Working version of multichannel block decoder.

   51.1  (08.04.2007)
   - First release (not working).

DESCRIPTION

  This class is a Reggae decoder for decoding Microsoft ADPCM streams found
  in WAVE subformat 2 files. It is a simple adaptive PCM algorithm 4 bits
  per sample, whith second order prediction filter. The decoder handles
  streams with any number of channels up to 256. An ms-adpcm.decoder object
  has one input (port 0) and one output (port 1). The input accept following
  format:

    - MMF_AUDIO_MS_ADPCM

  On the output an object can produce following formats:

    - MMFC_AUDIO_INT16, 16-bit signed interegs,

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], UQUAD*
   MMA_StreamPosTime        (V51)     [..G.Q], UQUAD*

NEW METHODS

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