From 325f2f17b35383cbcd2ce0f63c4f99bd1f463ca5 Mon Sep 17 00:00:00 2001 From: Nicolay Korslund Date: Sat, 21 Nov 2009 11:49:31 +0100 Subject: [PATCH] Renamed sound_pair to input_filter / InputFilter --- sound/imp/{sound_pair.h => input_filter.h} | 20 ++++++++++---------- sound/imp/openal_ffmpeg.h | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) rename sound/imp/{sound_pair.h => input_filter.h} (79%) diff --git a/sound/imp/sound_pair.h b/sound/imp/input_filter.h similarity index 79% rename from sound/imp/sound_pair.h rename to sound/imp/input_filter.h index 6b15f7461..f81f1e8a5 100644 --- a/sound/imp/sound_pair.h +++ b/sound/imp/input_filter.h @@ -1,5 +1,5 @@ -#ifndef MANGLE_SOUND_PAIR_H -#define MANGLE_SOUND_PAIR_H +#ifndef MANGLE_INPUT_FILTER_H +#define MANGLE_INPUT_FILTER_H #include "sound.h" @@ -19,15 +19,15 @@ namespace Sound { Example: \code - // Combine FFmpeg input and OpenAL output. OpenAL cannot decode - // sound files on its own. - SoundPairManager mg(new FFM_InputManager, new OpenAL_Manager); + // Add FFmpeg input to an OpenAL soud output manager. OpenAL cannot + // decode sound files on its own. + InputFilter mg(new OpenAL_Manager, new FFM_InputManager); // We can now load filenames directly. mg.load("file1.mp3"); \endcode */ -class PairManager : public Manager +class InputFilter : public Manager { protected: Manager *snd; @@ -35,14 +35,14 @@ class PairManager : public Manager public: /// Empty constructor - PairManager() {} + InputFilter() {} /// Assign an input manager and a sound manager to this object - PairManager(InputManager *_inp, Manager *_snd) - { set(_inp, _snd); } + InputFilter(Manager *_snd, InputManager *_inp) + { set(_snd, _inp); } /// Assign an input manager and a sound manager to this object - void set(InputManager *_inp, Manager *_snd) + void set(Manager *_snd, InputManager *_inp) { inp = _inp; snd = _snd; diff --git a/sound/imp/openal_ffmpeg.h b/sound/imp/openal_ffmpeg.h index 7e41fd8b9..80882d0f5 100644 --- a/sound/imp/openal_ffmpeg.h +++ b/sound/imp/openal_ffmpeg.h @@ -1,7 +1,7 @@ #ifndef MANGLE_FFMPEG_OPENAL_H #define MANGLE_FFMPEG_OPENAL_H -#include "sound_pair.h" +#include "input_filter.h" #include "input_ffmpeg.h" #include "output_openal.h" @@ -9,13 +9,13 @@ namespace Mangle { namespace Sound { /// A PairManager filter that adds FFmpeg decoding to OpenAL -class OpenAL_FFM_Manager : public PairManager +class OpenAL_FFM_Manager : public InputFilter { public: OpenAL_FFM_Manager() { - set(new FFM_InputManager, - new OpenAL_Manager); + set(new OpenAL_Manager, + new FFM_InputManager); } ~OpenAL_FFM_Manager() {