Blender V2.61 - r43446
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_COMPARE_SPECS(s1, s2)   ((s1.rate == s2.rate) && (s1.channels == s2.channels))
 Compares two audio data specifications.
#define AUD_CHANNEL_BIT(channel)   (0x01 << channel)
 Returns the bit for a channel mask.
#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)
typedef double AUD_SampleRate
 Sample rate type.

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
}
 

The channel count.

More...
enum  AUD_Channel {
  AUD_CHANNEL_FRONT_LEFT = 0, AUD_CHANNEL_FRONT_RIGHT, AUD_CHANNEL_FRONT_CENTER, AUD_CHANNEL_LFE,
  AUD_CHANNEL_REAR_LEFT, AUD_CHANNEL_REAR_RIGHT, AUD_CHANNEL_REAR_CENTER, AUD_CHANNEL_SIDE_LEFT,
  AUD_CHANNEL_SIDE_RIGHT, AUD_CHANNEL_MAX
}
 

The channel names.

More...
enum  AUD_DefaultSampleRate {
  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...
enum  AUD_AnimateablePropertyType {
  AUD_AP_VOLUME, AUD_AP_PANNING, AUD_AP_PITCH, AUD_AP_LOCATION,
  AUD_AP_ORIENTATION
}
 

Possible animatable properties for Sequencer Factories and Entries.

More...
enum  AUD_Container {
  AUD_CONTAINER_INVALID = 0, AUD_CONTAINER_AC3, AUD_CONTAINER_FLAC, AUD_CONTAINER_MATROSKA,
  AUD_CONTAINER_MP2, AUD_CONTAINER_MP3, AUD_CONTAINER_OGG, AUD_CONTAINER_WAV
}
 

Container formats for writers.

More...
enum  AUD_Codec {
  AUD_CODEC_INVALID = 0, AUD_CODEC_AAC, AUD_CODEC_AC3, AUD_CODEC_FLAC,
  AUD_CODEC_MP2, AUD_CODEC_MP3, AUD_CODEC_PCM, AUD_CODEC_VORBIS
}
 

Audio codecs for writers.

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 55 of file AUD_Space.h.

Referenced by AUD_StreamBufferFactory::AUD_StreamBufferFactory().

#define AUD_CHANNEL_BIT (   channel)    (0x01 << channel)

Returns the bit for a channel mask.

Definition at line 46 of file AUD_Space.h.

#define AUD_COMPARE_SPECS (   s1,
  s2 
)    ((s1.rate == s2.rate) && (s1.channels == s2.channels))

Compares two audio data specifications.

Definition at line 43 of file AUD_Space.h.

Referenced by AUD_ReadDevice::changeSpecs(), AUD_DoubleReader::read(), and AUD_SuperposeReader::read().

#define AUD_DEFAULT_BUFFER_SIZE   1024

The default playback buffer size of a device.

Definition at line 58 of file AUD_Space.h.

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

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

The size of a format in bytes.

Definition at line 34 of file AUD_Space.h.

Referenced by AUD_FFMPEGReader::read().

#define AUD_MAX (   a,
 
)    (((a) > (b)) ? (a) : (b))
#define AUD_MIN (   a,
 
)    (((a) < (b)) ? (a) : (b))
#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 double AUD_SampleRate

Sample rate type.

Definition at line 207 of file AUD_Space.h.

typedef unsigned char data_t

Sample data type (format samples)

Definition at line 204 of file AUD_Space.h.

typedef float sample_t

Sample type.(float samples)

Definition at line 201 of file AUD_Space.h.


Enumeration Type Documentation

Possible animatable properties for Sequencer Factories and Entries.

Enumerator:
AUD_AP_VOLUME 
AUD_AP_PANNING 
AUD_AP_PITCH 
AUD_AP_LOCATION 
AUD_AP_ORIENTATION 

Definition at line 165 of file AUD_Space.h.

The channel names.

Enumerator:
AUD_CHANNEL_FRONT_LEFT 
AUD_CHANNEL_FRONT_RIGHT 
AUD_CHANNEL_FRONT_CENTER 
AUD_CHANNEL_LFE 
AUD_CHANNEL_REAR_LEFT 
AUD_CHANNEL_REAR_RIGHT 
AUD_CHANNEL_REAR_CENTER 
AUD_CHANNEL_SIDE_LEFT 
AUD_CHANNEL_SIDE_RIGHT 
AUD_CHANNEL_MAX 

Definition at line 90 of file AUD_Space.h.

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.

Definition at line 76 of file AUD_Space.h.

enum AUD_Codec

Audio codecs for writers.

Enumerator:
AUD_CODEC_INVALID 
AUD_CODEC_AAC 
AUD_CODEC_AC3 
AUD_CODEC_FLAC 
AUD_CODEC_MP2 
AUD_CODEC_MP3 
AUD_CODEC_PCM 
AUD_CODEC_VORBIS 

Definition at line 188 of file AUD_Space.h.

Container formats for writers.

Enumerator:
AUD_CONTAINER_INVALID 
AUD_CONTAINER_AC3 
AUD_CONTAINER_FLAC 
AUD_CONTAINER_MATROSKA 
AUD_CONTAINER_MP2 
AUD_CONTAINER_MP3 
AUD_CONTAINER_OGG 
AUD_CONTAINER_WAV 

Definition at line 175 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 108 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 153 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 132 of file AUD_Space.h.

Fading types.

Enumerator:
AUD_FADE_IN 
AUD_FADE_OUT 

Definition at line 146 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 64 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 124 of file AUD_Space.h.