Gestro
Public Member Functions | Private Attributes | List of all members
UbuntuController::VolumeControl Class Reference

This class uses the ALSA library to send commands to the sound card. More...

#include <VolumeControl.h>

Inheritance diagram for UbuntuController::VolumeControl:
Inheritance graph
Collaboration diagram for UbuntuController::VolumeControl:
Collaboration graph

Public Member Functions

 VolumeControl (void)
 
void increaseVolume ()
 
void reduceVolume ()
 
void muteAndUnmute ()
 
void unmute ()
 

Private Attributes

long min
 Declaring three variables of type long. More...
 
long max
 
snd_mixer_t * handle
 A pointer to a mixer handle. More...
 
snd_mixer_selem_id_t * sid
 A pointer to a mixer handle. More...
 
const char * card = "default"
 A pointer to a constant character. More...
 
const char * selem_name = "Master"
 A pointer to a constant character. More...
 

Detailed Description

This class uses the ALSA library to send commands to the sound card.

Definition at line 8 of file VolumeControl.h.

Constructor & Destructor Documentation

◆ VolumeControl()

VolumeControl::VolumeControl ( void  )

constructor

Definition at line 7 of file VolumeControl.cpp.

Member Function Documentation

◆ increaseVolume()

void VolumeControl::increaseVolume ( )

Increase the master volume by 10%

Definition at line 11 of file VolumeControl.cpp.

Here is the caller graph for this function:

◆ muteAndUnmute()

void VolumeControl::muteAndUnmute ( )

Mute or unmute by checking the current state.

Definition at line 53 of file VolumeControl.cpp.

Here is the caller graph for this function:

◆ reduceVolume()

void VolumeControl::reduceVolume ( )

Reduce the master volume by 10%

Definition at line 32 of file VolumeControl.cpp.

Here is the caller graph for this function:

◆ unmute()

void VolumeControl::unmute ( )

Umute the system, to be called before increases volume if system is muted.

Definition at line 72 of file VolumeControl.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ card

const char* UbuntuController::VolumeControl::card = "default"
private

A pointer to a constant character.

Definition at line 21 of file VolumeControl.h.

◆ handle

snd_mixer_t* UbuntuController::VolumeControl::handle
private

A pointer to a mixer handle.

Definition at line 15 of file VolumeControl.h.

◆ max

long UbuntuController::VolumeControl::max
private

Definition at line 12 of file VolumeControl.h.

◆ min

long UbuntuController::VolumeControl::min
private

Declaring three variables of type long.

Definition at line 12 of file VolumeControl.h.

◆ selem_name

const char* UbuntuController::VolumeControl::selem_name = "Master"
private

A pointer to a constant character.

Definition at line 24 of file VolumeControl.h.

◆ sid

snd_mixer_selem_id_t* UbuntuController::VolumeControl::sid
private

A pointer to a mixer handle.

Definition at line 18 of file VolumeControl.h.


The documentation for this class was generated from the following files: