mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 13:59:19 +02:00
audio subsystem replacement: openal audio renderer and buffer class, removed deprecated files
This commit is contained in:
47
audiorenderer.h
Normal file
47
audiorenderer.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "audio.h"
|
||||
|
||||
namespace audio {
|
||||
|
||||
class openal_renderer {
|
||||
|
||||
public:
|
||||
// destructor
|
||||
~openal_renderer();
|
||||
// methods
|
||||
// buffer methods
|
||||
// returns handle to a buffer containing audio data from specified file
|
||||
buffer_handle
|
||||
fetch_buffer( std::string const &Filename );
|
||||
// core methods
|
||||
// initializes the service
|
||||
bool
|
||||
init();
|
||||
|
||||
private:
|
||||
// methods
|
||||
bool
|
||||
init_caps();
|
||||
// members
|
||||
ALCdevice * m_device { nullptr };
|
||||
ALCcontext * m_context { nullptr };
|
||||
bool m_ready { false }; // renderer is initialized and functional
|
||||
|
||||
buffer_manager m_buffers;
|
||||
};
|
||||
|
||||
extern openal_renderer renderer;
|
||||
|
||||
} // audio
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user