audiere Namespace Reference


Classes

class  RefCounted
class  RefPtr
class  RefImplementation
class  File
class  SampleSource
class  LoopPointSource
class  OutputStream
class  Event
 Base interface for event-specific data passed to callbacks. More...
class  StopEvent
class  Callback
class  StopCallback
class  AudioDevice
class  SampleBuffer
class  SoundEffect
class  CDDevice
class  MIDIStream
class  MIDIDevice
struct  FileFormatDesc
 Describes a file format that Audiere supports. More...
struct  AudioDeviceDesc
 Describes a supported audio device. More...
struct  Tag
class  BasicSource
class  CDDeviceUnix
class  CDDeviceWin32
class  Log
class  Guard
class  ThreadedDevice
class  StopEventImpl
 Basic StopEvent implementation. More...
class  AbstractDevice
 Contains default implementation of functionality common to all devices. More...
class  ALAudioDevice
class  DSAudioDevice
class  DSOutputBuffer
class  DSOutputStream
class  MixerDevice
 Always produce 16-bit, stereo audio at the specified rate. More...
class  MixerStream
class  MMAudioDevice
class  NullAudioDevice
class  NullOutputStream
class  OSSAudioDevice
struct  DUMB_RESAMPLER
class  CFile
class  AIFFInputStream
class  FLACInputStream
class  MODInputStream
class  MP3InputStream
class  OGGInputStream
class  FileReader
class  SpeexInputStream
class  WAVInputStream
struct  LoopPoint
class  LoopPointSourceImpl
class  MCIDevice
class  MemoryFile
class  MCIMIDIStream
class  MCIMIDIDevice
class  WhiteNoise
class  PinkNoise
class  Resampler
class  BufferStream
class  SampleBufferImpl
class  SingleSoundEffect
class  MultipleSoundEffect
class  SquareWave
class  Mutex
class  CondVar
class  ScopedLock
struct  ThreadInternal
class  SineWave
class  ParameterList
class  QueueBuffer
class  SizedBuffer

Namespaces

namespace  hidden

Typedefs

typedef RefPtr< FileFilePtr
typedef RefPtr< SampleSourceSampleSourcePtr
typedef RefPtr< LoopPointSourceLoopPointSourcePtr
typedef RefPtr< OutputStreamOutputStreamPtr
typedef RefPtr< EventEventPtr
typedef RefPtr< StopEventStopEventPtr
typedef RefPtr< CallbackCallbackPtr
typedef RefPtr< StopCallbackStopCallbackPtr
typedef RefPtr< AudioDeviceAudioDevicePtr
typedef RefPtr< SampleBufferSampleBufferPtr
typedef RefPtr< SoundEffectSoundEffectPtr
typedef RefPtr< CDDeviceCDDevicePtr
typedef RefPtr< MIDIStreamMIDIStreamPtr
typedef RefPtr< MIDIDeviceMIDIDevicePtr
typedef int sample_t
typedef DUMB_RESAMPLER DUMB_RESAMPLER
typedef void(* DUMB_RESAMPLE_PICKUP )(DUMB_RESAMPLER *resampler, void *data)
typedef ogg_int64_t int64_t
typedef void(* AI_ThreadRoutine )(void *opaque)
typedef unsigned char u8
typedef signed char s8
typedef unsigned short u16
typedef signed short s16
typedef unsigned long u32
typedef signed long s32
typedef unsigned long long u64
typedef signed long long s64

Enumerations

enum  SampleFormat { SF_U8, SF_S16 }
enum  FileFormat {
  FF_AUTODETECT, FF_WAV, FF_OGG, FF_FLAC,
  FF_MP3, FF_MOD, FF_AIFF, FF_SPEEX
}
enum  EventType { ET_STOP }
enum  SoundEffectType { SINGLE, MULTIPLE }

Functions

