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 *****
26 #ifndef AUD_SNDFILEFACTORY
27 #define AUD_SNDFILEFACTORY
29 #include "AUD_IFactory.h"
30 #include "AUD_Reference.h"
34 * This factory reads a sound file via libsndfile.
36 class AUD_SndFileFactory : public AUD_IFactory
40 * The filename of the sound source file.
45 * The buffer to read from.
47 AUD_Reference<AUD_Buffer> m_buffer;
51 * Creates a new factory.
52 * \param filename The sound file path.
54 AUD_SndFileFactory(const char* filename);
57 * Creates a new factory.
58 * \param buffer The buffer to read from.
59 * \param size The size of the buffer.
61 AUD_SndFileFactory(unsigned char* buffer, int size);
64 * Destroys the factory.
66 ~AUD_SndFileFactory();
68 virtual AUD_IReader* createReader();
71 #endif //AUD_SNDFILEFACTORY