1 | /** |
2 | * Copyright (c) 2006-2023 LOVE Development Team |
3 | * |
4 | * This software is provided 'as-is', without any express or implied |
5 | * warranty. In no event will the authors be held liable for any damages |
6 | * arising from the use of this software. |
7 | * |
8 | * Permission is granted to anyone to use this software for any purpose, |
9 | * including commercial applications, and to alter it and redistribute it |
10 | * freely, subject to the following restrictions: |
11 | * |
12 | * 1. The origin of this software must not be misrepresented; you must not |
13 | * claim that you wrote the original software. If you use this software |
14 | * in a product, an acknowledgment in the product documentation would be |
15 | * appreciated but is not required. |
16 | * 2. Altered source versions must be plainly marked as such, and must not be |
17 | * misrepresented as being the original software. |
18 | * 3. This notice may not be removed or altered from any source distribution. |
19 | **/ |
20 | |
21 | |
22 | |
23 | #ifndef LOVE_SOUND_LULLABY_SOUND_H |
24 | #define LOVE_SOUND_LULLABY_SOUND_H |
25 | |
26 | // LOVE |
27 | #include <sound/Sound.h> |
28 | #include "sound/Decoder.h" |
29 | |
30 | namespace love |
31 | { |
32 | namespace sound |
33 | { |
34 | namespace lullaby |
35 | { |
36 | |
37 | /** |
38 | * The love.sound.lullaby module is the custom sound decoder module for LOVE. Instead |
39 | * of using an intermediate library like SDL_sound, it interfaces with relevant libraries |
40 | * directly (libmpg123, libmodplug, libFLAC, etc). |
41 | * |
42 | * It was Mike that came up with the name Lullaby, which we both instantly recognized as awesome. |
43 | **/ |
44 | class Sound : public love::sound::Sound |
45 | { |
46 | public: |
47 | |
48 | /** |
49 | * Constructor. Initializes relevant libraries. |
50 | **/ |
51 | Sound(); |
52 | |
53 | /** |
54 | * Destructor. Deinitializes relevant libraries. |
55 | **/ |
56 | virtual ~Sound(); |
57 | |
58 | /// @copydoc love::Module::getName |
59 | const char *getName() const; |
60 | |
61 | /// @copydoc love::sound::Sound::newDecoder |
62 | sound::Decoder *newDecoder(love::filesystem::FileData *file, int bufferSize); |
63 | |
64 | }; // Sound |
65 | |
66 | } // lullaby |
67 | } // sound |
68 | } // love |
69 | |
70 | #endif // LOVE_SOUND_LULLABY_SOUND_H |
71 | |