template<typename T, typename U>
bool operator== (const RefPtr< T > &a, const RefPtr< U > &b)
template<typename T>
bool operator== (const RefPtr< T > &a, const T *b)
template<typename T>
bool operator== (const T *a, const RefPtr< T > &b)
template<typename T, typename U>
bool operator!= (const RefPtr< T > &a, const RefPtr< U > &b)
template<typename T>
bool operator!= (const RefPtr< T > &a, const T *b)
template<typename T>
bool operator!= (const T *a, const RefPtr< T > &b)
const char * GetVersion ()
void SplitString (std::vector< std::string > &out, const char *in, char delim)
void GetSupportedFileFormats (std::vector< FileFormatDesc > &formats)
void GetSupportedAudioDevices (std::vector< AudioDeviceDesc > &devices)
int GetSampleSize (SampleFormat format)
AudioDeviceOpenDevice (const char *name=0, const char *parameters=0)
SampleSourceOpenSampleSource (const char *filename, FileFormat file_format=FF_AUTODETECT)
SampleSourceOpenSampleSource (const FilePtr &file, FileFormat file_format=FF_AUTODETECT)
SampleSourceCreateTone (double frequency)
SampleSourceCreateSquareWave (double frequency)
SampleSourceCreateWhiteNoise ()
SampleSourceCreatePinkNoise ()
LoopPointSourceCreateLoopPointSource (const SampleSourcePtr &source)
LoopPointSourceCreateLoopPointSource (const char *filename, FileFormat file_format=FF_AUTODETECT)
LoopPointSourceCreateLoopPointSource (const FilePtr &file, FileFormat file_format=FF_AUTODETECT)
OutputStreamOpenSound (const AudioDevicePtr &device, const SampleSourcePtr &source, bool streaming=false)
OutputStreamOpenSound (const AudioDevicePtr &device, const char *filename, bool streaming=false, FileFormat file_format=FF_AUTODETECT)
OutputStreamOpenSound (const AudioDevicePtr &device, const FilePtr &file, bool streaming=false, FileFormat file_format=FF_AUTODETECT)
SampleBufferCreateSampleBuffer (void *samples, int frame_count, int channel_count, int sample_rate, SampleFormat sample_format)
SampleBufferCreateSampleBuffer (const SampleSourcePtr &source)
SoundEffectOpenSoundEffect (const AudioDevicePtr &device, const SampleSourcePtr &source, SoundEffectType type)
SoundEffectOpenSoundEffect (const AudioDevicePtr &device, const char *filename, SoundEffectType type, FileFormat file_format=FF_AUTODETECT)
SoundEffectOpenSoundEffect (const AudioDevicePtr &device, const FilePtr &file, SoundEffectType type, FileFormat file_format=FF_AUTODETECT)
FileOpenFile (const char *filename, bool writeable)
FileCreateMemoryFile (const void *buffer, int size)
void EnumerateCDDevices (std::vector< std::string > &devices)
CDDeviceOpenCDDevice (const char *device)
MIDIDeviceOpenMIDIDevice (const char *device)
const char * AdrEnumerateCDDevices ()
CDDeviceAdrOpenCDDevice (const char *)
FileAdrOpenFile (const char *filename, bool writeable)
const char * AdrGetSupportedAudioDevices ()
AudioDeviceDoOpenDevice (const std::string &name, const ParameterList &parameters)
AudioDeviceAdrOpenDevice (const char *name, const char *parameters)
void dumb_reset_resampler (DUMB_RESAMPLER *resampler, sample_t *src, long pos, long start, long end)
DUMB_RESAMPLERdumb_start_resampler (sample_t *src, long pos, long start, long end)
long dumb_resample (DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume, float delta)
sample_t dumb_resample_get_current_sample (DUMB_RESAMPLER *resampler, float volume)
void dumb_end_resampler (DUMB_RESAMPLER *resampler)
const char * AdrGetSupportedFileFormats ()
bool end_is (const char *begin, const char *ext)
FileFormat GuessFormat (const char *filename)
SampleSourceOpenSource (const FilePtr &file, const char *filename, FileFormat file_format)
SampleSourceAdrOpenSampleSource (const char *filename, FileFormat file_format)
SampleSourceAdrOpenSampleSourceFromFile (File *file, FileFormat file_format)
const char * getGenre (u8 code)
std::string getString (u8 *buffer, int maxlen)
LoopPointSourceAdrCreateLoopPointSource (SampleSource *source)
FileAdrCreateMemoryFile (const void *buffer, int size)
int getNextPowerOfTwo (int value)
SampleSourceAdrCreateWhiteNoise ()
SampleSourceAdrCreatePinkNoise ()
s16 u8tos16 (u8 u)
SampleBufferAdrCreateSampleBuffer (void *samples, int frame_count, int channel_count, int sample_rate, SampleFormat sample_format)
SampleBufferAdrCreateSampleBufferFromSource (SampleSource *source)
OutputStreamAdrOpenSound (AudioDevice *device, SampleSource *source_raw, bool streaming)
SoundEffectAdrOpenSoundEffect (AudioDevice *device, SampleSource *source, SoundEffectType type)
SampleSourceAdrCreateSquareWave (double frequency)
bool AI_CreateThread (AI_ThreadRoutine routine, void *opaque, int priority=0)
void AI_Sleep (unsigned milliseconds)
void * ThreadRoutine (void *arg)
bool SupportsThreadPriority ()
int GetWin32Priority (int priority)
u64 GetNow ()
SampleSourceAdrCreateTone (double frequency)
int strcmp_case (const char *a, const char *b)
int AdrGetSampleSize (SampleFormat format)
template<typename T>
clamp (T min, T x, T max)
int GetFrameSize (SampleSource *source)
int GetFrameSize (const SampleSourcePtr &source)
u16 read16_le (const u8 *b)
u16 read16_be (const u8 *b)
u32 read32_le (const u8 *b)
u32 read32_be (const u8 *b)
u32 readLD_be (const u8 *b)
int GetFileLength (File *file)
SampleSourceOpenBufferStream (void *samples, int sample_count, int channel_count, int sample_rate, SampleFormat sample_format)
const char * AdrGetVersion ()

Variables

int dumb_resampling_quality = 2
int dumb_resampling_quality


Detailed Description

This file is roughly based on the WAVInputStream implementation, since AIFF and WAV files are so alike.


