mixer/MixerList: eliminate header

This commit is contained in:
Max Kellermann 2022-08-18 17:03:37 +02:00
parent a966cfeb1f
commit c14484a5cc
30 changed files with 197 additions and 38 deletions

View File

@ -20,7 +20,8 @@
#include "output/MultipleOutputs.hxx"
#include "MixerControl.hxx"
#include "MixerInternal.hxx"
#include "MixerList.hxx"
#include "plugins/NullMixerPlugin.hxx"
#include "plugins/SoftwareMixerPlugin.hxx"
#include "lib/fmt/ExceptionFormatter.hxx"
#include "pcm/Volume.hxx"
#include "util/Domain.hxx"

View File

@ -21,7 +21,6 @@
#define MPD_MIXER_INTERNAL_HXX
#include "MixerPlugin.hxx"
#include "MixerList.hxx"
#include "thread/Mutex.hxx"
#include "util/Compiler.h"

View File

@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "AlsaMixerPlugin.hxx"
#include "lib/alsa/NonBlock.hxx"
#include "lib/alsa/Error.hxx"
#include "mixer/MixerInternal.hxx"

View File

@ -0,0 +1,24 @@
/*
* Copyright 2003-2022 The Music Player Daemon Project
* 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.
*
* 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.
*/
#pragma once
struct MixerPlugin;
extern const MixerPlugin alsa_mixer_plugin;

View File

@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "AndroidMixerPlugin.hxx"
#include "mixer/MixerInternal.hxx"
#include "filter/plugins/VolumeFilterPlugin.hxx"
#include "pcm/Volume.hxx"

View File

@ -17,25 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/** \file
*
* This header provides "extern" declarations for all mixer plugins.
*/
#ifndef MPD_MIXER_LIST_HXX
#define MPD_MIXER_LIST_HXX
#pragma once
struct MixerPlugin;
extern const MixerPlugin null_mixer_plugin;
extern const MixerPlugin software_mixer_plugin;
extern const MixerPlugin android_mixer_plugin;
extern const MixerPlugin alsa_mixer_plugin;
extern const MixerPlugin oss_mixer_plugin;
extern const MixerPlugin osx_mixer_plugin;
extern const MixerPlugin pulse_mixer_plugin;
extern const MixerPlugin winmm_mixer_plugin;
extern const MixerPlugin wasapi_mixer_plugin;
extern const MixerPlugin sndio_mixer_plugin;
#endif

View File

