![]() |
Mixxx
|
Describes a path for audio to take. More...
#include <soundmanagerutil.h>
Public Types | |
enum | AudioPathType { MASTER, HEADPHONES, DECK, VINYLCONTROL, MICROPHONE, EXTPASSTHROUGH, INVALID } |
Public Member Functions | |
AudioPath (unsigned char channelBase, unsigned char channels) | |
AudioPathType | getType () const |
ChannelGroup | getChannelGroup () const |
unsigned char | getIndex () const |
bool | operator== (const AudioPath &other) const |
unsigned int | getHash () const |
bool | channelsClash (const AudioPath &other) const |
QString | getString () const |
Static Public Member Functions | |
static QString | getStringFromType (AudioPathType type) |
static QString | getTrStringFromType (AudioPathType type) |
static AudioPathType | getTypeFromString (QString string) |
static bool | isIndexed (AudioPathType type) |
static AudioPathType | getTypeFromInt (int typeInt) |
static unsigned char | channelsNeededForType (AudioPathType type) |
Protected Member Functions | |
virtual void | setType (AudioPathType type)=0 |
Protected Attributes | |
AudioPathType | m_type |
ChannelGroup | m_channelGroup |
unsigned char | m_index |
Describes a path for audio to take.
Definition at line 49 of file soundmanagerutil.h.
Definition at line 55 of file soundmanagerutil.h.
AudioPath::AudioPath | ( | unsigned char | channelBase, |
unsigned char | channels | ||
) |
Constructs an AudioPath object (must be called by a child class's constructor, AudioPath is abstract).
channelBase | the first channel on a sound device used by this AudioPath. |
channels | the number of channels used. |
Definition at line 85 of file soundmanagerutil.cpp.
bool AudioPath::channelsClash | ( | const AudioPath & | other | ) | const |
Checks if this AudioPath's channels clash with another's (see ChannelGroup::clashesWith).
Definition at line 131 of file soundmanagerutil.cpp.
unsigned char AudioPath::channelsNeededForType | ( | AudioPathType | type | ) | [static] |
Returns the number of channels needed on a sound device for an AudioPathType.
Definition at line 255 of file soundmanagerutil.cpp.
ChannelGroup AudioPath::getChannelGroup | ( | ) | const |
Definition at line 99 of file soundmanagerutil.cpp.
unsigned int AudioPath::getHash | ( | ) | const |
Generates a hash of this AudioPath, so it can act as a key in a QHash.
Definition at line 123 of file soundmanagerutil.cpp.
unsigned char AudioPath::getIndex | ( | ) | const |
Definition at line 106 of file soundmanagerutil.cpp.
QString AudioPath::getString | ( | ) | const |
Returns a string describing the AudioPath for user benefit.
Definition at line 138 of file soundmanagerutil.cpp.
QString AudioPath::getStringFromType | ( | AudioPathType | type | ) | [static] |
Returns a string given an AudioPathType.
Definition at line 151 of file soundmanagerutil.cpp.
QString AudioPath::getTrStringFromType | ( | AudioPathType | type | ) | [static] |
Returns a translated string given an AudioPathType.
Definition at line 177 of file soundmanagerutil.cpp.
AudioPathType AudioPath::getType | ( | ) | const |
Definition at line 92 of file soundmanagerutil.cpp.
AudioPathType AudioPath::getTypeFromInt | ( | int | typeInt | ) | [static] |
Returns an AudioPathType given an int.
Definition at line 243 of file soundmanagerutil.cpp.
AudioPathType AudioPath::getTypeFromString | ( | QString | string | ) | [static] |
Returns an AudioPathType given a string.
Definition at line 203 of file soundmanagerutil.cpp.
bool AudioPath::isIndexed | ( | AudioPathType | type | ) | [static] |
Defines whether or not an AudioPathType can be indexed.
Definition at line 226 of file soundmanagerutil.cpp.
bool AudioPath::operator== | ( | const AudioPath & | other | ) | const |
Defines equality for AudioPath objects.
Definition at line 114 of file soundmanagerutil.cpp.
virtual void AudioPath::setType | ( | AudioPathType | type | ) | [protected, pure virtual] |
Implemented in AudioOutput, and AudioInput.
ChannelGroup AudioPath::m_channelGroup [protected] |
Definition at line 81 of file soundmanagerutil.h.
unsigned char AudioPath::m_index [protected] |
Definition at line 82 of file soundmanagerutil.h.
AudioPathType AudioPath::m_type [protected] |
Definition at line 80 of file soundmanagerutil.h.