Typedef Documentation

typedef void(* audiere::AI_ThreadRoutine)(void *opaque)
 

Definition at line 16 of file threads.h.

typedef RefPtr<AudioDevice> audiere::AudioDevicePtr
 

Definition at line 774 of file audiere.h.

typedef RefPtr<Callback> audiere::CallbackPtr
 

Definition at line 656 of file audiere.h.

typedef RefPtr<CDDevice> audiere::CDDevicePtr
 

Definition at line 967 of file audiere.h.

typedef void(* audiere::DUMB_RESAMPLE_PICKUP)(DUMB_RESAMPLER *resampler, void *data)
 

Definition at line 42 of file dumb_resample.h.

typedef struct DUMB_RESAMPLER audiere::DUMB_RESAMPLER
 

Definition at line 40 of file dumb_resample.h.

typedef RefPtr<Event> audiere::EventPtr
 

Definition at line 603 of file audiere.h.

typedef RefPtr<File> audiere::FilePtr
 

Definition at line 273 of file audiere.h.

typedef ogg_int64_t audiere::int64_t
 

Definition at line 10 of file input_ogg.cpp.

typedef RefPtr<LoopPointSource> audiere::LoopPointSourcePtr
 

Definition at line 467 of file audiere.h.

typedef RefPtr<MIDIDevice> audiere::MIDIDevicePtr
 

Definition at line 1039 of file audiere.h.

typedef RefPtr<MIDIStream> audiere::MIDIStreamPtr
 

Definition at line 1012 of file audiere.h.

typedef RefPtr<OutputStream> audiere::OutputStreamPtr
 

Definition at line 585 of file audiere.h.

typedef signed short audiere::s16
 

Definition at line 22 of file types.h.

typedef signed long audiere::s32
 

Definition at line 24 of file types.h.

typedef signed long long audiere::s64
 

Definition at line 26 of file types.h.

typedef signed char audiere::s8
 

Definition at line 20 of file types.h.

typedef int audiere::sample_t
 

Definition at line 32 of file dumb_resample.h.

typedef RefPtr<SampleBuffer> audiere::SampleBufferPtr
 

Definition at line 819 of file audiere.h.

typedef RefPtr<SampleSource> audiere::SampleSourcePtr
 

Definition at line 399 of file audiere.h.

typedef RefPtr<SoundEffect> audiere::SoundEffectPtr
 

Definition at line 896 of file audiere.h.

typedef RefPtr<StopCallback> audiere::StopCallbackPtr
 

Definition at line 685 of file audiere.h.

typedef RefPtr<StopEvent> audiere::StopEventPtr
 

Definition at line 633 of file audiere.h.

typedef unsigned short audiere::u16
 

Definition at line 21 of file types.h.

typedef unsigned long audiere::u32
 

Definition at line 23 of file types.h.

typedef unsigned long long audiere::u64
 

Definition at line 25 of file types.h.

typedef unsigned char audiere::u8
 

Definition at line 19 of file types.h.


Enumeration Type Documentation

enum audiere::EventType
 

An integral code representing a specific type of event.

Enumerator:
ET_STOP  See StopEvent and StopCallback.

Definition at line 589 of file audiere.h.

enum audiere::FileFormat
 

Supported audio file formats.

Enumerator:
FF_AUTODETECT 
FF_WAV 
FF_OGG 
FF_FLAC 
FF_MP3 
FF_MOD 
FF_AIFF 
FF_SPEEX 

Definition at line 284 of file audiere.h.

enum audiere::SampleFormat
 

Storage formats for sample data.

Enumerator:
SF_U8  unsigned 8-bit integer [0,255]
SF_S16  signed 16-bit integer in host endianness [-32768,32767]

Definition at line 277 of file audiere.h.

enum audiere::SoundEffectType
 

Defines the type of SoundEffect objects.

See also:
SoundEffect
Enumerator:
SINGLE 
MULTIPLE 

Definition at line 825 of file audiere.h.


Function Documentation

LoopPointSource* audiere::AdrCreateLoopPointSource SampleSource *  source  ) 
 

Definition at line 200 of file loop_point_source.cpp.

Referenced by CreateLoopPointSource().

File* audiere::AdrCreateMemoryFile const void *  buffer,
int  size
 

Definition at line 8 of file memory_file.cpp.

Referenced by CreateMemoryFile().

SampleSource* audiere::AdrCreatePinkNoise  ) 
 

Definition at line 134 of file noise.cpp.

Referenced by CreatePinkNoise().

SampleBuffer* audiere::AdrCreateSampleBuffer void *  samples,
int  frame_count,
int  channel_count,
int  sample_rate,
SampleFormat  sample_format
 

Definition at line 124 of file sample_buffer.cpp.

SampleBuffer* audiere::AdrCreateSampleBufferFromSource SampleSource *  source  ) 
 

Definition at line 136 of file sample_buffer.cpp.

Referenced by CreateSampleBuffer().

SampleSource* audiere::AdrCreateSquareWave double  frequency  ) 
 

Definition at line 53 of file square_wave.cpp.

Referenced by CreateSquareWave().

SampleSource* audiere::AdrCreateTone double  frequency  ) 
 

Definition at line 61 of file tone.cpp.

Referenced by CreateTone().

SampleSource* audiere::AdrCreateWhiteNoise  ) 
 

Definition at line 33 of file noise.cpp.

Referenced by CreateWhiteNoise().

const char * audiere::AdrEnumerateCDDevices  ) 
 

Definition at line 7 of file cd_null.cpp.

Referenced by EnumerateCDDevices().

int audiere::AdrGetSampleSize SampleFormat  format  ) 
 

Definition at line 89 of file utility.cpp.

References SF_S16, and SF_U8.

const char* audiere::AdrGetSupportedAudioDevices  ) 
 

Returns a formatted string that lists the audio devices Audiere supports. This function is DLL-safe.

It is formatted in the following way:

name1:description1;name2:description2;...

Definition at line 146 of file device.cpp.

Referenced by GetSupportedAudioDevices().

const char* audiere::AdrGetSupportedFileFormats  ) 
 

Returns a formatted string that lists the file formats that Audiere supports. This function is DLL-safe.

It is formatted in the following way:

description1:ext1,ext2,ext3;description2:ext1,ext2,ext3

Definition at line 29 of file input.cpp.

Referenced by GetSupportedFileFormats().

const char* audiere::AdrGetVersion  ) 
 

Definition at line 7 of file version.cpp.

Referenced by GetVersion().

CDDevice * audiere::AdrOpenCDDevice const char *  name  ) 
 

Definition at line 11 of file cd_null.cpp.

Referenced by OpenCDDevice().

AudioDevice* audiere::AdrOpenDevice const char *  name,
const char *  parameters
 

Definition at line 356 of file device.cpp.

References ADR_GUARD, ADR_LOG, and DoOpenDevice().

Referenced by OpenDevice().

File * audiere::AdrOpenFile const char *  filename,
bool  writeable
 

Definition at line 46 of file file_ansi.cpp.

SampleSource* audiere::AdrOpenSampleSource const char *  filename,
FileFormat  file_format
 

Definition at line 199 of file input.cpp.

References OpenFile(), and OpenSource().

SampleSource* audiere::AdrOpenSampleSourceFromFile File *  file,
FileFormat  file_format
 

Definition at line 214 of file input.cpp.

References OpenSource().

OutputStream* audiere::AdrOpenSound AudioDevice *  device,
SampleSource *  source_raw,
bool  streaming
 

Definition at line 9 of file sound.cpp.

References ADR_GUARD, and audiere::RefPtr< T >::get().

Referenced by OpenSound().

SoundEffect* audiere::AdrOpenSoundEffect AudioDevice *  device,
SampleSource *  source,
SoundEffectType  type
 

Definition at line 140 of file sound_effect.cpp.

References CreateSampleBuffer(), MULTIPLE, OpenSound(), and SINGLE.

bool audiere::AI_CreateThread AI_ThreadRoutine  routine,
void *  opaque,
int  priority = 0
 

Definition at line 25 of file threads_posix.cpp.

References clamp(), and ThreadRoutine().

Referenced by audiere::AbstractDevice::AbstractDevice(), and audiere::ThreadedDevice::ThreadedDevice().

void audiere::AI_Sleep unsigned  milliseconds  ) 
 

Definition at line 80 of file threads_posix.cpp.

Referenced by audiere::AbstractDevice::~AbstractDevice(), and audiere::ThreadedDevice::~ThreadedDevice().

template<typename T>
T audiere::clamp min,
x,
max
 

Definition at line 54 of file utility.h.

Referenced by audiere::LoopPointSourceImpl::addLoopPoint(), AI_CreateThread(), and audiere::Resampler::read().

LoopPointSource* audiere::CreateLoopPointSource const FilePtr file,
FileFormat  file_format = FF_AUTODETECT
[inline]
 

Creates a LoopPointSource from a source loaded from a file.

Definition at line 1339 of file audiere.h.

References CreateLoopPointSource(), and OpenSampleSource().

LoopPointSource* audiere::CreateLoopPointSource const char *  filename,
FileFormat  file_format = FF_AUTODETECT
[inline]
 

Creates a LoopPointSource from a source loaded from a file.

Definition at line 1329 of file audiere.h.

References CreateLoopPointSource(), and OpenSampleSource().

LoopPointSource* audiere::CreateLoopPointSource const SampleSourcePtr source  )  [inline]
 

Create a LoopPointSource from a SampleSource. The SampleSource must be seekable. If it isn't, or the source isn't valid, this function returns 0.

Definition at line 1320 of file audiere.h.

References audiere::hidden::AdrCreateLoopPointSource(), and audiere::RefPtr< T >::get().

Referenced by CreateLoopPointSource().

File* audiere::CreateMemoryFile const void *  buffer,
int  size
[inline]
 

Creates a File implementation that reads from a buffer in memory. It stores a copy of the buffer that is passed in.

The File object does not take ownership of the memory buffer. When the file is destroyed, it will not free the memory.

