Om
1.0.0
A universal framework for multimedia simulation
|
An enum wrapper class that specifies the semantic usage of a channel of audio. More...
#include <omSoundChannelType.h>
Public Types | |
enum | Enum { LEFT = 0, FRONT_LEFT = LEFT, RIGHT = 1, FRONT_RIGHT = RIGHT, CENTER = 2, FRONT_CENTER = CENTER, LOW_FREQUENCY = 3, SURROUND_LEFT = 4, SURROUND_RIGHT = 5, BACK_LEFT = 6, BACK_RIGHT = 7, FRONT_LEFT_OF_CENTER = 8, FRONT_RIGHT_OF_CENTER = 9, BACK_CENTER = 10, MONO, UNDEFINED } |
The underlying enum type that specifies the type of a sample of audio data. More... | |
Public Member Functions | |
ChannelType () | |
Create a new channel type object with the undefined channel type enum value. More... | |
ChannelType (Enum newType) | |
Create a new channel type object with the specified channel type enum value. More... | |
operator Enum () const | |
Convert this channel type to an enum value. More... | |
Index | getChannelIndex () const |
Return the cannonical channel index associated with this channel type. More... | |
Vector3f | getPosition () const |
Return a 3D vector representing the cannonical position for this channel type's speaker. More... | |
String | getAbbreviation () const |
Return a short abbreviation string for this channel type's string representation. More... | |
String | toString () const |
Return a string representation of the channel type. More... | |
String | getName () const |
Return a string representing a human-readable name of this channel type. More... | |
operator data::String () const | |
Convert this channel type into a string representation. More... | |
An enum wrapper class that specifies the semantic usage of a channel of audio.
This class allows channels of audio to be tagged with their semantic usage. Classes that process that audio can then alter their processing depending on the semantic usage of the channel.
The underlying enum type that specifies the type of a sample of audio data.
|
inline |
Create a new channel type object with the undefined channel type enum value.
|
inline |
Create a new channel type object with the specified channel type enum value.
|
inline |
Convert this channel type to an enum value.
This operator is provided so that the ChannelType object can be used directly in a switch statement without the need to explicitly access the underlying enum value.
Index om::sound::base::ChannelType::getChannelIndex | ( | ) | const |
Return the cannonical channel index associated with this channel type.
Vector3f om::sound::base::ChannelType::getPosition | ( | ) | const |
Return a 3D vector representing the cannonical position for this channel type's speaker.
The direction returned is in the right-handed 3D coordinate system where -z is forward, +x is to the right, and +y is up. The direction may not be accurate for all kinds of speaker layouts, but points to the general position where the speaker should be located.
Some channel types may have a length-zero position vector, indicating they are not positional, like MONO and LOW_FREQUENCY channels.
String om::sound::base::ChannelType::getAbbreviation | ( | ) | const |
Return a short abbreviation string for this channel type's string representation.
String om::sound::base::ChannelType::toString | ( | ) | const |
Return a string representation of the channel type.
|
inline |
Return a string representing a human-readable name of this channel type.
|
inline |
Convert this channel type into a string representation.