gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
ALSA::MixerElement Class Reference

#include <MixerElement.H>

Collaboration diagram for ALSA::MixerElement:
[legend]

Public Member Functions

 MixerElement ()
 
 MixerElement (snd_mixer_elem_t *e)
 
virtual ~MixerElement ()
 
int setPlaybackSwitch (int v)
 
long setPlaybackVol (long v)
 
long setPlaybackVol (snd_mixer_selem_channel_id_t channel, long v)
 
int setPlaybackVolDB (double &dB)
 
long setPlaybackVolDB (snd_mixer_selem_channel_id_t channel, double &dB)
 
int setCaptureSwitch (int v)
 
long setCaptureVol (long v)
 
long setCaptureVol (snd_mixer_selem_channel_id_t channel, long v)
 
int setCaptureVolDB (double &dB)
 
long setCaptureVolDB (snd_mixer_selem_channel_id_t channel, double &dB)
 

Public Attributes

std::string name
 The mixer element name. More...
 
snd_mixer_elem_t * elem
 The pointer to the element. More...
 
unsigned int index
 The mixer element index. More...
 
bool hasCommonVolume
 element has only one volume control for both playback and capture More...
 
bool hasPlaybackVolume
 0 if no control is present, 1 if it's present More...
 
bool hasPlaybackVolumeJoined
 0 if control is separated per channel, 1 if control acts on all channels together More...
 
bool hasCaptureVolume
 0 if no control is present, 1 if it's present More...
 
bool hasCaptureVolumeJoined
 0 if control is separated per channel, 1 if control acts on all channels together More...
 
bool hasCommonSwitch
 0 separated control, 1 common control More...
 
bool hasPlaybackSwitch
 0 if no control is present, 1 if it's present More...
 
bool hasPlaybackSwitchJoined
 0 if control is separated per channel, 1 if control acts on all channels together More...
 
bool hasCaptureSwitch
 0 if no control is present, 1 if it's present More...
 
bool hasCaptureSwitchJoined
 0 if control is separated per channel, 1 if control acts on all channels together More...
 
bool hasCaptureSwitchExclusive
 0 if control is separated per element, 1 if control acts on other elements too (i.e. only one active at a time inside a group) More...
 
long playbackVolMax
 
long playbackVolMin
 
double playbackVolMaxDB
 
double playbackVolMinDB
 
long captureVolMax
 
long captureVolMin
 
double captureVolMaxDB
 
double captureVolMinDB
 
std::vector< ChannelPlaybackElementplaybackVolumes
 Volume setting for each playback channel in this mixer element. More...
 
std::vector< ChannelCaptureElementcaptureVolumes
 Volume setting for each capture channel in this mixer element. More...
 

Friends

std::ostream & operator<< (std::ostream &os, MixerElement &me)
 

Detailed Description

Class to alter the ALSA hardware mixer

Definition at line 136 of file MixerElement.H.

Constructor & Destructor Documentation

◆ MixerElement() [1/2]

ALSA::MixerElement::MixerElement ( )
inline

Definition at line 164 of file MixerElement.H.

◆ MixerElement() [2/2]

ALSA::MixerElement::MixerElement ( snd_mixer_elem_t *  e)
inline

Definition at line 186 of file MixerElement.H.

Here is the call graph for this function:

◆ ~MixerElement()

virtual ALSA::MixerElement::~MixerElement ( )
inlinevirtual

Definition at line 249 of file MixerElement.H.

Member Function Documentation

◆ setCaptureSwitch()

int ALSA::MixerElement::setCaptureSwitch ( int  v)
inline

Set the capture switch state for all channels, returning the current capture switch state

Parameters
vThe value to set
Returns
<0 on error or the current state of the switch

Definition at line 349 of file MixerElement.H.

Here is the call graph for this function:

◆ setCaptureVol() [1/2]

long ALSA::MixerElement::setCaptureVol ( long  v)
inline

Set the capture volume for all channels, returning the current capture volume

Parameters
vThe value to set
Returns
<0 on error or the current state of the volume

Definition at line 366 of file MixerElement.H.

Here is the call graph for this function:

◆ setCaptureVol() [2/2]

long ALSA::MixerElement::setCaptureVol ( snd_mixer_selem_channel_id_t  channel,
long  v 
)
inline

Set the capture volume for one channel, returning the current capture volume for that channel

Parameters
channelThe channel to set the volume on
vThe value to set
Returns
<0 on error or the current state of the volume

Definition at line 384 of file MixerElement.H.

Here is the call graph for this function:

◆ setCaptureVolDB() [1/2]

int ALSA::MixerElement::setCaptureVolDB ( double &  dB)
inline

Set the capture volume (in dB) for all channels, returning the current capture volume in dB

Parameters
[in,out]dBThe value to set and on return, then actual value
Returns
<0 on error - the current dB of the volume is returned in the parameter dB

Definition at line 403 of file MixerElement.H.

Here is the call graph for this function:

◆ setCaptureVolDB() [2/2]

long ALSA::MixerElement::setCaptureVolDB ( snd_mixer_selem_channel_id_t  channel,
double &  dB 
)
inline

Set the capture volume for one channel, returning the current capture volume for that channel

Parameters
channelThe channel to set the volume on
[in,out]dBThe value to set and on return, then actual value
Returns
<0 on error - the current dB of the volume is returned in the parameter dB

Definition at line 422 of file MixerElement.H.

Here is the call graph for this function:

◆ setPlaybackSwitch()

int ALSA::MixerElement::setPlaybackSwitch ( int  v)
inline

Set the playback switch state for all channels, returning the current playback switch state

Parameters
vThe value to set
Returns
<0 on error or the current state of the switch

Definition at line 256 of file MixerElement.H.

Here is the call graph for this function:

◆ setPlaybackVol() [1/2]

long ALSA::MixerElement::setPlaybackVol ( long  v)
inline

Set the playback volume for all channels, returning the current playback volume

Parameters
vThe value to set
Returns
<0 on error or the current state of the volume

Definition at line 273 of file MixerElement.H.

Here is the call graph for this function:

◆ setPlaybackVol() [2/2]

long ALSA::MixerElement::setPlaybackVol ( snd_mixer_selem_channel_id_t  channel,
long  v 
)
inline

Set the playback volume for one channel, returning the current playback volume for that channel

Parameters
channelThe channel to set the volume on
vThe value to set
Returns
<0 on error or the current state of the volume

Definition at line 291 of file MixerElement.H.

Here is the call graph for this function:

◆ setPlaybackVolDB() [1/2]

int ALSA::MixerElement::setPlaybackVolDB ( double &  dB)
inline

Set the playback volume (in dB) for all channels, returning the current playback volume in dB

Parameters
[in,out]dBThe value to set and on return, then actual value
Returns
<0 on error - the current dB of the volume is returned in the parameter dB

Definition at line 310 of file MixerElement.H.

Here is the call graph for this function:

◆ setPlaybackVolDB() [2/2]

long ALSA::MixerElement::setPlaybackVolDB ( snd_mixer_selem_channel_id_t  channel,
double &  dB 
)
inline

Set the playback volume for one channel, returning the current playback volume for that channel

Parameters
channelThe channel to set the volume on
[in,out]dBThe value to set and on return, then actual value
Returns
<0 on error - the current dB of the volume is returned in the parameter dB

Definition at line 329 of file MixerElement.H.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
MixerElement me 
)
friend

Definition at line 438 of file MixerElement.H.

Member Data Documentation

◆ captureVolMax

long ALSA::MixerElement::captureVolMax

Definition at line 156 of file MixerElement.H.

◆ captureVolMaxDB

double ALSA::MixerElement::captureVolMaxDB

Definition at line 158 of file MixerElement.H.

◆ captureVolMin