Parameters:
buffer Pointer to the beginning of the data.
size Size of the buffer in bytes.
Returns:
0 if size is non-zero and buffer is null. Otherwise, returns a valid File object.

Definition at line 1522 of file audiere.h.

References audiere::hidden::AdrCreateMemoryFile().

SampleSource* audiere::CreatePinkNoise  )  [inline]
 

Create a pink noise sample source. Pink noise is noise with equal power distribution among octaves (logarithmic), not frequencies.

Returns:
pink noise sample source

Definition at line 1311 of file audiere.h.

References audiere::hidden::AdrCreatePinkNoise().

SampleBuffer* audiere::CreateSampleBuffer const SampleSourcePtr source  )  [inline]
 

Create a SampleBuffer object from a SampleSource.

Parameters:
source Seekable sample source used to create the buffer. If the source is not seekable, then the function fails.
Returns:
new sample buffer if success, 0 otherwise

Definition at line 1445 of file audiere.h.

References audiere::hidden::AdrCreateSampleBufferFromSource(), and audiere::RefPtr< T >::get().

SampleBuffer* audiere::CreateSampleBuffer void *  samples,
int  frame_count,
int  channel_count,
int  sample_rate,
SampleFormat  sample_format
[inline]
 

Create a SampleBuffer object using the specified samples and formats.

Parameters:
samples Pointer to a buffer of samples used to initialize the new object. If this is 0, the sample buffer contains just silence.
frame_count Size of the sample buffer in frames.
channel_count Number of channels in each frame.
sample_rate Sample rate in Hz.
sample_format Format of each sample.
See also:
SampleFormat.
Returns:
new SampleBuffer object

Definition at line 1424 of file audiere.h.

References audiere::hidden::AdrCreateSampleBuffer().

Referenced by AdrOpenSoundEffect(), and OpenBufferStream().

SampleSource* audiere::CreateSquareWave double  frequency  )  [inline]
 

Create a square wave with the specified frequency.

Parameters:
frequency Frequency of the wave in Hz.
Returns:
wave sample source

Definition at line 1291 of file audiere.h.

References audiere::hidden::AdrCreateSquareWave().

SampleSource* audiere::CreateTone double  frequency  )  [inline]
 

Create a tone sample source with the specified frequency.

Parameters:
frequency Frequency of the tone in Hz.
Returns:
tone sample source

Definition at line 1280 of file audiere.h.

References audiere::hidden::AdrCreateTone().

SampleSource* audiere::CreateWhiteNoise  )  [inline]
 

Create a white noise sample source. White noise is just random data.

Returns:
white noise sample source

Definition at line 1301 of file audiere.h.

References audiere::hidden::AdrCreateWhiteNoise().

AudioDevice* audiere::DoOpenDevice const std::string &  name,
const ParameterList &  parameters
 

Definition at line 186 of file device.cpp.

References ADR_GUARD, TRY_DEVICE, and TRY_GROUP.

Referenced by AdrOpenDevice().

void audiere::dumb_end_resampler DUMB_RESAMPLER resampler  ) 
 

Definition at line 521 of file dumb_resample.cpp.

long audiere::dumb_resample DUMB_RESAMPLER resampler,
sample_t dst,
long  dst_size,
float  volume,
float  delta
 

Definition at line 174 of file dumb_resample.cpp.

References ASSERT, audiere::DUMB_RESAMPLER::dir, dumb_resampling_quality, DUMB_RQ_ALIASING, DUMB_RQ_LINEAR, HEAVYASSERT, LOOP4, audiere::DUMB_RESAMPLER::max_quality, audiere::DUMB_RESAMPLER::min_quality, MULSC, and audiere::DUMB_RESAMPLER::start.

Referenced by audiere::Resampler::read().

sample_t audiere::dumb_resample_get_current_sample DUMB_RESAMPLER resampler,
float  volume
 

Definition at line 458 of file dumb_resample.cpp.

References ASSERT, audiere::DUMB_RESAMPLER::dir, dumb_resampling_quality, DUMB_RQ_LINEAR, HEAVYASSERT, audiere::DUMB_RESAMPLER::max_quality, audiere::DUMB_RESAMPLER::min_quality, MULSC, audiere::DUMB_RESAMPLER::pos, audiere::DUMB_RESAMPLER::src, audiere::DUMB_RESAMPLER::start, audiere::DUMB_RESAMPLER::subpos, and audiere::DUMB_RESAMPLER::x.

void audiere::dumb_reset_resampler DUMB_RESAMPLER resampler,
sample_t src,
long  pos,
long  start,
long  end
 

Definition at line 82 of file dumb_resample.cpp.

References audiere::DUMB_RESAMPLER::dir, DUMB_RQ_N_LEVELS, audiere::DUMB_RESAMPLER::end, audiere::DUMB_RESAMPLER::max_quality, audiere::DUMB_RESAMPLER::min_quality, audiere::DUMB_RESAMPLER::overshot, audiere::DUMB_RESAMPLER::pickup, audiere::DUMB_RESAMPLER::pickup_data, audiere::DUMB_RESAMPLER::pos, audiere::DUMB_RESAMPLER::src, audiere::DUMB_RESAMPLER::start, audiere::DUMB_RESAMPLER::subpos, and audiere::DUMB_RESAMPLER::x.

