MPD  0.20.6
MixerControl.hxx
Go to the documentation of this file.
1 /*
2  * Copyright 2003-2017 The Music Player Daemon Project
3  * http://www.musicpd.org
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
25 #ifndef MPD_MIXER_CONTROL_HXX
26 #define MPD_MIXER_CONTROL_HXX
27 
28 class Mixer;
29 class EventLoop;
30 struct AudioOutput;
31 struct MixerPlugin;
32 class MixerListener;
33 struct ConfigBlock;
34 
38 Mixer *
39 mixer_new(EventLoop &event_loop, const MixerPlugin &plugin, AudioOutput &ao,
40  MixerListener &listener,
41  const ConfigBlock &block);
42 
43 void
44 mixer_free(Mixer *mixer);
45 
49 void
50 mixer_open(Mixer *mixer);
51 
52 void
53 mixer_close(Mixer *mixer);
54 
59 void
60 mixer_auto_close(Mixer *mixer);
61 
65 int
66 mixer_get_volume(Mixer *mixer);
67 
71 void
72 mixer_set_volume(Mixer *mixer, unsigned volume);
73 
74 #endif
void mixer_set_volume(Mixer *mixer, unsigned volume)
Throws std::runtime_error on error.
Mixer * mixer_new(EventLoop &event_loop, const MixerPlugin &plugin, AudioOutput &ao, MixerListener &listener, const ConfigBlock &block)
Throws std::runtime_error on error.
An event loop that polls for events on file/socket descriptors.
Definition: Loop.hxx:51
void mixer_close(Mixer *mixer)
void mixer_auto_close(Mixer *mixer)
Close the mixer unless the plugin's "global" flag is set.
void mixer_open(Mixer *mixer)
Throws std::runtime_error on error.
An interface that listens on events from mixer plugins.
Definition: Listener.hxx:29
int mixer_get_volume(Mixer *mixer)
Throws std::runtime_error on error.
void mixer_free(Mixer *mixer)