Blender  V2.59
Classes | Defines | Typedefs | Enumerations
AUD_Space.h File Reference

Go to the source code of this file.

Classes

struct  AUD_Specs
 Specification of a sound source. More...
struct  AUD_DeviceSpecs
 Specification of a sound device. More...
struct  AUD_Exception
 Exception structure. More...

Defines

#define AUD_FORMAT_SIZE(format)   (format & 0x0F)
 The size of a format in bytes.
#define AUD_DEVICE_SAMPLE_SIZE(specs)   (specs.channels * (specs.format & 0x0F))
 The size of a sample in the specified device format in bytes.
#define AUD_SAMPLE_SIZE(specs)   (specs.channels * sizeof(sample_t))
 The size of a sample in the specified format in bytes.
#define AUD_THROW(exception, errorstr)   { AUD_Exception e; e.error = exception; e.str = errorstr; throw e; }
 Throws a AUD_Exception with the provided error code.
#define AUD_MIN(a, b)   (((a) < (b)) ? (a) : (b))
 Returns the smaller of the two values.
#define AUD_MAX(a, b)   (((a) > (b)) ? (a) : (b))
 Returns the bigger of the two values.
#define AUD_BUFFER_RESIZE_BYTES   5292000
 The size by which a buffer should be resized if the final extent is unknown.
#define AUD_DEFAULT_BUFFER_SIZE   1024
 The default playback buffer size of a device.

Typedefs

typedef float sample_t
 Sample type.(float samples)
typedef unsigned char data_t
 Sample data type (format samples)

Enumerations

enum  AUD_SampleFormat {
  AUD_FORMAT_INVALID = 0x00, AUD_FORMAT_U8 = 0x01, AUD_FORMAT_S16 = 0x12, AUD_FORMAT_S24 = 0x13,
  AUD_FORMAT_S32 = 0x14, AUD_FORMAT_FLOAT32 = 0x24, AUD_FORMAT_FLOAT64 = 0x28
}
enum  AUD_Channels {
  AUD_CHANNELS_INVALID = 0, AUD_CHANNELS_MONO = 1, AUD_CHANNELS_STEREO = 2, AUD_CHANNELS_STEREO_LFE = 3,
  AUD_CHANNELS_SURROUND4 = 4, AUD_CHANNELS_SURROUND5 = 5, AUD_CHANNELS_SURROUND51 = 6, AUD_CHANNELS_SURROUND61 = 7,
  AUD_CHANNELS_SURROUND71 = 8, AUD_CHANNELS_SURROUND72 = 9
}
 The channel count. More...
enum  AUD_SampleRate {
  AUD_RATE_INVALID = 0, AUD_RATE_8000 = 8000, AUD_RATE_16000 = 16000, AUD_RATE_11025 = 11025,
  AUD_RATE_22050 = 22050, AUD_RATE_32000 = 32000, AUD_RATE_44100 = 44100, AUD_RATE_48000 = 48000,
  AUD_RATE_88200 = 88200, AUD_RATE_96000 = 96000, AUD_RATE_192000 = 192000
}
enum  AUD_Status { AUD_STATUS_INVALID = 0, AUD_STATUS_PLAYING, AUD_STATUS_PAUSED }
 Status of a playback handle. More...
enum  AUD_Error {
  AUD_NO_ERROR = 0, AUD_ERROR_SPECS, AUD_ERROR_PROPS, AUD_ERROR_FILE,
  AUD_ERROR_SRC, AUD_ERROR_FFMPEG, AUD_ERROR_OPENAL, AUD_ERROR_SDL,
  AUD_ERROR_JACK
}
 Error codes for exceptions (C++ library) or for return values (C API). More...
enum  AUD_FadeType { AUD_FADE_IN, AUD_FADE_OUT }
 Fading types. More...
enum  AUD_DistanceModel {
  AUD_DISTANCE_MODEL_INVALID = 0, AUD_DISTANCE_MODEL_INVERSE, AUD_DISTANCE_MODEL_INVERSE_CLAMPED, AUD_DISTANCE_MODEL_LINEAR,
  AUD_DISTANCE_MODEL_LINEAR_CLAMPED, AUD_DISTANCE_MODEL_EXPONENT, AUD_DISTANCE_MODEL_EXPONENT_CLAMPED
}
 Possible distance models for the 3D device. More...

Detailed Description

Definition in file AUD_Space.h.


Define Documentation

#define AUD_BUFFER_RESIZE_BYTES   5292000

The size by which a buffer should be resized if the final extent is unknown.

Definition at line 51 of file AUD_Space.h.

Referenced by AUD_StreamBufferFactory::AUD_StreamBufferFactory().

#define AUD_DEFAULT_BUFFER_SIZE   1024

The default playback buffer size of a device.

Definition at line 54 of file AUD_Space.h.

Referenced by AUD_LimiterReader::AUD_LimiterReader(), and Device_new().

#define AUD_DEVICE_SAMPLE_SIZE (   specs)    (specs.channels * (specs.format & 0x0F))