Referenced by dumb_start_resampler().

DUMB_RESAMPLER * audiere::dumb_start_resampler sample_t src,
long  pos,
long  start,
long  end
 

Definition at line 100 of file dumb_resample.cpp.

References dumb_reset_resampler().

bool audiere::end_is const char *  begin,
const char *  ext
 

Definition at line 84 of file input.cpp.

References strcmp_case().

Referenced by GuessFormat().

void audiere::EnumerateCDDevices std::vector< std::string > &  devices  )  [inline]
 

Generates a list of available CD device names.

Parameters:
devices A vector of strings to be filled.

Definition at line 1531 of file audiere.h.

References audiere::hidden::AdrEnumerateCDDevices().

int audiere::GetFileLength File *  file  )  [inline]
 

Definition at line 117 of file utility.h.

References audiere::File::BEGIN, audiere::File::END, audiere::File::seek(), and audiere::File::tell().

int audiere::GetFrameSize const SampleSourcePtr source  )  [inline]
 

Definition at line 80 of file utility.h.

References audiere::RefPtr< T >::get(), and GetFrameSize().

int audiere::GetFrameSize SampleSource *  source  )  [inline]
 

Definition at line 73 of file utility.h.

References audiere::SampleSource::getFormat(), and GetSampleSize().

Referenced by audiere::MP3InputStream::doRead(), audiere::DSOutputStream::DSOutputStream(), GetFrameSize(), audiere::LoopPointSourceImpl::LoopPointSourceImpl(), and audiere::BasicSource::read().

const char* audiere::getGenre u8  code  ) 
 

Definition at line 258 of file input_mp3.cpp.

int audiere::getNextPowerOfTwo int  value  ) 
 

Definition at line 20 of file memory_file.cpp.

Referenced by audiere::MemoryFile::MemoryFile().

u64 audiere::GetNow  ) 
 

Return current time in microseconds.

Definition at line 9 of file timer_posix.cpp.

int audiere::GetSampleSize SampleFormat  format  )  [inline]
 

Get the size of a sample in a specific sample format. This is commonly used to determine how many bytes a chunk of PCM data will take.

Returns:
Number of bytes a single sample in the specified format takes.

Definition at line 1217 of file audiere.h.

References audiere::hidden::AdrGetSampleSize().

Referenced by audiere::BufferStream::BufferStream(), audiere::WAVInputStream::doRead(), audiere::OGGInputStream::doRead(), audiere::FLACInputStream::doRead(), audiere::AIFFInputStream::doRead(), GetFrameSize(), audiere::FLACInputStream::getPosition(), audiere::DSAudioDevice::openBuffer(), audiere::DSAudioDevice::openStream(), audiere::SampleBufferImpl::SampleBufferImpl(), audiere::WAVInputStream::setPosition(), and audiere::AIFFInputStream::setPosition().

std::string audiere::getString u8 buffer,
int  maxlen
 

Definition at line 303 of file input_mp3.cpp.

void audiere::GetSupportedAudioDevices std::vector< AudioDeviceDesc > &  devices  )  [inline]
 

Populates a vector of AudioDeviceDesc structs.

Definition at line 1195 of file audiere.h.

References audiere::hidden::AdrGetSupportedAudioDevices(), and SplitString().

void audiere::GetSupportedFileFormats std::vector< FileFormatDesc > &  formats  )  [inline]
 

Populates a vector of FileFormatDesc structs.

Definition at line 1170 of file audiere.h.

References audiere::hidden::AdrGetSupportedFileFormats(), and SplitString().

const char* audiere::GetVersion  )  [inline]
 

Returns the Audiere version string.

Returns:
Audiere version information

Definition at line 1136 of file audiere.h.

References audiere::hidden::AdrGetVersion().

int audiere::GetWin32Priority int  priority  ) 
 

Definition at line 32 of file threads_win32.cpp.

FileFormat audiere::GuessFormat const char *  filename  ) 
 

Definition at line 95 of file input.cpp.

References end_is(), FF_AIFF, FF_AUTODETECT, FF_FLAC, FF_MOD, FF_MP3, FF_OGG, FF_SPEEX, and FF_WAV.

Referenced by OpenSource().

SampleSource* audiere::OpenBufferStream void *  samples,
int  sample_count,
int  channel_count,
int  sample_rate,
SampleFormat  sample_format
[inline]
 

Definition at line 126 of file utility.h.

References CreateSampleBuffer(), and audiere::SampleBuffer::openStream().

Referenced by audiere::NullAudioDevice::openBuffer(), and audiere::MixerDevice::openBuffer().

CDDevice* audiere::OpenCDDevice const char *  device  )  [inline]
 

Opens the specified CD playback device.

Parameters:
device The filesystem device to be played. e.g. Linux: "/dev/cdrom", Windows: "D:"
Returns:
0 if opening device failed, valid CDDrive object otherwise.