long ALSA::MixerElement::captureVolMin

Definition at line 157 of file MixerElement.H.

◆ captureVolMinDB

double ALSA::MixerElement::captureVolMinDB

Definition at line 159 of file MixerElement.H.

◆ captureVolumes

std::vector<ChannelCaptureElement> ALSA::MixerElement::captureVolumes

Volume setting for each capture channel in this mixer element.

Definition at line 162 of file MixerElement.H.

◆ elem

snd_mixer_elem_t* ALSA::MixerElement::elem

The pointer to the element.

Definition at line 139 of file MixerElement.H.

◆ hasCaptureSwitch

bool ALSA::MixerElement::hasCaptureSwitch

0 if no control is present, 1 if it's present

Definition at line 149 of file MixerElement.H.

◆ hasCaptureSwitchExclusive

bool ALSA::MixerElement::hasCaptureSwitchExclusive

0 if control is separated per element, 1 if control acts on other elements too (i.e. only one active at a time inside a group)

Definition at line 151 of file MixerElement.H.

◆ hasCaptureSwitchJoined

bool ALSA::MixerElement::hasCaptureSwitchJoined

0 if control is separated per channel, 1 if control acts on all channels together

Definition at line 150 of file MixerElement.H.

◆ hasCaptureVolume

bool ALSA::MixerElement::hasCaptureVolume

0 if no control is present, 1 if it's present

Definition at line 144 of file MixerElement.H.

◆ hasCaptureVolumeJoined

bool ALSA::MixerElement::hasCaptureVolumeJoined

0 if control is separated per channel, 1 if control acts on all channels together

Definition at line 145 of file MixerElement.H.

◆ hasCommonSwitch

bool ALSA::MixerElement::hasCommonSwitch

0 separated control, 1 common control

Definition at line 146 of file MixerElement.H.

◆ hasCommonVolume

bool ALSA::MixerElement::hasCommonVolume

element has only one volume control for both playback and capture

Definition at line 141 of file MixerElement.H.

◆ hasPlaybackSwitch

bool ALSA::MixerElement::hasPlaybackSwitch

0 if no control is present, 1 if it's present

Definition at line 147 of file MixerElement.H.

◆ hasPlaybackSwitchJoined

bool ALSA::MixerElement::hasPlaybackSwitchJoined

0 if control is separated per channel, 1 if control acts on all channels together

Definition at line 148 of file MixerElement.H.

◆ hasPlaybackVolume

bool ALSA::MixerElement::hasPlaybackVolume

0 if no control is present, 1 if it's present

Definition at line 142 of file MixerElement.H.

◆ hasPlaybackVolumeJoined

bool ALSA::MixerElement::hasPlaybackVolumeJoined

0 if control is separated per channel, 1 if control acts on all channels together

Definition at line 143 of file MixerElement.H.

◆ index

unsigned int ALSA::MixerElement::index

The mixer element index.

Definition at line 140 of file MixerElement.H.

◆ name

std::string ALSA::MixerElement::name

The mixer element name.

Definition at line 138 of file MixerElement.H.

◆ playbackVolMax

long ALSA::MixerElement::playbackVolMax

Definition at line 152 of file MixerElement.H.

◆ playbackVolMaxDB

double ALSA::MixerElement::playbackVolMaxDB

Definition at line 154 of file MixerElement.H.

◆ playbackVolMin

long ALSA::MixerElement::playbackVolMin

Definition at line 153 of file MixerElement.H.

◆ playbackVolMinDB

double ALSA::MixerElement::playbackVolMinDB

Definition at line 155 of file MixerElement.H.

◆ playbackVolumes

std::vector<ChannelPlaybackElement> ALSA::MixerElement::playbackVolumes

Volume setting for each playback channel in this mixer element.

Definition at line 161 of file MixerElement.H.


The documentation for this class was generated from the following file:
gtkIOStream: ALSA::MixerElement Class Reference
GTK+ IOStream  Beta