Mixxx

AudioPath Class Reference

Describes a path for audio to take. More...

#include <soundmanagerutil.h>

Inheritance diagram for AudioPath:
Collaboration diagram for AudioPath:

List of all members.

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

Detailed Description

Describes a path for audio to take.

Note:
This needs a new name, the current one sucks. If you find one, feel free to rename as necessary.

Definition at line 49 of file soundmanagerutil.h.


Member Enumeration Documentation

Enumerator:
MASTER 
HEADPHONES 
DECK 
VINYLCONTROL 
MICROPHONE 
EXTPASSTHROUGH 
INVALID 

Definition at line 55 of file soundmanagerutil.h.


Constructor & Destructor Documentation

AudioPath::AudioPath ( unsigned char  channelBase,
unsigned char  channels 
)

Constructs an AudioPath object (must be called by a child class's constructor, AudioPath is abstract).

Parameters:
channelBasethe first channel on a sound device used by this AudioPath.
channelsthe number of channels used.

Definition at line 85 of file soundmanagerutil.cpp.


Member Function Documentation

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.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char AudioPath::channelsNeededForType ( AudioPathType  type) [static]

Returns the number of channels needed on a sound device for an AudioPathType.

Note:
This method is static.

Definition at line 255 of file soundmanagerutil.cpp.

Here is the caller graph for this function:

ChannelGroup AudioPath::getChannelGroup ( ) const
Returns:
This AudioPath's ChannelGroup instance.

Definition at line 99 of file soundmanagerutil.cpp.

Here is the caller graph for this function:

unsigned int AudioPath::getHash ( ) const

Generates a hash of this AudioPath, so it can act as a key in a QHash.

Returns:
a hash for this AudioPath

Definition at line 123 of file soundmanagerutil.cpp.

Here is the caller graph for this function:

unsigned char AudioPath::getIndex ( ) const
Returns:
This AudioPath's index, or 0 if this AudioPath isn't indexable.

Definition at line 106 of file soundmanagerutil.cpp.

Here is the caller graph for this function:

QString AudioPath::getString ( ) const

Returns a string describing the AudioPath for user benefit.

Definition at line 138 of file soundmanagerutil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString AudioPath::getStringFromType ( AudioPathType  type) [static]

Returns a string given an AudioPathType.

Note:
This method is static.
For user-facing usage, see getTrStringFromType

Definition at line 151 of file soundmanagerutil.cpp.

Here is the caller graph for this function:

QString AudioPath::getTrStringFromType ( AudioPathType  type) [static]

Returns a translated string given an AudioPathType.

Note:
This method is static.

Definition at line 177 of file soundmanagerutil.cpp.

Here is the caller graph for this function:

AudioPathType AudioPath::getType ( ) const
Returns:
This AudioPath's type

Definition at line 92 of file soundmanagerutil.cpp.

Here is the caller graph for this function:

AudioPathType AudioPath::getTypeFromInt ( int  typeInt) [static]

Returns an AudioPathType given an int.

Note:
This method is static.

Definition at line 243 of file soundmanagerutil.cpp.

AudioPathType AudioPath::getTypeFromString ( QString  string) [static]

Returns an AudioPathType given a string.

Note:
This method is static.

Definition at line 203 of file soundmanagerutil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool AudioPath::isIndexed ( AudioPathType  type) [static]

Defines whether or not an AudioPathType can be indexed.

Note:
This method is static.

Definition at line 226 of file soundmanagerutil.cpp.

Here is the caller graph for this function:

bool AudioPath::operator== ( const AudioPath other) const

Defines equality for AudioPath objects.

Returns:
true of this and other share a common type and index.

Definition at line 114 of file soundmanagerutil.cpp.

virtual void AudioPath::setType ( AudioPathType  type) [protected, pure virtual]

Implemented in AudioOutput, and AudioInput.


Member Data Documentation

Definition at line 81 of file soundmanagerutil.h.

unsigned char AudioPath::m_index [protected]

Definition at line 82 of file soundmanagerutil.h.

Definition at line 80 of file soundmanagerutil.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines