2009-03-12 18:34:37 +01:00
|
|
|
/*
|
2017-01-03 20:48:59 +01:00
|
|
|
* Copyright 2003-2017 The Music Player Daemon Project
|
2009-03-12 18:34:37 +01:00
|
|
|
* http://www.musicpd.org
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2009-03-13 18:43:16 +01:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2009-03-12 18:34:37 +01:00
|
|
|
*/
|
|
|
|
|
2009-03-14 11:36:50 +01:00
|
|
|
/** \file
|
|
|
|
*
|
2015-03-17 11:21:29 +01:00
|
|
|
* Functions which manipulate a #Mixer object.
|
2009-03-14 11:36:50 +01:00
|
|
|
*/
|
|
|
|
|
2013-02-22 20:51:23 +01:00
|
|
|
#ifndef MPD_MIXER_CONTROL_HXX
|
|
|
|
#define MPD_MIXER_CONTROL_HXX
|
2009-03-12 18:34:37 +01:00
|
|
|
|
2013-04-16 21:33:25 +02:00
|
|
|
class Mixer;
|
2014-02-05 00:02:02 +01:00
|
|
|
class EventLoop;
|
2017-08-10 13:07:36 +02:00
|
|
|
class AudioOutput;
|
2014-02-05 17:22:34 +01:00
|
|
|
struct MixerPlugin;
|
2014-02-05 23:20:33 +01:00
|
|
|
class MixerListener;
|
2015-01-21 22:13:44 +01:00
|
|
|
struct ConfigBlock;
|
2009-03-14 11:36:50 +01:00
|
|
|
|
2016-09-09 12:52:51 +02:00
|
|
|
/**
|
|
|
|
* Throws std::runtime_error on error.
|
|
|
|
*/
|
2013-04-16 21:33:25 +02:00
|
|
|
Mixer *
|
2017-08-07 18:47:39 +02:00
|
|
|
mixer_new(EventLoop &event_loop, const MixerPlugin &plugin,
|
2017-08-10 13:07:36 +02:00
|
|
|
AudioOutput &ao,
|
2014-02-05 23:20:33 +01:00
|
|
|
MixerListener &listener,
|
2016-09-09 12:52:51 +02:00
|
|
|
const ConfigBlock &block);
|
2009-03-14 11:36:50 +01:00
|
|
|
|
|
|
|
void
|
2013-04-16 21:33:25 +02:00
|
|
|
mixer_free(Mixer *mixer);
|
2009-03-14 11:36:50 +01:00
|
|
|
|
2016-09-09 12:52:51 +02:00
|
|
|
/**
|
|
|
|
* Throws std::runtime_error on error.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
mixer_open(Mixer *mixer);
|
2009-03-14 11:36:50 +01:00
|
|
|
|
|
|
|
void
|
2013-04-16 21:33:25 +02:00
|
|
|
mixer_close(Mixer *mixer);
|
2009-03-14 11:36:50 +01:00
|
|
|
|
2009-03-26 19:43:18 +01:00
|
|
|
/**
|
|
|
|
* Close the mixer unless the plugin's "global" flag is set. This is
|
2014-01-28 11:34:09 +01:00
|
|
|
* called when the #AudioOutput is closed.
|
2009-03-26 19:43:18 +01:00
|
|
|
*/
|
|
|
|
void
|
2013-04-16 21:33:25 +02:00
|
|
|
mixer_auto_close(Mixer *mixer);
|
2009-03-26 19:43:18 +01:00
|
|
|
|
2016-09-09 12:52:51 +02:00
|
|
|
/**
|
|
|
|
* Throws std::runtime_error on error.
|
|
|
|
*/
|
2009-03-14 11:36:50 +01:00
|
|
|
int
|
2016-09-09 12:52:51 +02:00
|
|
|
mixer_get_volume(Mixer *mixer);
|
2009-03-14 11:36:50 +01:00
|
|
|
|
2016-09-09 12:52:51 +02:00
|
|
|
/**
|
|
|
|
* Throws std::runtime_error on error.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
mixer_set_volume(Mixer *mixer, unsigned volume);
|
2009-03-14 11:36:50 +01:00
|
|
|
|
2009-03-12 18:34:37 +01:00
|
|
|
#endif
|