ScummVM API documentation
Audio Namespace Reference

Classes

class  ADPCMStream
 
class  AIFFHeader
 
class  APCStream
 
class  Apple_ADPCMStream
 
class  Audio3DO_ADP4_Stream
 
class  Audio3DO_SDX2_Stream
 
struct  audio_3DO_ADP4_PersistentSpace
 
struct  audio_3DO_SDX2_PersistentSpace
 
class  AudioStream
 
class  Chip
 
class  Codec
 
class  DK3_ADPCMStream
 
class  DVI_ADPCMStream
 
class  EmulatedChip
 
class  Ima_ADPCMStream
 
class  Infogrames
 
class  LoopableAudioStream
 
class  LoopingAudioStream
 
class  MidiDriver_Miles_Midi
 
class  MidiDriver_Miles_Xmidi_Timbres
 
class  MidiPlayer
 
struct  MilesMT32InstrumentEntry
 
class  Mixer
 
class  MixerImpl
 
class  Mp3PspStream
 
class  MS_ADPCMStream
 
class  MSIma_ADPCMStream
 
class  Oki_ADPCMStream
 
class  PacketizedAudioStream
 
class  Paula
 
class  PCSpeaker
 
class  QueuingAudioStream
 
class  QuickTimeAudioDecoder
 
class  RateConverter
 
class  RealChip
 
class  RewindableAudioStream
 
class  SeekableAudioStream
 
class  SoundHandle
 
class  StatelessPacketizedAudioStream
 
class  SubLoopingAudioStream
 
class  SubSeekableAudioStream
 
class  Timestamp
 
struct  VocBlockHeader
 
struct  VocFileHeader
 
class  VocStream
 
class  WMACodec
 
struct  WMACoefHuffmanParam
 
class  XA_ADPCMStream
 
class  XanDPCMStream
 

Typedefs

typedef byte *(* LoadSoundFxInstrumentCallback) (const char *name, uint32 *size)
 
typedef int16 st_sample_t
 
typedef uint16 st_volume_t
 
typedef uint32 st_size_t
 
typedef uint32 st_rate_t
 

Enumerations

enum  ADPCMType {
  kADPCMOki, kADPCMMSIma, kADPCMMS, kADPCMDVI,
  kADPCMApple, kADPCMDK3, kADPCMXA
}
 
enum  RawFlags {
  FLAG_UNSIGNED = 1 << 0, FLAG_16BITS = 1 << 1, FLAG_24BITS = 1 << 2, FLAG_LITTLE_ENDIAN = 1 << 3,
  FLAG_STEREO = 1 << 4
}
 
enum  WaveCompressionType {
  kWaveFormatNone = 0x0000, kWaveFormatPCM = 0x0001, kWaveFormatMSADPCM = 0x0002, kWaveFormatALawPCM = 0x0006,
  kWaveFormatMuLawPCM = 0x0007, kWaveFormatMSIMAADPCM = 0x0011, kWaveFormatMP3 = 0x0055, kWaveFormatDK3 = 0x0062,
  kWaveFormatMSIMAADPCM2 = 0x0069, kWaveFormatWMAv2 = 0x0161, kWaveFormatXanDPCM = 0x594a
}
 
enum  MilesVersion { MILES_VERSION_2 = 2, MILES_VERSION_3 }
 
enum  { ST_SAMPLE_MAX = 0x7fffL, ST_SAMPLE_MIN = (-ST_SAMPLE_MAX - 1L) }
 

Functions

AudioStreammakeLoopingAudioStream (RewindableAudioStream *stream, uint loops)
 
AudioStreammakeLoopingAudioStream (SeekableAudioStream *stream, Timestamp start, Timestamp end, uint loops)
 
QueuingAudioStreammakeQueuingAudioStream (int rate, bool stereo)
 
Timestamp convertTimeToStreamPos (const Timestamp &where, int rate, bool isStereo)
 
AudioStreammakeLimitingAudioStream (AudioStream *parentStream, const Timestamp &length, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::YES)
 
AudioStreammakeNullAudioStream ()
 
AudioStreammakeSilentAudioStream (int rate, bool stereo)
 
RewindableAudioStreammake3DO_ADP4AudioStream (Common::SeekableReadStream *stream, uint16 sampleRate, bool stereo, uint32 *audioLengthMSecsPtr=NULL, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::YES, audio_3DO_ADP4_PersistentSpace *persistentSpacePtr=NULL)
 
RewindableAudioStreammake3DO_SDX2AudioStream (Common::SeekableReadStream *stream, uint16 sampleRate, bool stereo, uint32 *audioLengthMSecsPtr=NULL, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::YES, audio_3DO_SDX2_PersistentSpace *persistentSpacePtr=NULL)
 
SeekableAudioStreammakeADPCMStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, ADPCMType type, int rate, int channels, uint32 blockAlign=0)
 
PacketizedAudioStreammakePacketizedADPCMStream (ADPCMType type, int rate, int channels, uint32 blockAlign=0)
 
RewindableAudioStreammakeAIFFStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse)
 
PacketizedAudioStreammakeAPCStream (Common::SeekableReadStream &header)
 
APCStreammakeAPCStream (uint sampleRate, bool stereo)
 
SeekableAudioStreammakeASFStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse)
 
SeekableAudioStreammakeALawStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, int rate, int channels)
 
SeekableAudioStreammakeMuLawStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, int rate, int channels)
 
AudioStreammake8SVXStream (Common::ReadStream &stream, bool loop)
 
SeekableAudioStreammakeMacSndStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse)
 
SeekableAudioStreammakeQuickTimeStream (const Common::Path &filename)
 
SeekableAudioStreammakeQuickTimeStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::YES)
 
SeekableAudioStreammakeRawStream (const byte *buffer, uint32 size, int rate, byte flags, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::YES)
 
SeekableAudioStreammakeRawStream (Common::SeekableReadStream *stream, int rate, byte flags, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::YES)
 
PacketizedAudioStreammakePacketizedRawStream (int rate, byte flags)
 
int getSampleRateFromVOCRate (int vocSR)
 
SeekableAudioStreammakeVOCStream (Common::SeekableReadStream *stream, byte flags, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::NO)
 
bool loadWAVFromStream (Common::SeekableReadStream &stream, int &size, int &rate, byte &flags, uint16 *wavType=0, int *blockAlign=0, int *samplesPerBlock=0)
 
SeekableAudioStreammakeWAVStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse)
 
RewindableAudioStreammakeXAStream (Common::SeekableReadStream *stream, int rate, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::YES)
 
MidiDriver_MultisourceMidiDriver_Miles_AdLib_create (const Common::Path &filenameAdLib, const Common::Path &filenameOPL3, Common::SeekableReadStream *streamAdLib=nullptr, Common::SeekableReadStream *streamOPL3=nullptr)
 
MidiDriver_Miles_MidiMidiDriver_Miles_MT32_create (const Common::Path &instrumentDataFilename)
 
MidiDriver_Miles_MidiMidiDriver_Miles_MIDI_create (MusicType midiType, const Common::Path &instrumentDataFilename)
 
RewindableAudioStreammakeModXmS3mStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, int initialPos=0, int rate=48000, int interpolation=0)
 
bool probeModXmS3m (Common::SeekableReadStream *stream)
 
AudioStreammakeProtrackerStream (Common::SeekableReadStream *stream, int offs=0, int rate=44100, bool stereo=true, Modules::Module **module=0)
 
AudioStreammakeRjp1Stream (Common::SeekableReadStream *songData, Common::SeekableReadStream *instrumentsData, int num, int rate=44100, bool stereo=true)
 
AudioStreammakeSoundFxStream (Common::SeekableReadStream *data, LoadSoundFxInstrumentCallback loadCb, int rate=44100, bool stereo=true, bool repeat=true, int periodScaleDivisor=1)
 
RewindableAudioStreammakeUniversalTrackerStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, int rate=48000)
 
RateConvertermakeRateConverter (st_rate_t inRate, st_rate_t outRate, bool inStereo, bool outStereo, bool reverseStereo)
 

Variables

struct Audio::VocFileHeader PACKED_STRUCT
 
const uint16 wmaCriticalFreqs [25]
 
const uint32 hgainHuffCodes [37]
 