The size of a sample in the specified device format in bytes.

Definition at line 38 of file AUD_Space.h.

Referenced by AUD_OpenALDevice::play(), AUD_ReadDevice::read(), AUD_OpenALDevice::seek(), and AUD_OpenALDevice::updateStreams().

#define AUD_FORMAT_SIZE (   format)    (format & 0x0F)

The size of a format in bytes.

Definition at line 36 of file AUD_Space.h.

#define AUD_MAX (   a,
 
)    (((a) > (b)) ? (a) : (b))

Returns the bigger of the two values.

Definition at line 47 of file AUD_Space.h.

Referenced by AUD_SuperposeReader::getPosition(), and AUD_SuperposeReader::read().

#define AUD_MIN (   a,
 
)    (((a) < (b)) ? (a) : (b))

Returns the smaller of the two values.

Definition at line 45 of file AUD_Space.h.

Referenced by AUD_SuperposeReader::getLength(), AUD_LimiterReader::getPosition(), and AUD_Buffer::resize().

#define AUD_SAMPLE_SIZE (   specs)    (specs.channels * sizeof(sample_t))
#define AUD_THROW (   exception,
  errorstr 
)    { AUD_Exception e; e.error = exception; e.str = errorstr; throw e; }

Typedef Documentation

typedef unsigned char data_t

Sample data type (format samples)

Definition at line 150 of file AUD_Space.h.

typedef float sample_t

Sample type.(float samples)

Definition at line 147 of file AUD_Space.h.


Enumeration Type Documentation

The channel count.

Enumerator:
AUD_CHANNELS_INVALID 
AUD_CHANNELS_MONO 

Invalid channel count.

AUD_CHANNELS_STEREO 

Mono.

AUD_CHANNELS_STEREO_LFE 

Stereo.

AUD_CHANNELS_SURROUND4 

Stereo with LFE channel.

AUD_CHANNELS_SURROUND5 

4 channel surround sound.

AUD_CHANNELS_SURROUND51 

5 channel surround sound.

AUD_CHANNELS_SURROUND61 

5.1 surround sound.

AUD_CHANNELS_SURROUND71 

6.1 surround sound.

AUD_CHANNELS_SURROUND72 

7.1 surround sound.

Definition at line 72 of file AUD_Space.h.

Possible distance models for the 3D device.

Enumerator:
AUD_DISTANCE_MODEL_INVALID 
AUD_DISTANCE_MODEL_INVERSE 
AUD_DISTANCE_MODEL_INVERSE_CLAMPED 
AUD_DISTANCE_MODEL_LINEAR 
AUD_DISTANCE_MODEL_LINEAR_CLAMPED 
AUD_DISTANCE_MODEL_EXPONENT 
AUD_DISTANCE_MODEL_EXPONENT_CLAMPED 

Definition at line 135 of file AUD_Space.h.

enum AUD_Error

Error codes for exceptions (C++ library) or for return values (C API).

Enumerator:
AUD_NO_ERROR 
AUD_ERROR_SPECS 
AUD_ERROR_PROPS 
AUD_ERROR_FILE 
AUD_ERROR_SRC 
AUD_ERROR_FFMPEG 
AUD_ERROR_OPENAL 
AUD_ERROR_SDL 
AUD_ERROR_JACK 

Definition at line 114 of file AUD_Space.h.

Fading types.

Enumerator:
AUD_FADE_IN 
AUD_FADE_OUT 

Definition at line 128 of file AUD_Space.h.

The format of a sample. The last 4 bit save the byte count of the format.

Enumerator:
AUD_FORMAT_INVALID 
AUD_FORMAT_U8 

Invalid sample format.

AUD_FORMAT_S16 

1 byte unsigned byte.

AUD_FORMAT_S24 

2 byte signed integer.

AUD_FORMAT_S32 

3 byte signed integer.

AUD_FORMAT_FLOAT32 

4 byte signed integer.

AUD_FORMAT_FLOAT64 

4 byte float.

Definition at line 60 of file AUD_Space.h.

The sample rate tells how many samples are played back within one second. Some exotic formats may use other sample rates than provided here.

Enumerator:
AUD_RATE_INVALID 
AUD_RATE_8000 

Invalid sample rate.

AUD_RATE_16000 

8000 Hz.

AUD_RATE_11025 

16000 Hz.

AUD_RATE_22050 

11025 Hz.

AUD_RATE_32000 

22050 Hz.

AUD_RATE_44100 

32000 Hz.

AUD_RATE_48000 

44100 Hz.

AUD_RATE_88200 

48000 Hz.

AUD_RATE_96000 

88200 Hz.

AUD_RATE_192000 

96000 Hz.

Definition at line 90 of file AUD_Space.h.

enum AUD_Status

Status of a playback handle.

Enumerator:
AUD_STATUS_INVALID 
AUD_STATUS_PLAYING 

Invalid handle. Maybe due to stopping.

AUD_STATUS_PAUSED 

Sound is playing.

Sound is being paused.

Definition at line 106 of file AUD_Space.h.