Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

audiere Namespace Reference


Compounds

struct  AI_CriticalSectionStruct
class  ALAudioDevice
class  AudioDevice
class  BufferStream
class  CFile
class  DSAudioDevice
class  DSOutputBuffer
class  DSOutputStream
class  File
struct  FileFormatDesc
 Describes a file format that Audiere supports. More...

class  FLACInputStream
class  Guard
class  Lock
class  Log
class  MixerDevice
 Always produce 16-bit, stereo audio at the specified rate. More...

class  MixerStream
class  MMAudioDevice
class  MODInputStream
class  MP3InputStream
class  MultipleSoundEffect
class  MyFLACDecoder
class  MyLoader
class  NullAudioDevice
class  NullOutputStream
class  OALAudioDevice
class  OALOutputStream
class  OGGInputStream
class  OSSAudioDevice
class  OutputStream
class  ParameterList
class  PinkNoise
class  QueueBuffer
class  RefCounted
class  RefImplementation
class  RefPtr
class  RepeatableStream
class  Resampler
class  SampleBuffer
class  SampleBufferImpl
class  SampleSource
class  SineWave
class  SingleSoundEffect
class  SizedBuffer
class  SoundEffect
class  SquareWave
class  Synchronized
class  ThreadedDevice
struct  ThreadInternal
class  UnseekableSource
class  WAVInputStream
class  WhiteNoise

Typedefs

typedef RefPtr< FileFilePtr
typedef RefPtr< SampleSourceSampleSourcePtr
typedef RefPtr< OutputStreamOutputStreamPtr
typedef RefPtr< AudioDeviceAudioDevicePtr
typedef RefPtr< SampleBufferSampleBufferPtr
typedef RefPtr< SoundEffectSoundEffectPtr
typedef ogg_int64_t int64_t
typedef void(* AI_ThreadRoutine )(void *opaque)
typedef AI_CriticalSectionStructAI_CriticalSection
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 }
 Storage formats for sample data. More...

enum  SoundEffectType { SINGLE, MULTIPLE }

Functions