const uint8 hgainHuffBits [37]
 
const uint32 scaleHuffCodes [121]
 
const uint8 scaleHuffBits [121]
 
const float lspCodebook [kLSPCoefCount][16]
 

Detailed Description

Internal interfaces to the ADPCM decoders.

These can be used to make custom ADPCM decoder subclasses, or to at least share some common data tables between various ADPCM decoder implementations.

This file and all files in this directory were imported from the SCI engine and lightly modified to match DGDS, removing:

  • SCI0, SCI2, and SCI32 code
  • game-specific code
  • some unsupported devices

The original games also used lightly modified SCI midi drivers.

Enumeration Type Documentation

◆ RawFlags

Various flags which can be bit-ORed and then passed to makeRawStream and some other AudioStream factories to control their behavior.

Engine authors are advised not to rely on a certain value or order of these flags (in particular, do not store them verbatim in savestates).

Enumerator
FLAG_UNSIGNED 

unsigned samples (default: signed)

FLAG_16BITS 

sound is 16 bits wide (default: 8bit)

FLAG_24BITS 

sound is 24 bits wide (default: 8bit)

FLAG_LITTLE_ENDIAN 

samples are little endian (default: big endian)

FLAG_STEREO 

sound is in stereo (default: mono)

Function Documentation

◆ make3DO_ADP4AudioStream()

RewindableAudioStream* Audio::make3DO_ADP4AudioStream ( Common::SeekableReadStream stream,
uint16  sampleRate,
bool  stereo,
uint32 *  audioLengthMSecsPtr = NULL,
DisposeAfterUse::Flag  disposeAfterUse = DisposeAfterUse::YES,
audio_3DO_ADP4_PersistentSpace persistentSpacePtr = NULL 
)

Try to decode 3DO ADP4 data from the given seekable stream and create a SeekableAudioStream from that data.

Parameters
streamthe SeekableReadStream from which to read the 3DO SDX2 data sample rate if it's stereo or mono pointer to a uint32 variable, that is supposed to get the length of the audio in milliseconds disposeAfterUse whether to delete the stream after use pointer to the persistent space structure
Returns
a new SeekableAudioStream, or NULL, if an error occurred

◆ make3DO_SDX2AudioStream()

RewindableAudioStream* Audio::make3DO_SDX2AudioStream ( Common::SeekableReadStream stream,
uint16  sampleRate,
bool  stereo,
uint32 *  audioLengthMSecsPtr = NULL,
DisposeAfterUse::Flag  disposeAfterUse = DisposeAfterUse::YES,
audio_3DO_SDX2_PersistentSpace persistentSpacePtr = NULL 
)

Try to decode 3DO SDX2 data from the given seekable stream and create a SeekableAudioStream from that data.

Parameters
streamthe SeekableReadStream from which to read the 3DO SDX2 data sample rate if it's stereo or mono pointer to a uint32 variable, that is supposed to get the length of the audio in milliseconds disposeAfterUse whether to delete the stream after use pointer to the persistent space structure
Returns
a new SeekableAudioStream, or NULL, if an error occurred

◆ makeADPCMStream()

SeekableAudioStream* Audio::makeADPCMStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse,
uint32  size,
ADPCMType  type,
int  rate,
int  channels,
uint32  blockAlign = 0 
)

Takes an input stream containing ADPCM compressed sound data and creates a RewindableAudioStream from that.

Parameters
streamthe SeekableReadStream from which to read the ADPCM data
disposeAfterUsewhether to delete the stream after use
sizehow many bytes to read from the stream (0 = all)
typethe compression type used
ratethe sampling rate
channelsthe number of channels
blockAlignblock alignment ???
Returns
a new RewindableAudioStream, or NULL, if an error occurred

◆ makePacketizedADPCMStream()

PacketizedAudioStream* Audio::makePacketizedADPCMStream ( ADPCMType  type,
int  rate,
int  channels,
uint32  blockAlign = 0 
)

Creates a PacketizedAudioStream that will automatically queue packets as individual AudioStreams like returned by makeADPCMStream.

Due to the ADPCM types not necessarily supporting stateless streaming, OKI, XA and DVI are not supported by this function and will return NULL.

Parameters
typethe compression type used
ratethe sampling rate
channelsthe number of channels
blockAlignblock alignment ???
Returns
The new PacketizedAudioStream or NULL, if the type isn't supported.

◆ makeAIFFStream()

RewindableAudioStream* Audio::makeAIFFStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse 
)

Try to load an AIFF from the given seekable stream and create an AudioStream from that data.

Parameters
streamthe SeekableReadStream from which to read the AIFF data
disposeAfterUsewhether to delete the stream after use
Returns
a new SeekableAudioStream, or NULL, if an error occurred

◆ makeAPCStream() [1/2]

PacketizedAudioStream* Audio::makeAPCStream ( Common::SeekableReadStream header)

Create a PacketizedAudioStream that decodes Cryo APC sound from stream

Parameters
headerThe stream containing the header queuePacket must be called after
Returns
A new PacketizedAudioStream, or nullptr on error

◆ makeAPCStream() [2/2]

APCStream* Audio::makeAPCStream ( uint  sampleRate,
bool  stereo 
)

Create a PacketizedAudioStream that decodes Cryo APC sound using predefined settings This is used by HNM6 video decoder and shouldn't be called elsewhere.

Parameters
sampleRateThe sample rate of the stream
stereoWhether the stream will be stereo
Returns
A new APCStream

◆ makeASFStream()

SeekableAudioStream* Audio::makeASFStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse 
)

Try to load a ASF from the given seekable stream and create a RewindableAudioStream from that data.

Parameters
streamThe SeekableReadStream from which to read the ASF data.
disposeAfterUseWhether to delete the stream after use.
Returns
A new SeekableAudioStream, or 0, if an error occurred.

◆ makeALawStream()

SeekableAudioStream* Audio::makeALawStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse,
int  rate,
int  channels 
)

Takes an input stream containing G711 A-law compressed sound data and creates a SeekableAudioStream from that.

Parameters
streamthe SeekableReadStream from which to read the PCM data
disposeAfterUsewhether to delete the stream after use
ratethe sampling rate
channelsthe number of channels
Returns
a new SeekableAudioStream, or NULL, if an error occurred

◆ makeMuLawStream()

SeekableAudioStream* Audio::makeMuLawStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse,
int  rate,
int  channels 
)

Takes an input stream containing G711 μ-law compressed sound data and creates a SeekableAudioStream from that.

Parameters
streamthe SeekableReadStream from which to read the PCM data
disposeAfterUsewhether to delete the stream after use
ratethe sampling rate
channelsthe number of channels
Returns
a new SeekableAudioStream, or NULL, if an error occurred

◆ makeMacSndStream()

SeekableAudioStream* Audio::makeMacSndStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse 
)

Try to load a Mac snd resource from the given seekable stream and create a SeekableAudioStream from that data.

Parameters
streamthe SeekableReadStream from which to read the snd data
disposeAfterUsewhether to delete the stream after use
Returns
a new SeekableAudioStream, or NULL, if an error occurred

◆ makeQuickTimeStream() [1/2]

SeekableAudioStream* Audio::makeQuickTimeStream ( const Common::Path filename)

Try to load a QuickTime sound file from the given file name and create a SeekableAudioStream from that data.

Parameters
filenamethe filename of the file from which to read the data
Returns
a new SeekableAudioStream, or NULL, if an error occurred

◆ makeQuickTimeStream() [2/2]

SeekableAudioStream* Audio::makeQuickTimeStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse = DisposeAfterUse::YES 
)

Try to load a QuickTime sound file from the given seekable stream and create a SeekableAudioStream from that data.

Parameters
streamthe SeekableReadStream from which to read the data
disposeAfterUsewhether to delete the stream after use
Returns
a new SeekableAudioStream, or NULL, if an error occurred

◆ makeRawStream() [1/2]

SeekableAudioStream* Audio::makeRawStream ( const byte *  buffer,
uint32  size,
int  rate,
byte  flags,
DisposeAfterUse::Flag  disposeAfterUse = DisposeAfterUse::YES 
)

Creates an audio stream, which plays from the given buffer.

Parameters
bufferBuffer to play from.
sizeSize of the buffer in bytes.
rateRate of the sound data.
flagsAudio flags combination.
See also
RawFlags
Parameters
disposeAfterUseWhether to free the buffer after use (with free!).
Returns
The new SeekableAudioStream (or 0 on failure).

◆ makeRawStream() [2/2]

SeekableAudioStream* Audio::makeRawStream ( Common::SeekableReadStream stream,
int  rate,
byte  flags,
DisposeAfterUse::Flag  disposeAfterUse = DisposeAfterUse::YES 
)

Creates an audio stream, which plays from the given stream.

Parameters
streamStream object to play from.
rateRate of the sound data.
flagsAudio flags combination.
See also
RawFlags
Parameters
disposeAfterUseWhether to delete the stream after use.
Returns
The new SeekableAudioStream (or 0 on failure).

◆ makePacketizedRawStream()

PacketizedAudioStream* Audio::makePacketizedRawStream ( int  rate,
byte  flags 
)

Creates a PacketizedAudioStream that will automatically queue packets as individual AudioStreams like returned by makeRawStream.

Parameters
rateRate of the sound data.
flagsAudio flags combination.
See also
RawFlags
Returns
The new PacketizedAudioStream.

◆ getSampleRateFromVOCRate()

int Audio::getSampleRateFromVOCRate ( int  vocSR)

Take a sample rate parameter as it occurs in a VOC sound header, and return the corresponding sample frequency.

This method has special cases for the standard rates of 11025 and 22050 kHz, which due to limitations of the format, cannot be encoded exactly in a VOC file. As a consequence, many game files have sound data sampled with those rates, but the VOC marks them incorrectly as 11111 or 22222 kHz. This code works around that and "unrounds" the sampling rates.

◆ makeVOCStream()

SeekableAudioStream* Audio::makeVOCStream ( Common::SeekableReadStream stream,
byte  flags,
DisposeAfterUse::Flag  disposeAfterUse = DisposeAfterUse::NO 
)

Try to load a VOC from the given seekable stream and create an AudioStream from that data. Currently this function only supports uncompressed raw PCM data.

This does not use any of the looping features of VOC files!

◆ loadWAVFromStream()

bool Audio::loadWAVFromStream ( Common::SeekableReadStream stream,
int &  size,
int &  rate,
byte &  flags,
uint16 *  wavType = 0,
int *  blockAlign = 0,
int *  samplesPerBlock = 0 
)

Try to load a WAVE from the given seekable stream. Returns true if successful. In that case, the stream's seek position will be set to the start of the audio data, and size, rate and flags contain information necessary for playback. Currently this function supports uncompressed raw PCM data, MS IMA ADPCM and MS ADPCM (uses makeADPCMStream internally).

◆ makeWAVStream()

SeekableAudioStream* Audio::makeWAVStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse 
)

Try to load a WAVE from the given seekable stream and create an AudioStream from that data. Currently this function supports uncompressed raw PCM data, MS IMA ADPCM and MS ADPCM (uses makeADPCMStream internally).

This function uses loadWAVFromStream() internally.

Parameters
streamthe SeekableReadStream from which to read the WAVE data
disposeAfterUsewhether to delete the stream after use
Returns
a new SeekableAudioStream, or NULL, if an error occurred

◆ makeXAStream()

RewindableAudioStream* Audio::makeXAStream ( Common::SeekableReadStream stream,
int  rate,
DisposeAfterUse::Flag  disposeAfterUse = DisposeAfterUse::YES 
)

Takes an input stream containing XA ADPCM sound data and creates a RewindableAudioStream from that.

Parameters
streamthe SeekableReadStream from which to read the XA ADPCM data
ratethe sampling rate
disposeAfterUsewhether to delete the stream after use.
Returns
a new RewindableAudioStream, or NULL, if an error occurred

◆ makeModXmS3mStream()

RewindableAudioStream* Audio::makeModXmS3mStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse,
int  initialPos = 0,
int  rate = 48000,
int  interpolation = 0 
)

Factory function for ModXmS3mStream streams. Reads all data from the given ReadStream and creates an AudioStream from this. No reference to the 'stream' object is kept, so you can safely delete it after invoking this factory.

