ScummVM
cdaudio.cpp File Reference
#include "dsmain.h"
#include "cdaudio.h"
#include "backends/fs/ds/ds-fs.h"
#include "common/config-manager.h"
#include "NDS/scummvm_ipc.h"
Include dependency graph for cdaudio.cpp:

Go to the source code of this file.

Classes

struct  DS::CD::WaveHeader
 
struct  DS::CD::chunkHeader
 
struct  DS::CD::Header
 
struct  DS::CD::decoderFormat
 

Namespaces

 DS
 
 DS::CD
 

Macros

#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
#define WAV_FORMAT_IMA_ADPCM   0x14
 
#define BUFFER_SIZE   8192
 
#define BUFFER_CHUNK_SIZE   (BUFFER_SIZE >> 2)
 

Functions

struct DS::CD::WaveHeader DS::CD::__attribute__ ((packed))
 
void DS::CD::playNextBlock ()
 
void DS::CD::decompressBlock ()
 
void DS::CD::allocBuffers ()
 
void DS::CD::setActive (bool active)
 
bool DS::CD::getActive ()
 
void DS::CD::playTrack (int track, int numLoops, int startFrame, int duration)
 
void DS::CD::update ()
 
void DS::CD::stopTrack ()
 
bool DS::CD::trackExists (int num)
 
bool DS::CD::checkCD ()
 
bool DS::CD::isPlaying ()
 

Variables

char riff [4]
 
u32 size
 
char wave [4]
 
char fmt [4]
 
u32 fmtSize
 
u16 fmtFormatTag
 
u16 fmtChannels
 
u32 fmtSamPerSec
 
u32 fmtBytesPerSec
 
u16 fmtBlockAlign
 
u16 fmtBitsPerSam
 
u16 fmtExtraData
 
u16 fmtExtra
 
char name [4]
 
s16 firstSample
 
char stepTableIndex
 
char reserved
 
s16 initial
 
unsigned char tableIndex
 
unsigned char test
 
unsigned char sample [1024]
 
static bool DS::CD::s_started = false
 
static bool DS::CD::s_active = false
 
static WaveHeader DS::CD::waveHeader
 
static Header DS::CD::blockHeader
 
static FILEDS::CD::s_file
 
static int DS::CD::fillPos
 
static bool DS::CD::isPlayingFlag = false
 
static s16 * DS::CD::audioBuffer
 
static u32 DS::CD::sampleNum
 
static s16 * DS::CD::decompressionBuffer
 
static int DS::CD::s_numLoops
 
static int DS::CD::blockCount
 
static int DS::CD::dataChunkStart
 
static int DS::CD::blocksLeft
 
static bool DS::CD::trackStartsAt2 = false
 
static const int DS::CD::stepTab [89]
 
static const int DS::CD::indexTab [16]
 

Macro Definition Documentation

◆ BUFFER_CHUNK_SIZE

#define BUFFER_CHUNK_SIZE   (BUFFER_SIZE >> 2)

Definition at line 34 of file cdaudio.cpp.

◆ BUFFER_SIZE

#define BUFFER_SIZE   8192

Definition at line 33 of file cdaudio.cpp.

◆ FORBIDDEN_SYMBOL_EXCEPTION_FILE

#define FORBIDDEN_SYMBOL_EXCEPTION_FILE

Definition at line 24 of file cdaudio.cpp.

◆ WAV_FORMAT_IMA_ADPCM

#define WAV_FORMAT_IMA_ADPCM   0x14

Definition at line 32 of file cdaudio.cpp.

Variable Documentation

◆ firstSample

s16 firstSample

Definition at line 49 of file cdaudio.cpp.

◆ fmt

char fmt[4]

Definition at line 55 of file cdaudio.cpp.

◆ fmtBitsPerSam

u16 fmtBitsPerSam

Definition at line 62 of file cdaudio.cpp.

◆ fmtBlockAlign

u16 fmtBlockAlign

Definition at line 61 of file cdaudio.cpp.

◆ fmtBytesPerSec

u32 fmtBytesPerSec

Definition at line 60 of file cdaudio.cpp.

◆ fmtChannels

u16 fmtChannels

Definition at line 58 of file cdaudio.cpp.

◆ fmtExtra

u16 fmtExtra

Definition at line 65 of file cdaudio.cpp.

◆ fmtExtraData

u16 fmtExtraData

Definition at line 64 of file cdaudio.cpp.

◆ fmtFormatTag

u16 fmtFormatTag

Definition at line 57 of file cdaudio.cpp.

◆ fmtSamPerSec

u32 fmtSamPerSec

Definition at line 59 of file cdaudio.cpp.

◆ fmtSize

u32 fmtSize

Definition at line 56 of file cdaudio.cpp.

◆ initial

s16 initial

Definition at line 49 of file cdaudio.cpp.

◆ name

char name[4]

Definition at line 49 of file cdaudio.cpp.

◆ reserved

char reserved

Definition at line 51 of file cdaudio.cpp.

◆ riff

char riff[4]

Definition at line 50 of file cdaudio.cpp.

◆ sample

unsigned char sample[1024]

Definition at line 52 of file cdaudio.cpp.

◆ size

u32 size

Definition at line 51 of file cdaudio.cpp.

◆ stepTableIndex

char stepTableIndex

Definition at line 50 of file cdaudio.cpp.

◆ tableIndex

unsigned char tableIndex

Definition at line 50 of file cdaudio.cpp.

◆ test

unsigned char test

Definition at line 51 of file cdaudio.cpp.

◆ wave

char wave[4]

Definition at line 52 of file cdaudio.cpp.