Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ifndef __AUDIO_DEVICE__H__
- #define __AUDIO_DEVICE__H__
- #include <AL/al.h>
- #include <AL/alc.h>
- namespace Engine
- {
- class AudioDevice
- {
- private:
- ALCdevice* mDevice;
- public:
- AudioDevice()
- {
- mDevice = alcOpenDevice(nullptr);
- }
- ~AudioDevice()
- {
- if (mDevice != nullptr)
- {
- alcCloseDevice(mDevice);
- }
- }
- inline ALCdevice* Get() const
- {
- return mDevice;
- }
- };
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement