#include <Alsa.hpp>


Public Member Functions | |
| void | init () |
| Initialize Alsa. | |
| AlsaMixer const * | getDefaultMixerSwitch () |
| Get the system's default mixer for muting. | |
| AlsaMixer const * | getDefaultMixerVolume () |
| Get the system's default mixer for volume. | |
| size_t | getNumSoundCards () |
| Get the number of sound cards attached. | |
| AlsaSoundCard const * | getSoundCard (int Index) |
| Get a sound card by index. | |
| void | toggleMuteAllCards () |
| Toggle mute on all sound cards. | |
| virtual void | onAlsaEventMixerElementAttach (AlsaEvent const &Event, AlsaSoundCard const &SoundCard, AlsaMixer const &Mixer) |
| Triggered when a mixer element is discovered. | |
| virtual void | onAlsaEventMixerElementChange (AlsaEvent const &Event, AlsaSoundCard const &SoundCard, AlsaMixer const &Mixer) |
| Triggered when a mixer element is discovered. | |
| virtual void | onAlsaEventMixerElementDetach (AlsaEvent const &Event, AlsaSoundCard const &SoundCard, AlsaMixer const &Mixer) |
| Triggered when a mixer element is detached. | |
| virtual void | onAlsaEventSoundCardAttach (AlsaEvent const &Event, AlsaSoundCard const &SoundCard) |
| Triggered when a new sound card is detected. | |
| virtual void | onAlsaEventSoundCardDetach (AlsaEvent const &Event, AlsaSoundCard const &SoundCard) |
| Triggered when a sound card is removed. | |
| void | registerDefaultMixerPriority (std::string MixerName) |
| Register a default mixer priority. | |
| void | shutdown () |
| Shutdown the Alsa connection. | |
| Alsa () | |
| Alsa Default Constructor. | |
| virtual | ~Alsa () |
| Alsa Destructor. | |
Friends | |
| class | AlsaMixer |
Note this creates 1 thread per sound card, and watches for mixer events on all sound cards and all sound card elements when initted
Definition at line 72 of file Alsa.hpp.
| void Alsa::init | ( | ) |
Initialize Alsa.
Initialize ALSA.
Definition at line 109 of file Alsa.cpp.
References cdbg1, H::Exception::getExceptionMessage(), and shutdown().
| AlsaMixer const * Alsa::getDefaultMixerSwitch | ( | ) |
| AlsaMixer const * Alsa::getDefaultMixerVolume | ( | ) |
| size_t Alsa::getNumSoundCards | ( | ) |
| void Alsa::toggleMuteAllCards | ( | ) |
| void Alsa::onAlsaEventMixerElementAttach | ( | AlsaEvent const & | Event, | |
| AlsaSoundCard const & | SoundCard, | |||
| AlsaMixer const & | Mixer | |||
| ) | [virtual] |
Triggered when a mixer element is discovered.
| Event | The event | |
| SoundCard | The sound card that triggered the event | |
| Mixer | The mixer element that triggered the event |
Definition at line 139 of file Alsa.cpp.
References cdbg1, Gizmod::AlsaSoundCard::getCardName(), and Gizmod::AlsaMixer::getName().
| void Alsa::onAlsaEventMixerElementChange | ( | AlsaEvent const & | Event, | |
| AlsaSoundCard const & | SoundCard, | |||
| AlsaMixer const & | Mixer | |||
| ) | [virtual] |
Triggered when a mixer element is discovered.
Triggered when a mixer element is changed.
| Event | The event | |
| SoundCard | The sound card that triggered the event | |
| Mixer | The mixer element that triggered the event |
Definition at line 150 of file Alsa.cpp.
References Gizmod::ALSAEVENT_MIXERELEMENT_CHANGE, cdbg2, Gizmod::AlsaEvent::ElementsChanged, Gizmod::AlsaSoundCard::getCardName(), Gizmod::AlsaMixer::getName(), Gizmod::AlsaEvent::IsActiveChanged, Gizmod::AlsaEvent::Mask, Gizmod::AlsaEvent::Type, Gizmod::AlsaEvent::VolumePlaybackChanged, and Gizmod::AlsaMixerElements::VolumePlaybackPercent.
| void Alsa::onAlsaEventMixerElementDetach | ( | AlsaEvent const & | Event, | |
| AlsaSoundCard const & | SoundCard, | |||
| AlsaMixer const & | Mixer | |||
| ) | [virtual] |
Triggered when a mixer element is detached.
| Event | The event | |
| SoundCard | The sound card that triggered the event | |
| Mixer | The mixer element that triggered the event |
Definition at line 205 of file Alsa.cpp.
References cdbg3, Gizmod::AlsaSoundCard::getCardName(), and Gizmod::AlsaMixer::getName().
| void Alsa::onAlsaEventSoundCardAttach | ( | AlsaEvent const & | Event, | |
| AlsaSoundCard const & | SoundCard | |||
| ) | [virtual] |
Triggered when a new sound card is detected.
| Event | The event | |
| SoundCard | The sound card that triggered the event |
Definition at line 215 of file Alsa.cpp.
References cdbg, Gizmod::AlsaSoundCard::getCardHardwareID(), and Gizmod::AlsaSoundCard::getCardName().
| void Alsa::onAlsaEventSoundCardDetach | ( | AlsaEvent const & | Event, | |
| AlsaSoundCard const & | SoundCard | |||
| ) | [virtual] |
Triggered when a sound card is removed.
| Event | The event | |
| SoundCard | The sound card that triggered the event |
Definition at line 225 of file Alsa.cpp.
References cdbg1, Gizmod::AlsaSoundCard::getCardHardwareID(), and Gizmod::AlsaSoundCard::getCardName().
| void Alsa::registerDefaultMixerPriority | ( | std::string | MixerName | ) |
Register a default mixer priority.
| MixerName | Name of the mixer to add |
Definition at line 240 of file Alsa.cpp.
References cdbg1.
| void Alsa::shutdown | ( | ) |
1.5.3