Definition at line 1547 of file audiere.h.

References audiere::hidden::AdrOpenCDDevice().

AudioDevice* audiere::OpenDevice const char *  name = 0,
const char *  parameters = 0
[inline]
 

Open a new audio device. If name or parameters are not specified, defaults are used. Each platform has its own set of audio devices. Every platform supports the "null" audio device.

Parameters:
name name of audio device that should be used
parameters comma delimited list of audio-device parameters; for example, "buffer=100,rate=44100"
Returns:
new audio device object if OpenDevice succeeds, and 0 in case of failure

Definition at line 1233 of file audiere.h.

References audiere::hidden::AdrOpenDevice().

File* audiere::OpenFile const char *  filename,
bool  writeable
[inline]
 

Opens a default file implementation from the local filesystem.

Parameters:
filename The name of the file on the local filesystem.
writeable Whether the writing to the file is allowed.

Definition at line 1505 of file audiere.h.

References audiere::hidden::AdrOpenFile().

Referenced by AdrOpenSampleSource().

MIDIDevice* audiere::OpenMIDIDevice const char *  device  )  [inline]
 

Opens the specified MIDI synthesizer device.

Parameters:
device The name of the device. Unused for now.
Returns:
0 if opening device failed, valid MIDIDevice object otherwise.

Definition at line 1558 of file audiere.h.

References audiere::hidden::AdrOpenMIDIDevice().

SampleSource* audiere::OpenSampleSource const FilePtr file,
FileFormat  file_format = FF_AUTODETECT
[inline]
 

Opens a sample source from the specified file object. If the sound file cannot be opened, this factory function returns 0.

Note:
Some sound files support seeking, while some don't.
Parameters:
file File object from which to open the decoder
file_format Format of the file to load. If FF_AUTODETECT, Audiere will try opening the file in each format.
Returns:
new SampleSource if OpenSampleSource succeeds, 0 otherwise

Definition at line 1266 of file audiere.h.

References audiere::hidden::AdrOpenSampleSourceFromFile(), and audiere::RefPtr< T >::get().

SampleSource* audiere::OpenSampleSource const char *  filename,
FileFormat  file_format = FF_AUTODETECT
[inline]
 

Create a streaming sample source from a sound file. This factory simply opens a default file from the system filesystem and calls OpenSampleSource(File*).

See also:
OpenSampleSource(File*)

Definition at line 1247 of file audiere.h.

References audiere::hidden::AdrOpenSampleSource().

Referenced by CreateLoopPointSource(), OpenSound(), and OpenSoundEffect().

OutputStream* audiere::OpenSound const AudioDevicePtr device,
const FilePtr file,
bool  streaming = false,
FileFormat  file_format = FF_AUTODETECT
[inline]
 

Calls OpenSound(AudioDevice*, SampleSource*) with a sample source created via OpenSampleSource(File* file).

Definition at line 1397 of file audiere.h.

References OpenSampleSource(), and OpenSound().

OutputStream* audiere::OpenSound const AudioDevicePtr device,
const char *  filename,
bool  streaming = false,
FileFormat  file_format = FF_AUTODETECT
[inline]
 

Calls OpenSound(AudioDevice*, SampleSource*) with a sample source created via OpenSampleSource(const char*).

Definition at line 1383 of file audiere.h.

References OpenSampleSource(), and OpenSound().

OutputStream* audiere::OpenSound const AudioDevicePtr device,
const SampleSourcePtr source,
bool  streaming = false
[inline]
 

Try to open a sound buffer using the specified AudioDevice and sample source. If the specified sample source is seekable, it loads it into memory and uses AudioDevice::openBuffer to create the output stream. If the stream is not seekable, it uses AudioDevice::openStream to create the output stream. This means that certain file types must always be streamed, and therefore, OpenSound will hold on to the file object. If you must guarantee that the file on disk is no longer referenced, you must create your own memory file implementation and load your data into that before calling OpenSound.

Parameters:
device AudioDevice in which to open the output stream.
source SampleSource used to generate samples for the sound object. OpenSound takes ownership of source, even if it returns 0. (In that case, OpenSound immediately deletes the SampleSource.)
streaming If false or unspecified, OpenSound attempts to open the entire sound into memory. Otherwise, it streams the sound from the file.
Returns:
new output stream if successful, 0 otherwise

Definition at line 1371 of file audiere.h.

References audiere::hidden::AdrOpenSound(), and audiere::RefPtr< T >::get().

Referenced by AdrOpenSoundEffect(), and OpenSound().

SoundEffect* audiere::OpenSoundEffect const AudioDevicePtr device,
const FilePtr file,
SoundEffectType  type,
FileFormat  file_format = FF_AUTODETECT
[inline]
 

Calls OpenSoundEffect(AudioDevice*, SampleSource*, SoundEffectType) with a sample source created from the file.

Definition at line 1489 of file audiere.h.

References OpenSampleSource(), and OpenSoundEffect().

SoundEffect* audiere::OpenSoundEffect const AudioDevicePtr device,
const char *  filename,
SoundEffectType  type,
FileFormat  file_format = FF_AUTODETECT
[inline]
 

