Gizmod::AlsaMixer Class Reference

Data structure that holds information about each Mixer. More...

#include <AlsaMixer.hpp>

Inheritance diagram for Gizmod::AlsaMixer:

Inheritance graph
[legend]
Collaboration diagram for Gizmod::AlsaMixer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

std::string getName () const
 Get the unique name of the mixer.
std::string getNameShort () const
 Get the short name of the mixer (not unique).
bool setSwitchCapture (bool Enable)
 Set the capture switch.
bool setSwitchPlayback (bool Enable)
 Set the playback switch.
bool setVolumeCapture (long Volume)
 Set the Capture volume.
bool setVolumeCapturePercent (float Percent)
 Set the Capture volume as a percent.
bool setVolumePlayback (long Volume)
 Set the playback volume.
bool setVolumePlaybackPercent (float Percent)
 Set the playback volume as a percent.
int signalMixerEvent ()
 Signal a manual mixer event.
 AlsaMixer ()
 AlsaMixer Default Constructor.
 AlsaMixer (AlsaSoundCardInterface *piSoundCard, snd_mixer_elem_t *MixerElement, std::string MixerName, std::string MixerNameUnique, unsigned int MixerID)
 AlsaMixer Default Constructor.
virtual ~AlsaMixer ()
 AlsaMixer Destructor.

Static Public Member Functions

static int MixerElemCallback (snd_mixer_elem_t *MixerElement, unsigned int EventMask)
 Static mixer element callback.

Friends

class boost::serialization::access


Detailed Description

Data structure that holds information about each Mixer.

Definition at line 61 of file AlsaMixer.hpp.


Member Function Documentation

std::string AlsaMixer::getName (  )  const

Get the unique name of the mixer.

Returns:
Unique mixer name

Definition at line 138 of file AlsaMixer.cpp.

Referenced by Gizmod::Alsa::onAlsaEventMixerElementAttach(), Gizmod::Alsa::onAlsaEventMixerElementChange(), and Gizmod::Alsa::onAlsaEventMixerElementDetach().

std::string AlsaMixer::getNameShort (  )  const

Get the short name of the mixer (not unique).

Get the name of the mixer.

Returns:
Mixer name

Definition at line 146 of file AlsaMixer.cpp.

bool AlsaMixer::setSwitchCapture ( bool  Enable  ) 

Set the capture switch.

Parameters:
Enable Set to true if the switch should be enabled
Returns:
True on success

Definition at line 244 of file AlsaMixer.cpp.

References Gizmod::AlsaSoundCardInterface::addManualUpdater(), and Gizmod::AlsaMixerElements::SwitchCapture.

bool AlsaMixer::setSwitchPlayback ( bool  Enable  ) 

Set the playback switch.

Parameters:
Enable Set to true if the switch should be enabled
Returns:
True on success

Definition at line 257 of file AlsaMixer.cpp.

References Gizmod::AlsaSoundCardInterface::addManualUpdater(), and Gizmod::AlsaMixerElements::SwitchPlayback.

bool AlsaMixer::setVolumeCapture ( long  Volume  ) 

Set the Capture volume.

Parameters:
Volume Absolute volume level
Returns:
True on success

Definition at line 270 of file AlsaMixer.cpp.

References Gizmod::AlsaSoundCardInterface::addManualUpdater(), Gizmod::AlsaMixerElements::VolumeCapture, Gizmod::AlsaMixerElements::VolumeCaptureMax, Gizmod::AlsaMixerElements::VolumeCaptureMin, and Gizmod::AlsaMixerElements::VolumeCapturePercent.

bool AlsaMixer::setVolumeCapturePercent ( float  Percent  ) 

Set the Capture volume as a percent.

Parameters:
Percent Volume level percentage
Returns:
True on success

Definition at line 288 of file AlsaMixer.cpp.

References Gizmod::AlsaMixerElements::VolumeCapture, Gizmod::AlsaMixerElements::VolumeCaptureMax, Gizmod::AlsaMixerElements::VolumeCaptureMin, and Gizmod::AlsaMixerElements::VolumeCapturePercent.

bool AlsaMixer::setVolumePlayback ( long  Volume  ) 

Set the playback volume.

Set the Playback volume.

Parameters:
Volume Absolute volume level
Returns:
True on success

Definition at line 306 of file AlsaMixer.cpp.

References Gizmod::AlsaSoundCardInterface::addManualUpdater(), Gizmod::AlsaMixerElements::VolumePlayback, Gizmod::AlsaMixerElements::VolumePlaybackMax, Gizmod::AlsaMixerElements::VolumePlaybackMin, and Gizmod::AlsaMixerElements::VolumePlaybackPercent.

bool AlsaMixer::setVolumePlaybackPercent ( float  Percent  ) 

Set the playback volume as a percent.

Set the Playback volume as a percent.

Parameters:
Percent Volume level percentage
Returns:
True on success

Definition at line 324 of file AlsaMixer.cpp.

References Gizmod::AlsaSoundCardInterface::addManualUpdater(), Gizmod::AlsaMixerElements::VolumePlayback, Gizmod::AlsaMixerElements::VolumePlaybackMax, Gizmod::AlsaMixerElements::VolumePlaybackMin, and Gizmod::AlsaMixerElements::VolumePlaybackPercent.

int AlsaMixer::signalMixerEvent (  )  [virtual]

Signal a manual mixer event.

Returns:
0 on success otherwise a negative error code
Handle a manual mixer element event

Implements Gizmod::AlsaMixerInterface.

Definition at line 91 of file AlsaMixer.cpp.

int AlsaMixer::MixerElemCallback ( snd_mixer_elem_t *  MixerElement,
unsigned int  EventMask 
) [static]

Static mixer element callback.

Public static MixerElement callback function.

Parameters:
MixerElement Mixer element handle
EventMask event mask
Returns:
0 on success otherwise a negative error code
Just pass off the event to the appropriate AlsaSoundCard instantiation

Definition at line 52 of file AlsaMixer.cpp.

References mixerElemCallback().


The documentation for this class was generated from the following files:
Generated on Wed Nov 7 10:06:59 2007 for gizmod by  doxygen 1.5.3