4 * ***** BEGIN LGPL LICENSE BLOCK *****
6 * Copyright 2009 Jörg Hermann Müller
8 * This file is part of AudaSpace.
10 * AudaSpace is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
15 * AudaSpace is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
23 * ***** END LGPL LICENSE BLOCK *****
29 #include "AUD_IMixer.h"
30 class AUD_SDLMixerFactory;
33 struct AUD_SDLMixerBuffer
41 * This class is able to mix audiosignals with the help of SDL.
43 class AUD_SDLMixer : public AUD_IMixer
47 * The mixer factory that prepares all readers for superposition.
49 AUD_SDLMixerFactory* m_factory;
52 * The list of buffers to superpose.
54 std::list<AUD_SDLMixerBuffer> m_buffers;
57 * The size of an output sample.
67 virtual ~AUD_SDLMixer();
69 virtual AUD_IReader* prepare(AUD_IReader* reader);
70 virtual void setSpecs(AUD_Specs specs);
71 virtual void add(sample_t* buffer, AUD_Specs specs, int length,
73 virtual void superpose(sample_t* buffer, int length, float volume);