MPD  0.20.6
Public Member Functions | Data Fields
Mixer Class Referenceabstract

#include <MixerInternal.hxx>

Collaboration diagram for Mixer:
[legend]

Public Member Functions

 Mixer (const MixerPlugin &_plugin, MixerListener &_listener)
 
 Mixer (const Mixer &)=delete
 
virtual ~Mixer ()
 
bool IsPlugin (const MixerPlugin &other) const
 
virtual void Open ()=0
 Open mixer device. More...
 
virtual void Close ()=0
 Close mixer device. More...
 
virtual gcc_pure int GetVolume ()=0
 Reads the current volume. More...
 
virtual void SetVolume (unsigned volume)=0
 Sets the volume. More...
 

Data Fields

const MixerPluginplugin
 
MixerListenerlistener
 
Mutex mutex
 This mutex protects all of the mixer struct, including its implementation, so plugins don't have to deal with that. More...
 
bool open
 Is the mixer device currently open? More...
 
bool failed
 Has this mixer failed, and should not be reopened automatically? More...
 

Detailed Description

Definition at line 30 of file MixerInternal.hxx.

Constructor & Destructor Documentation

Mixer::Mixer ( const MixerPlugin _plugin,
MixerListener _listener 
)
inlineexplicit

Definition at line 54 of file MixerInternal.hxx.

Mixer::Mixer ( const Mixer )
delete
virtual Mixer::~Mixer ( )
inlinevirtual

Definition at line 61 of file MixerInternal.hxx.

Member Function Documentation

virtual void Mixer::Close ( )
pure virtual

Close mixer device.

virtual gcc_pure int Mixer::GetVolume ( )
pure virtual

Reads the current volume.

Throws std::runtime_error on error.

Returns
the current volume (0..100 including) or -1 if unavailable
bool Mixer::IsPlugin ( const MixerPlugin other) const
inline

Definition at line 63 of file MixerInternal.hxx.

virtual void Mixer::Open ( )
pure virtual

Open mixer device.

Throws std::runtime_error on error.

virtual void Mixer::SetVolume ( unsigned  volume)
pure virtual

Sets the volume.

Throws std::runtime_error on error.

Parameters
volumethe new volume (0..100 including)

Field Documentation

bool Mixer::failed

Has this mixer failed, and should not be reopened automatically?

Definition at line 51 of file MixerInternal.hxx.

MixerListener& Mixer::listener

Definition at line 34 of file MixerInternal.hxx.

Mutex Mixer::mutex

This mutex protects all of the mixer struct, including its implementation, so plugins don't have to deal with that.

Definition at line 40 of file MixerInternal.hxx.

bool Mixer::open

Is the mixer device currently open?

Definition at line 45 of file MixerInternal.hxx.

const MixerPlugin& Mixer::plugin

Definition at line 32 of file MixerInternal.hxx.


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