This stream may be infinitely long if the mod contains a loop.

Parameters
streamthe ReadStream from which to read the tracker sound data
disposeAfterUsewhether to delete the stream after use
initialPosinitial track to start playback from
ratesample rate
interpolationinterpolation effect level

◆ probeModXmS3m()

bool Audio::probeModXmS3m ( Common::SeekableReadStream stream)

Check if the stream is one of the supported formats

◆ makeUniversalTrackerStream()

RewindableAudioStream* Audio::makeUniversalTrackerStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse,
int  rate = 48000 
)

Create a new AudioStream from the Impulse Tracker data in the given stream.

Parameters
streamthe SeekableReadStream from which to read the Ogg Vorbis data
disposeAfterUsewhether to delete the stream after use
Returns
a new AudioStream, or NULL, if an error occurred

Variable Documentation

◆ wmaCriticalFreqs

const uint16 Audio::wmaCriticalFreqs[25]
Initial value:
= {
100, 200, 300, 400, 510, 630, 770, 920,
1080, 1270, 1480, 1720, 2000, 2320, 2700, 3150,
3700, 4400, 5300, 6400, 7700, 9500, 12000, 15500,
24500
}

◆ hgainHuffCodes

const uint32 Audio::hgainHuffCodes[37]
Initial value:
= {
0x00003, 0x002E7, 0x00001, 0x005CD, 0x0005D, 0x005C9, 0x0005E, 0x00003,
0x00016, 0x0000B, 0x00001, 0x00006, 0x00001, 0x00006, 0x00004, 0x00005,
0x00004, 0x00007, 0x00003, 0x00007, 0x00004, 0x0000A, 0x0000A, 0x00002,
0x00003, 0x00000, 0x00005, 0x00002, 0x0005F, 0x00004, 0x00003, 0x00002,
0x005C8, 0x000B8, 0x005CA, 0x005CB, 0x005CC
}

◆ hgainHuffBits

const uint8 Audio::hgainHuffBits[37]
Initial value:
= {
10, 12, 10, 13, 9, 13, 9, 8,
7, 5, 5, 4, 4, 3, 3, 3,
4, 3, 4, 4, 5, 5, 6, 8,
7, 10, 8, 10, 9, 8, 9, 9,
13, 10, 13, 13, 13
}

◆ scaleHuffCodes

const uint32 Audio::scaleHuffCodes[121]
Initial value:
= {
0x3FFE8, 0x3FFE6, 0x3FFE7, 0x3FFE5, 0x7FFF5, 0x7FFF1, 0x7FFED, 0x7FFF6,
0x7FFEE, 0x7FFEF, 0x7FFF0, 0x7FFFC, 0x7FFFD, 0x7FFFF, 0x7FFFE, 0x7FFF7,
0x7FFF8, 0x7FFFB, 0x7FFF9, 0x3FFE4, 0x7FFFA, 0x3FFE3, 0x1FFEF, 0x1FFF0,
0x0FFF5, 0x1FFEE, 0x0FFF2, 0x0FFF3, 0x0FFF4, 0x0FFF1, 0x07FF6, 0x07FF7,
0x03FF9, 0x03FF5, 0x03FF7, 0x03FF3, 0x03FF6, 0x03FF2, 0x01FF7, 0x01FF5,
0x00FF9, 0x00FF7, 0x00FF6, 0x007F9, 0x00FF4, 0x007F8, 0x003F9, 0x003F7,
0x003F5, 0x001F8, 0x001F7, 0x000FA, 0x000F8, 0x000F6, 0x00079, 0x0003A,
0x00038, 0x0001A, 0x0000B, 0x00004, 0x00000, 0x0000A, 0x0000C, 0x0001B,
0x00039, 0x0003B, 0x00078, 0x0007A, 0x000F7, 0x000F9, 0x001F6, 0x001F9,
0x003F4, 0x003F6, 0x003F8, 0x007F5, 0x007F4, 0x007F6, 0x007F7, 0x00FF5,
0x00FF8, 0x01FF4, 0x01FF6, 0x01FF8, 0x03FF8, 0x03FF4, 0x0FFF0, 0x07FF4,
0x0FFF6, 0x07FF5, 0x3FFE2, 0x7FFD9, 0x7FFDA, 0x7FFDB, 0x7FFDC, 0x7FFDD,
0x7FFDE, 0x7FFD8, 0x7FFD2, 0x7FFD3, 0x7FFD4, 0x7FFD5, 0x7FFD6, 0x7FFF2,
0x7FFDF, 0x7FFE7, 0x7FFE8, 0x7FFE9, 0x7FFEA, 0x7FFEB, 0x7FFE6, 0x7FFE0,
0x7FFE1, 0x7FFE2, 0x7FFE3, 0x7FFE4, 0x7FFE5, 0x7FFD7, 0x7FFEC, 0x7FFF4,
0x7FFF3
}

