nomlib
Loading...
Searching...
No Matches
AudioDeviceLocator.hpp
1#pragma once
2
3#include "export.hpp"
4#include "nomlib/types.hpp"
5#include "nomlib/audio/IAudioDevice.hpp"
6
7typedef nom::audio::IAudioDevice* ptr_renderer;
8// typedef IAudioContext* ptr_ctx;
9
10/* Experimental typedefs - unused but reserved */
11typedef std::unique_ptr<ptr_renderer> unique_ptr;
12typedef std::shared_ptr<ptr_renderer> shared_ptr;
13typedef std::weak_ptr<ptr_renderer> weak_ptr;
14
15namespace nom {
16namespace audio {
17
18// Forward declarations
19class IAudioDevice;
20class IAudioContext;
21
22// Global "Singleton" class interface for audio subsystem
23class NOM_EXPORT AudioDeviceLocator
24{
25 public:
26 static void release();
27 static ptr_renderer instance();
28
29 static void setup_provider(ptr_renderer dev);
30 protected:
31 AudioDeviceLocator();
32 ~AudioDeviceLocator();
33 private:
34 static void initialize();
35 static ptr_renderer audio_; // device handle
36};
37
38NOM_EXPORT ptr_renderer create_audio_renderer(nom::uint32 channels);
39// ?? Future implementation
40// ptr_renderer create_audio_renderer(nom::uint32 channels = 64, uint32 audio_specs);
41
42//ictx_renderer create_audio_input(nom::uint32 channels);
43
44} // namespace audio
45} // namespace nom