1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
3 | #pragma once |
4 | |
5 | #include "BsCorePrerequisites.h" |
6 | #include "Utility/BsModule.h" |
7 | |
8 | namespace bs |
9 | { |
10 | /** @addtogroup Audio-Internal |
11 | * @{ |
12 | */ |
13 | |
14 | /** Creates and destroys a specific audio system implementation. */ |
15 | class BS_CORE_EXPORT AudioFactory |
16 | { |
17 | public: |
18 | virtual ~AudioFactory() = default; |
19 | |
20 | /** Initializes the audio system. */ |
21 | virtual void startUp() = 0; |
22 | |
23 | /** Shuts down the audio system. */ |
24 | virtual void shutDown() = 0; |
25 | }; |
26 | |
27 | /** Takes care of loading, initializing and shutting down of a particular audio system implementation. */ |
28 | class BS_CORE_EXPORT AudioManager : public Module<AudioManager> |
29 | { |
30 | public: |
31 | /** |
32 | * Initializes the physics manager and a particular audio system implementation. |
33 | * |
34 | * @param[in] pluginName Name of the plugin containing a audio system implementation. |
35 | */ |
36 | AudioManager(const String& pluginName); |
37 | ~AudioManager(); |
38 | |
39 | private: |
40 | DynLib* mPlugin = nullptr; |
41 | AudioFactory* mFactory = nullptr; |
42 | }; |
43 | |
44 | /** @} */ |
45 | } |