◆ scaleHuffBits

const uint8 Audio::scaleHuffBits[121]
Initial value:
= {
18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 18, 19, 18, 17, 17, 16, 17, 16, 16, 16, 16, 15, 15,
14, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 11, 12, 11, 10, 10,
10, 9, 9, 8, 8, 8, 7, 6, 6, 5, 4, 3, 1, 4, 4, 5,
6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12,
12, 13, 13, 13, 14, 14, 16, 15, 16, 15, 18, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19
}

◆ lspCodebook

const float Audio::lspCodebook[kLSPCoefCount][16]
Initial value:
= {
{ 1.98732877f, 1.97944528f, 1.97179088f, 1.96260549f, 1.95038374f, 1.93336114f, 1.90719232f, 1.86191415f, },
{ 1.97260000f, 1.96083160f, 1.94982586f, 1.93806164f, 1.92516608f, 1.91010199f, 1.89232331f, 1.87149812f,
1.84564818f, 1.81358067f, 1.77620070f, 1.73265264f, 1.67907855f, 1.60959081f, 1.50829650f, 1.33120330f, },
{ 1.90109110f, 1.86482426f, 1.83419671f, 1.80168452f, 1.76650116f, 1.72816320f, 1.68502700f, 1.63738256f,
1.58501580f, 1.51795181f, 1.43679906f, 1.33950585f, 1.24176208f, 1.12260729f, 0.96749668f, 0.74048265f, },
{ 1.76943864f, 1.67822463f, 1.59946365f, 1.53560582f, 1.47470796f, 1.41210167f, 1.34509536f, 1.27339507f,
1.19303814f, 1.09765169f, 0.98818722f, 0.87239446f, 0.74369172f, 0.59768184f, 0.43168630f, 0.17977021f, },
{ 1.43428349f, 1.32038354f, 1.21074086f, 1.10577988f, 1.00561746f, 0.90335924f, 0.80437489f, 0.70709671f,
0.60427395f, 0.49814048f, 0.38509539f, 0.27106800f, 0.14407416f, 0.00219910f, -0.16725141f, -0.36936085f, },
{ 0.99895687f, 0.84188166f, 0.70753739f, 0.57906595f, 0.47055563f, 0.36966965f, 0.26826648f, 0.17163380f,
0.07208392f, -0.03062936f, -1.40037388f, -0.25128968f, -0.37213937f, -0.51075646f, -0.64887512f, -0.80308031f, },
{ 0.26515280f, 0.06313551f, -0.08872080f, -0.21103548f, -0.31069678f, -0.39680323f, -0.47223474f, -0.54167135f,
-0.61444740f, -0.68943343f, -0.76580211f, -0.85170082f, -0.95289061f, -1.06514703f, -1.20510707f, -1.37617746f, },
{ -0.53940301f, -0.73770929f, -0.88424876f, -1.01117930f, -1.13389091f, -1.26830073f, -1.42041987f, -1.62033919f,
-1.10158808f, -1.16512566f, -1.23337128f, -1.30414401f, -1.37663312f, -1.46853845f, -1.57625798f, -1.66893638f, },
{ -0.38601997f, -0.56009350f, -0.66978483f, -0.76028471f, -0.83846064f, -0.90868087f, -0.97408881f, -1.03694962f, },
{ -1.56144989f, -1.65944032f, -1.72689685f, -1.77857740f, -1.82203011f, -1.86220079f, -1.90283983f, -1.94820479f, },
}