Calls OpenSoundEffect(AudioDevice*, SampleSource*, SoundEffectType) with a sample source created from the filename.

Definition at line 1475 of file audiere.h.

References OpenSampleSource(), and OpenSoundEffect().

SoundEffect* audiere::OpenSoundEffect const AudioDevicePtr device,
const SampleSourcePtr source,
SoundEffectType  type
[inline]
 

Open a SoundEffect object from the given sample source and sound effect type.

See also:
SoundEffect
Parameters:
device AudioDevice on which the sound is played.
source The sample source used to feed the sound effect with data.
type The type of the sound effect. If type is MULTIPLE, the source must be seekable.
Returns:
new SoundEffect object if successful, 0 otherwise

Definition at line 1463 of file audiere.h.

References audiere::hidden::AdrOpenSoundEffect(), and audiere::RefPtr< T >::get().

Referenced by OpenSoundEffect().

SampleSource* audiere::OpenSource const FilePtr file,
const char *  filename,
FileFormat  file_format
 

The internal implementation of OpenSampleSource.

Parameters:
file the file to load from. cannot be 0.
filename the name of the file, or 0 if it is not available
file_format the format of the file or FF_AUTODETECT

Definition at line 126 of file input.cpp.

References ADR_ASSERT, ADR_GUARD, FF_AIFF, FF_AUTODETECT, FF_FLAC, FF_MOD, FF_MP3, FF_OGG, FF_SPEEX, FF_WAV, GuessFormat(), TRY_OPEN, and TRY_SOURCE.

Referenced by AdrOpenSampleSource(), and AdrOpenSampleSourceFromFile().

template<typename T>
bool audiere::operator!= const T *  a,
const RefPtr< T > &  b
 

Definition at line 183 of file audiere.h.

References audiere::RefPtr< T >::get().

template<typename T>
bool audiere::operator!= const RefPtr< T > &  a,
const T *  b
 

Definition at line 178 of file audiere.h.

References audiere::RefPtr< T >::get().

template<typename T, typename U>
bool audiere::operator!= const RefPtr< T > &  a,
const RefPtr< U > &  b
 

Definition at line 173 of file audiere.h.

References audiere::RefPtr< T >::get().

template<typename T>
bool audiere::operator== const T *  a,
const RefPtr< T > &  b
 

Definition at line 167 of file audiere.h.

References audiere::RefPtr< T >::get().

template<typename T>
bool audiere::operator== const RefPtr< T > &  a,
const T *  b
 

Definition at line 162 of file audiere.h.

References audiere::RefPtr< T >::get().

template<typename T, typename U>
bool audiere::operator== const RefPtr< T > &  a,
const RefPtr< U > &  b
 

Definition at line 157 of file audiere.h.

References audiere::RefPtr< T >::get().

u16 audiere::read16_be const u8 b  )  [inline]
 

Definition at line 89 of file utility.h.

Referenced by read32_be().

u16 audiere::read16_le const u8 b  )  [inline]
 

Definition at line 85 of file utility.h.

Referenced by read32_le().

u32 audiere::read32_be const u8 b  )  [inline]
 

Definition at line 97 of file utility.h.

References read16_be().

Referenced by readLD_be().

u32 audiere::read32_le const u8 b  )  [inline]
 

Definition at line 93 of file utility.h.

References read16_le().

Referenced by audiere::WAVInputStream::initialize().

u32 audiere::readLD_be const u8 b  )  [inline]
 

Converts an 80-bit IEEE 754 floating point number to a u32.

Definition at line 102 of file utility.h.

References read32_be().

void audiere::SplitString std::vector< std::string > &  out,
const char *  in,
char  delim
[inline]
 

Definition at line 1141 of file audiere.h.

Referenced by GetSupportedAudioDevices(), and GetSupportedFileFormats().

int audiere::strcmp_case const char *  a,
const char *  b
 

Definition at line 72 of file utility.cpp.

Referenced by audiere::CDDeviceWin32::containsCD(), end_is(), audiere::CDDeviceWin32::isDoorOpen(), and audiere::CDDeviceWin32::isPlaying().

bool audiere::SupportsThreadPriority  ) 
 

Definition at line 16 of file threads_win32.cpp.

void* audiere::ThreadRoutine void *  arg  ) 
 

Definition at line 17 of file threads_posix.cpp.

Referenced by AI_CreateThread().

s16 audiere::u8tos16 u8  u  )  [inline]
 

Definition at line 88 of file resampler.cpp.


Variable Documentation

int audiere::dumb_resampling_quality
 

Definition at line 78 of file dumb_resample.cpp.

Referenced by dumb_resample(), dumb_resample_get_current_sample(), and audiere::MODInputStream::initialize().

int audiere::dumb_resampling_quality = 2
 

Definition at line 78 of file dumb_resample.cpp.

Referenced by dumb_resample(), dumb_resample_get_current_sample(), and audiere::MODInputStream::initialize().


Generated on Mon Feb 13 23:08:39 2006 for audiere by  doxygen 1.4.6