@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "NullMixerPlugin.hxx"
#include "mixer/MixerInternal.hxx"
class NullMixer final : public Mixer {

View File

@ -0,0 +1,24 @@
/*
* Copyright 2003-2022 The Music Player Daemon Project
* 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.
*
* 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.
*/
#pragma once
struct MixerPlugin;
extern const MixerPlugin null_mixer_plugin;

View File

@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "OSXMixerPlugin.hxx"
#include "mixer/MixerInternal.hxx"
#include "output/plugins/OSXOutputPlugin.hxx"

View File

@ -0,0 +1,24 @@
/*
* Copyright 2003-2022 The Music Player Daemon Project
* 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.
*
* 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.
*/
#pragma once
struct MixerPlugin;
extern const MixerPlugin osx_mixer_plugin;

View File

@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "OssMixerPlugin.hxx"
#include "mixer/MixerInternal.hxx"
#include "config/Block.hxx"
#include "io/FileDescriptor.hxx"

View File

@ -0,0 +1,24 @@
/*
* Copyright 2003-2022 The Music Player Daemon Project
* 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.
*
* 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.
*/
#pragma once
struct MixerPlugin;
extern const MixerPlugin oss_mixer_plugin;

View File

@ -17,13 +17,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_PULSE_MIXER_PLUGIN_HXX
#define MPD_PULSE_MIXER_PLUGIN_HXX
#pragma once
struct MixerPlugin;
class PulseMixer;
struct pa_context;
struct pa_stream;
extern const MixerPlugin pulse_mixer_plugin;
void
pulse_mixer_on_connect(PulseMixer &pm, pa_context *context);
@ -32,5 +34,3 @@ pulse_mixer_on_disconnect(PulseMixer &pm);
void
pulse_mixer_on_change(PulseMixer &pm, pa_context *context, pa_stream *stream);
#endif

View File

@ -16,6 +16,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "SndioMixerPlugin.hxx"
#include "mixer/MixerInternal.hxx"
#include "output/plugins/SndioOutputPlugin.hxx"

View File

@ -0,0 +1,24 @@
/*
* Copyright 2003-2022 The Music Player Daemon Project
* 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.
*
* 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.
*/
#pragma once
struct MixerPlugin;
extern const MixerPlugin sndio_mixer_plugin;

View File

@ -17,12 +17,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_SOFTWARE_MIXER_PLUGIN_HXX
#define MPD_SOFTWARE_MIXER_PLUGIN_HXX
#pragma once
struct MixerPlugin;
class Mixer;
class Filter;
extern const MixerPlugin software_mixer_plugin;
/**
* Attach a #VolumeFilter to this mixer. The #VolumeFilter is the
* entity which actually applies the volume; it is created and managed
@ -31,5 +33,3 @@ class Filter;
*/
void
software_mixer_set_filter(Mixer &mixer, Filter *filter) noexcept;
#endif

View File

@ -19,6 +19,7 @@
#undef NOUSER // COM needs the "MSG" typedef
#include "WasapiMixerPlugin.hxx"
#include "output/plugins/wasapi/ForMixer.hxx"
#include "output/plugins/wasapi/AudioClient.hxx"
#include "output/plugins/wasapi/Device.hxx"

View File

@ -0,0 +1,24 @@
/*
* Copyright 2003-2022 The Music Player Daemon Project
* 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.
*
* 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.
*/
#pragma once
struct MixerPlugin;
extern const MixerPlugin wasapi_mixer_plugin;

View File

@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "WinmmMixerPlugin.hxx"
#include "mixer/MixerInternal.hxx"
#include "output/Features.h"
#include "output/OutputAPI.hxx"

View File

@ -0,0 +1,24 @@
/*
* Copyright 2003-2022 The Music Player Daemon Project
* 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.
*
* 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.
*/
#pragma once
struct MixerPlugin;
extern const MixerPlugin winmm_mixer_plugin;

View File

@ -24,9 +24,10 @@
#include "Defaults.hxx"
#include "lib/fmt/ExceptionFormatter.hxx"
#include "pcm/AudioParser.hxx"
#include "mixer/MixerList.hxx"
#include "mixer/MixerType.hxx"
#include "mixer/MixerControl.hxx"
#include "mixer/plugins/NullMixerPlugin.hxx"
#include "mixer/plugins/SoftwareMixerPlugin.hxx"
#include "filter/LoadChain.hxx"
#include "filter/Prepared.hxx"
#include "filter/plugins/AutoConvertFilterPlugin.hxx"

View File

@ -27,7 +27,7 @@
#include "lib/alsa/Version.hxx"
#include "../OutputAPI.hxx"
#include "../Error.hxx"
#include "mixer/MixerList.hxx"
#include "mixer/plugins/AlsaMixerPlugin.hxx"
#include "pcm/Export.hxx"
#include "system/PeriodClock.hxx"
#include "thread/Mutex.hxx"

View File

@ -24,7 +24,7 @@
#include "apple/StringRef.hxx"
#include "apple/Throw.hxx"
#include "../OutputAPI.hxx"
#include "mixer/MixerList.hxx"
#include "mixer/plugins/OSXMixerPlugin.hxx"
#include "util/RuntimeError.hxx"
#include "util/Domain.hxx"
#include "util/Manual.hxx"

View File

@ -19,7 +19,7 @@
#include "OssOutputPlugin.hxx"
#include "../OutputAPI.hxx"
#include "mixer/MixerList.hxx"
#include "mixer/plugins/OssMixerPlugin.hxx"
#include "pcm/Export.hxx"
#include "io/UniqueFileDescriptor.hxx"
#include "system/Error.hxx"

View File

@ -23,7 +23,6 @@
#include "lib/pulse/LockGuard.hxx"
#include "../OutputAPI.hxx"
#include "../Error.hxx"
#include "mixer/MixerList.hxx"
#include "mixer/plugins/PulseMixerPlugin.hxx"
#include "util/ScopeExit.hxx"

View File

@ -18,8 +18,8 @@
*/
#include "SndioOutputPlugin.hxx"
#include "mixer/MixerList.hxx"
#include "mixer/Listener.hxx"
#include "mixer/plugins/SndioMixerPlugin.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"

View File

@ -20,7 +20,7 @@
#include "WinmmOutputPlugin.hxx"
#include "../OutputAPI.hxx"
#include "pcm/Buffer.hxx"
#include "mixer/MixerList.hxx"
#include "mixer/plugins/WinmmMixerPlugin.hxx"
#include "fs/AllocatedPath.hxx"
#include "util/RuntimeError.hxx"
#include "util/StringCompare.hxx"

View File

@ -27,7 +27,7 @@
#include "thread/Cond.hxx"
#include "util/Domain.hxx"
#include "util/ByteOrder.hxx"
#include "mixer/MixerList.hxx"
#include "mixer/plugins/AndroidMixerPlugin.hxx"
#include "Log.hxx"
#include <SLES/OpenSLES.h>

View File

@ -27,7 +27,7 @@
#include "output/OutputAPI.hxx"
#include "lib/icu/Win32.hxx"
#include "lib/fmt/AudioFormatFormatter.hxx"
#include "mixer/MixerList.hxx"
#include "mixer/plugins/WasapiMixerPlugin.hxx"
#include "output/Error.hxx"
#include "pcm/Export.hxx"
#include "thread/Cond.hxx"

View File

@ -19,7 +19,7 @@
#include "NullMixerListener.hxx"
#include "mixer/MixerControl.hxx"
#include "mixer/MixerList.hxx"
#include "mixer/plugins/AlsaMixerPlugin.hxx"
#include "filter/Registry.hxx"
#include "event/Loop.hxx"
#include "config/Block.hxx"