MMA_DataFormat

[GQ], STRPTR. (V51)

DESCRIPTION

   Textual description of data format. This class returns "IFF 16SV

MMA_MediaType

[GQ], LONG. (V51)

DESCRIPTION

   Identifier of media type. This class returns MMT_SOUND

MMA_MimeType

[GQ], STRPTR. (V51)

DESCRIPTION

   Returns MIME type string for the object. This class returns
   "audio/x-16sv" string

MMA_Sound_BitsPerSample

[GQ], LONG. (V51)

DESCRIPTION

   Returns number of bits used to represent one sample in source data. This
   class returns 16

MMA_Sound_Channels

[GQ], LONG. (V51)

DESCRIPTION

   Returns number of audio channels in the stream. This class returns 1 for
   mono files, 2 for stereo ones

MMA_Sound_FrameCount

[GQ], QUAD*. (V51)

DESCRIPTION

   Returns number of sample frames (time points) in the stream

NOTES

   This is a 64-bit attribute and is passed as a pointer to 64-bit number.

MMA_Sound_SampleRate

[GQ], LONG. (V51)

DESCRIPTION

   Returns sampling rate of the sound in Hz. For 16SV sounds it is never
   higher than 65535 Hz

MMA_Sound_Volume

[GQ], LONG. (V51)

DESCRIPTION

   Returns default sound volume stored in the stream in 16-bit scale. 0
   means silence, 65536 ($10000) is full volume

MMA_StreamPosBytes

[GQ], QUAD*. (V51)

DESCRIPTION

   Returns current byte position in interleaved audio data

NOTES

   This is a 64-bit attribute and is passed as a pointer to 64-bit number.

MMM_Pull

pulls undecoded 16SV data into a buffer. (V51)

SYNOPSIS

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

DESCRIPTION

   Pulls and stores requested number of bytes of undecoded (but interleaved
   in case of stereo) 16SV 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

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 undecoded 16SV data. (V51)

SYNOPSIS

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

DESCRIPTION

   Seeks in undecoded 16SV data (contents of "BODY" chunk of the stream).
   Backward seek can be performed only if a stream connected on input port
   is seekable. Forward seek on non-seekable streams will be emulated with
   data pulling

INPUTS

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

RESULT

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

__background__

HISTORY

   51.4 (24.10.2015)
   - Fix for per-output metadata.

   51.3 (06.06.2010)
   - MMM_Pull(): setting MMERR_END_OF_DATA for stereo files has been
     delayed. For stereo files MMM_Seek() is called during pulling, so
     error gets cleared for the object.

   51.2 (04.06.2010)
   - Fixed loading mono files, partial buffer fetch at end of stream is
     done properly.

   51.1 (26.08.2009)
   - The first release.

DESCRIPTION

   The class is a demultiplexer for IFF 16SV audio streams. It supports
   uncompressed ones for now (I'm not sure if Fibonacci/exponential
   compression has been ever used for 16SV). Mono and stereo files are
   supported. Because of internal structure of IFF files, IFF 16SV streams
   are limited to 2 GB of data.

   Stereo IFF 16SV files have an unique feature - they store channels
   separately, left first, then right. Then streaming of stereo 16SV is
   impossible. Reggae of course converts separate channels into an usual
   interleaved stereo stream. If the stream is seekable, Reggae will read
   chunks of audio data for left then right channel, jumping in the stream
   back and forth once per chunk. For non-seekable streams all the left
   channel is buferred in memory, then right is read in chunks and
   interleaved with left channel from buffer.

PORTS

   - port 0 - input, MMF_STREAM.
   - port 1 - output, MMF_AUDIO_PCM16BE.