Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/audaspace/intern/AUD_Space.h')
-rw-r--r--intern/audaspace/intern/AUD_Space.h69
1 files changed, 64 insertions, 5 deletions
diff --git a/intern/audaspace/intern/AUD_Space.h b/intern/audaspace/intern/AUD_Space.h
index ee28a05b80d..6720dd3b4b5 100644
--- a/intern/audaspace/intern/AUD_Space.h
+++ b/intern/audaspace/intern/AUD_Space.h
@@ -41,6 +41,12 @@
/// Throws a AUD_Exception with the provided error code.
#define AUD_THROW(exception, errorstr) { AUD_Exception e; e.error = exception; e.str = errorstr; throw e; }
+/// Compares two audio data specifications.
+#define AUD_COMPARE_SPECS(s1, s2) ((s1.rate == s2.rate) && (s1.channels == s2.channels))
+
+/// Returns the bit for a channel mask.
+#define AUD_CHANNEL_BIT(channel) (0x01 << channel)
+
/// Returns the smaller of the two values.
#define AUD_MIN(a, b) (((a) < (b)) ? (a) : (b))
/// Returns the bigger of the two values.
@@ -79,10 +85,24 @@ typedef enum
AUD_CHANNELS_SURROUND5 = 5, /// 5 channel surround sound.
AUD_CHANNELS_SURROUND51 = 6, /// 5.1 surround sound.
AUD_CHANNELS_SURROUND61 = 7, /// 6.1 surround sound.
- AUD_CHANNELS_SURROUND71 = 8, /// 7.1 surround sound.
- AUD_CHANNELS_SURROUND72 = 9 /// 7.2 surround sound.
+ AUD_CHANNELS_SURROUND71 = 8 /// 7.1 surround sound.
} AUD_Channels;
+/// The channel names.
+typedef enum
+{
+ 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
+} AUD_Channel;
+
/**
* The sample rate tells how many samples are played back within one second.
* Some exotic formats may use other sample rates than provided here.
@@ -100,7 +120,7 @@ typedef enum
AUD_RATE_88200 = 88200, /// 88200 Hz.
AUD_RATE_96000 = 96000, /// 96000 Hz.
AUD_RATE_192000 = 192000 /// 192000 Hz.
-} AUD_SampleRate;
+} AUD_DefaultSampleRate;
/// Status of a playback handle.
typedef enum
@@ -121,7 +141,7 @@ typedef enum
AUD_ERROR_FFMPEG,
AUD_ERROR_OPENAL,
AUD_ERROR_SDL,
- AUD_ERROR_JACK,
+ AUD_ERROR_JACK
} AUD_Error;
/// Fading types.
@@ -140,15 +160,54 @@ typedef enum
AUD_DISTANCE_MODEL_LINEAR,
AUD_DISTANCE_MODEL_LINEAR_CLAMPED,
AUD_DISTANCE_MODEL_EXPONENT,
- AUD_DISTANCE_MODEL_EXPONENT_CLAMPED,
+ AUD_DISTANCE_MODEL_EXPONENT_CLAMPED
} AUD_DistanceModel;
+/// Possible animatable properties for Sequencer Factories and Entries.
+typedef enum
+{
+ AUD_AP_VOLUME,
+ AUD_AP_PANNING,
+ AUD_AP_PITCH,
+ AUD_AP_LOCATION,
+ AUD_AP_ORIENTATION
+} AUD_AnimateablePropertyType;
+
+/// Container formats for writers.
+typedef enum
+{
+ 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
+} AUD_Container;
+
+/// Audio codecs for writers.
+typedef enum
+{
+ 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
+} AUD_Codec;
+
/// Sample type.(float samples)
typedef float sample_t;
/// Sample data type (format samples)
typedef unsigned char data_t;
+/// Sample rate type.
+typedef double AUD_SampleRate;
+
/// Specification of a sound source.
typedef struct
{