const char * GetVersion ()
void _SplitString (std::vector< std::string > &out, const char *in, char delim)
void GetSupportedFileFormats (std::vector< FileFormatDesc > &formats)
int GetSampleSize (SampleFormat format)
AudioDeviceOpenDevice (const char *name=0, const char *parameters=0)
SampleSourceOpenSampleSource (const char *filename)
SampleSourceOpenSampleSource (File *file)
SampleSourceCreateTone (double frequency)
SampleSourceCreateSquareWave (double frequency)
SampleSourceCreateWhiteNoise ()
SampleSourceCreatePinkNoise ()
OutputStreamOpenSound (AudioDevice *device, SampleSource *source, bool streaming=false)
OutputStreamOpenSound (AudioDevice *device, const char *filename, bool streaming=false)
OutputStreamOpenSound (AudioDevice *device, File *file, bool streaming=false)
SampleBufferCreateSampleBuffer (void *samples, int frame_count, int channel_count, int sample_rate, SampleFormat sample_format)
SampleBufferCreateSampleBuffer (SampleSource *source)
SoundEffectOpenSoundEffect (AudioDevice *device, SampleSource *source, SoundEffectType type)
SoundEffectOpenSoundEffect (AudioDevice *device, const char *filename, SoundEffectType type)
SoundEffectOpenSoundEffect (AudioDevice *device, File *file, SoundEffectType type)
FileOpenDefaultFile (const char *filename)
AudioDeviceDoOpenDevice (const std::string &name, const ParameterList &parameters)
 ADR_EXPORT (AudioDevice *, AdrOpenDevice)(const char *name
bool end_is (const char *begin, const char *ext)
 ADR_EXPORT (const char *, AdrGetSupportedFileFormats)()
SampleSourceOpenSource (File *raw_file, const char *filename)
 ADR_EXPORT (SampleSource *, AdrOpenSampleSource)(const char *filename)
s16 u8tos16 (u8 u)
 ADR_EXPORT (SampleBuffer *, AdrCreateSampleBuffer)(void *samples
 ADR_EXPORT (OutputStream *, AdrOpenSound)(AudioDevice *device
 ADR_EXPORT (SoundEffect *, AdrOpenSoundEffect)(AudioDevice *device
bool AI_CreateThread (AI_ThreadRoutine routine, void *opaque, int priority=0)
void AI_Sleep (unsigned milliseconds)
void AI_DestroyCriticalSection (AI_CriticalSection cs)
void AI_EnterCriticalSection (AI_CriticalSection cs)
void AI_LeaveCriticalSection (AI_CriticalSection cs)
void * ThreadRoutine (void *arg)
AI_CriticalSection AI_CreateCriticalSection ()
bool SupportsThreadPriority ()
int GetWin32Priority (int priority)
u64 GetNow ()
 Return current time in microseconds.

int strcmp_case (const char *a, const char *b)
 ADR_EXPORT (int, AdrGetSampleSize)(SampleFormat format)
u16 read16_le (const u8 *b)
u16 read16_be (const u8 *b)
u32 read32_le (const u8 *b)
u32 read32_be (const u8 *b)
int GetFileLength (File *file)
SampleSourceOpenBufferStream (void *samples, int sample_count, int channel_count, int sample_rate, SampleFormat sample_format)

Variables

int frame_count
int int channel_count
int int int sample_rate
SampleSourcesource
AI_CriticalSection AI_CreateCriticalSection ()


Typedef Documentation

typedef AI_CriticalSectionStruct* audiere::AI_CriticalSection
 

Definition at line 19 of file threads.h.

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

Definition at line 16 of file threads.h.

Referenced by AI_CreateThread().

typedef RefPtr<AudioDevice> audiere::AudioDevicePtr
 

Definition at line 474 of file audiere.h.

typedef RefPtr<File> audiere::FilePtr
 

Definition at line 211 of file audiere.h.

typedef ogg_int64_t audiere::int64_t
 

Definition at line 9 of file input_ogg.cpp.

typedef RefPtr<OutputStream> audiere::OutputStreamPtr
 

Definition at line 407 of file audiere.h.

typedef signed short audiere::s16
 

Definition at line 22 of file types.h.

Referenced by audiere::SineWave::read(), audiere::SquareWave::read(), audiere::PinkNoise::read(), audiere::WhiteNoise::read(), audiere::MixerDevice::read(), and u8tos16().

typedef signed long audiere::s32
 

Definition at line 24 of file types.h.

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

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 RefPtr<SampleBuffer> audiere::SampleBufferPtr
 

Definition at line 519 of file audiere.h.

typedef RefPtr<SampleSource> audiere::SampleSourcePtr
 

Definition at line 289 of file audiere.h.

typedef RefPtr<SoundEffect> audiere::SoundEffectPtr
 

Definition at line 558 of file audiere.h.

typedef unsigned short audiere::u16
 

Definition at line 21 of file types.h.

Referenced by audiere::Resampler::read(), read16_be(), and read16_le().

typedef unsigned long audiere::u32
 

Definition at line 23 of file types.h.

Referenced by audiere::WAVInputStream::initialize(), audiere::OGGInputStream::read(), audiere::MODInputStream::read(), read32_be(), and read32_le().

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.

Referenced by audiere::BufferStream::BufferStream(), audiere::MyLoader::getbytedirect(), audiere::WAVInputStream::initialize(), audiere::QueueBuffer::QueueBuffer(), audiere::WAVInputStream::read(), audiere::OGGInputStream::read(), audiere::MP3InputStream::read(), audiere::FLACInputStream::read(), read16_be(), read16_le(), read32_be(), read32_le(), audiere::SampleBufferImpl::SampleBufferImpl(), u8tos16(), audiere::ALAudioDevice::update(), audiere::QueueBuffer::write(), and audiere::QueueBuffer::~QueueBuffer().


Enumeration Type Documentation

enum audiere::SampleFormat
 

Storage formats for sample data.

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

Definition at line 215 of file audiere.h.

Referenced by ADR_EXPORT(), audiere::BufferStream::BufferStream(), CreateSampleBuffer(), audiere::DSOutputStream::DSOutputStream(), audiere::SineWave::getFormat(), audiere::SquareWave::getFormat(), audiere::SampleBufferImpl::getFormat(), audiere::BufferStream::getFormat(), audiere::Resampler::getFormat(), audiere::RepeatableStream::getFormat(), audiere::PinkNoise::getFormat(), audiere::WhiteNoise::getFormat(), audiere::WAVInputStream::getFormat(), audiere::OGGInputStream::getFormat(), audiere::MP3InputStream::getFormat(), audiere::MODInputStream::getFormat(), audiere::FLACInputStream::getFormat(), GetSampleSize(), audiere::OALAudioDevice::openBuffer(), audiere::NullAudioDevice::openBuffer(), audiere::MixerDevice::openBuffer(), audiere::DSAudioDevice::openBuffer(), audiere::ThreadedDevice::openBuffer(), OpenBufferStream(), audiere::OALAudioDevice::openStream(), audiere::DSAudioDevice::openStream(), audiere::RepeatableStream::RepeatableStream(), and audiere::SampleBufferImpl::SampleBufferImpl().

enum audiere::SoundEffectType
 

Defines the type of SoundEffect objects.

See also:
SoundEffect
Enumeration values:
SINGLE 
MULTIPLE 

Definition at line 525 of file audiere.h.

Referenced by OpenSoundEffect().


Function Documentation

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

Definition at line 634 of file audiere.h.

Referenced by GetSupportedFileFormats().

ADR_EXPORT int   ,
AdrGetSampleSize   
 

Definition at line 73 of file utility.cpp.

References SampleFormat, SF_S16, and SF_U8.

ADR_EXPORT SoundEffect  ,
AdrOpenSoundEffect   
 

ADR_EXPORT OutputStream  ,
AdrOpenSound   
 

ADR_EXPORT SampleBuffer  ,
AdrCreateSampleBuffer   
 

audiere::ADR_EXPORT SampleSource  ,
AdrOpenSampleSource   
const
 

Definition at line 118 of file input.cpp.

References OpenDefaultFile(), and OpenSource().

audiere::ADR_EXPORT const char *   ,
AdrGetSupportedFileFormats   
 

Definition at line 29 of file input.cpp.

ADR_EXPORT AudioDevice  ,
AdrOpenDevice   
const
 

AI_CriticalSection AI_CreateCriticalSection  
 

Definition at line 52 of file threads_posix.cpp.

References audiere::AI_CriticalSectionStruct::mutex.

Referenced by audiere::Synchronized::Synchronized().

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

Definition at line 27 of file threads_posix.cpp.

References AI_ThreadRoutine, audiere::ThreadInternal::opaque, audiere::ThreadInternal::routine, and ThreadRoutine().

Referenced by audiere::ThreadedDevice::ThreadedDevice().

void audiere::AI_DestroyCriticalSection AI_CriticalSection    cs
 

Definition at line 63 of file threads_posix.cpp.

References audiere::AI_CriticalSectionStruct::mutex.

Referenced by audiere::Synchronized::~Synchronized().

void audiere::AI_EnterCriticalSection AI_CriticalSection    cs
 

Definition at line 67 of file threads_posix.cpp.

References audiere::AI_CriticalSectionStruct::mutex.

Referenced by audiere::Synchronized::lock().

void audiere::AI_LeaveCriticalSection AI_CriticalSection    cs
 

Definition at line 71 of file threads_posix.cpp.

References audiere::AI_CriticalSectionStruct::mutex.

Referenced by audiere::Synchronized::unlock().

void audiere::AI_Sleep unsigned    milliseconds
 

Definition at line 43 of file threads_posix.cpp.

Referenced by audiere::NullAudioDevice::update(), and audiere::ThreadedDevice::~ThreadedDevice().

SampleSource* 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 763 of file audiere.h.

SampleBuffer* CreateSampleBuffer SampleSource   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 857 of file audiere.h.

References audiere::hidden::source.

SampleBuffer* 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 836 of file audiere.h.

References audiere::hidden::channel_count, audiere::hidden::frame_count, audiere::hidden::sample_format, audiere::hidden::sample_rate, and SampleFormat.

Referenced by OpenBufferStream().

SampleSource* 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 743 of file audiere.h.

SampleSource* 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 732 of file audiere.h.

SampleSource* CreateWhiteNoise   [inline]
 

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

Returns :
white noise sample source

Definition at line 753 of file audiere.h.

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

Definition at line 55 of file device.cpp.

References ADR_GUARD, audiere::hidden::parameters, TRY_DEVICE, and TRY_GROUP.

bool end_is const char *    begin,
const char *    ext
 

Definition at line 18 of file input.cpp.

References strcmp_case().

Referenced by OpenSource().

int GetFileLength File   file [inline]
 

Definition at line 81 of file utility.h.

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

Referenced by audiere::MyFLACDecoder::eof_callback(), and audiere::MyFLACDecoder::length_callback().

u64 audiere::GetNow  
 

Return current time in microseconds.

Definition at line 5 of file timer_ansi.cpp.

int 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 677 of file audiere.h.

References SampleFormat.

Referenced by audiere::BufferStream::BufferStream(), audiere::DSOutputStream::DSOutputStream(), audiere::FLACInputStream::getPosition(), audiere::DSAudioDevice::openBuffer(), audiere::DSAudioDevice::openStream(), audiere::WAVInputStream::read(), audiere::OGGInputStream::read(), audiere::MP3InputStream::read(), audiere::FLACInputStream::read(), audiere::RepeatableStream::RepeatableStream(), audiere::SampleBufferImpl::SampleBufferImpl(), and audiere::WAVInputStream::setPosition().

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

Populates a vector of FileFormatDesc structs.

Definition at line 655 of file audiere.h.

References _SplitString().

const char* GetVersion   [inline]
 

Returns the Audiere version string.

Returns :
Audiere version information

Definition at line 620 of file audiere.h.

int GetWin32Priority int    priority
 

Definition at line 37 of file threads_win32.cpp.

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

Definition at line 99 of file utility.h.

References CreateSampleBuffer(), audiere::SampleBuffer::openStream(), audiere::hidden::sample_format, and SampleFormat.

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

File * audiere::OpenDefaultFile const char *    filename
 

Definition at line 42 of file file_ansi.cpp.

Referenced by ADR_EXPORT().

AudioDevice* 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 693 of file audiere.h.

References audiere::hidden::parameters.

SampleSource* OpenSampleSource File   file [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
Returns :
new SampleSource if OpenSampleSource succeeds, 0 otherwise

Definition at line 721 of file audiere.h.

SampleSource* OpenSampleSource const char *    filename [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 707 of file audiere.h.

Referenced by OpenSound(), and OpenSoundEffect().

OutputStream* OpenSound AudioDevice   device,
File   file,
bool    streaming = false
[inline]
 

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

Definition at line 811 of file audiere.h.

References OpenSampleSource(), OpenSound(), and audiere::hidden::streaming.

OutputStream* OpenSound AudioDevice   device,
const char *    filename,
bool    streaming = false
[inline]
 

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

Definition at line 799 of file audiere.h.

References OpenSampleSource(), OpenSound(), and audiere::hidden::streaming.

OutputStream* OpenSound AudioDevice   device,
SampleSource   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.

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 787 of file audiere.h.

References audiere::hidden::source, and audiere::hidden::streaming.

Referenced by OpenSound().

SoundEffect* OpenSoundEffect AudioDevice   device,
File   file,
SoundEffectType    type
[inline]
 

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

Definition at line 899 of file audiere.h.

References OpenSampleSource(), OpenSoundEffect(), SoundEffectType, and audiere::hidden::type.

SoundEffect* OpenSoundEffect AudioDevice   device,
const char *    filename,
SoundEffectType    type
[inline]
 

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

Definition at line 887 of file audiere.h.

References OpenSampleSource(), OpenSoundEffect(), SoundEffectType, and audiere::hidden::type.

SoundEffect* OpenSoundEffect AudioDevice   device,
SampleSource   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 875 of file audiere.h.

References SoundEffectType, audiere::hidden::source, and audiere::hidden::type.

Referenced by OpenSoundEffect().

SampleSource* OpenSource File   raw_file,
const char *    filename
 

The internal implementation of OpenSampleSource.

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

Definition at line 62 of file input.cpp.

References ADR_GUARD, and end_is().

Referenced by ADR_EXPORT().

u16 read16_be const u8   b [inline]
 

Definition at line 68 of file utility.h.

References u16, and u8.

Referenced by read32_be().

u16 read16_le const u8   b [inline]
 

Definition at line 64 of file utility.h.

References u16, and u8.

Referenced by read32_le().

u32 read32_be const u8   b [inline]
 

Definition at line 76 of file utility.h.

References read16_be(), u32, and u8.

u32 read32_le const u8   b [inline]
 

Definition at line 72 of file utility.h.

References read16_le(), u32, and u8.

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

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

Definition at line 56 of file utility.cpp.

Referenced by end_is().

bool SupportsThreadPriority  
 

Definition at line 21 of file threads_win32.cpp.

void* ThreadRoutine void *    arg
 

Definition at line 19 of file threads_posix.cpp.

References audiere::ThreadInternal::opaque, and audiere::ThreadInternal::routine.

Referenced by AI_CreateThread().

s16 u8tos16 u8    u [inline]
 

Definition at line 81 of file resampler.cpp.

References s16, and u8.


Variable Documentation

AI_CriticalSection audiere::AI_CreateCriticalSection
 

Definition at line 94 of file threads_win32.cpp.

int int audiere::channel_count
 

Definition at line 124 of file sample_buffer.cpp.

Referenced by audiere::BufferStream::BufferStream(), audiere::SampleBufferImpl::getFormat(), audiere::BufferStream::getFormat(), and audiere::SampleBufferImpl::SampleBufferImpl().

int audiere::frame_count
 

Definition at line 124 of file sample_buffer.cpp.

Referenced by audiere::BufferStream::read(), and audiere::SampleBufferImpl::SampleBufferImpl().

int int int audiere::sample_rate
 

Definition at line 124 of file sample_buffer.cpp.

Referenced by audiere::BufferStream::BufferStream(), audiere::SampleBufferImpl::getFormat(), audiere::BufferStream::getFormat(), and audiere::SampleBufferImpl::SampleBufferImpl().

SampleSource * audiere::source
 

Definition at line 73 of file sound_effect.cpp.

Referenced by audiere::NullAudioDevice::openBuffer().


Generated on Sat Oct 12 01:43:49 2002 for audiere by doxygen1.2.17