mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 06:59:18 +02:00
audio subsystem: openal emitter, minor audio fixes
This commit is contained in:
6
audio.h
6
audio.h
@@ -16,6 +16,7 @@ namespace audio {
|
||||
|
||||
ALuint const null_resource { ~ALuint{ 0 } };
|
||||
|
||||
// wrapper for audio sample
|
||||
struct openal_buffer {
|
||||
// members
|
||||
ALuint id { null_resource }; // associated AL resource
|
||||
@@ -36,6 +37,8 @@ private:
|
||||
|
||||
using buffer_handle = std::size_t;
|
||||
|
||||
|
||||
//
|
||||
class buffer_manager {
|
||||
|
||||
public:
|
||||
@@ -47,6 +50,9 @@ public:
|
||||
// creates buffer object out of data stored in specified file. returns: handle to the buffer or null_handle if creation failed
|
||||
buffer_handle
|
||||
create( std::string const &Filename );
|
||||
// provides direct access to a specified buffer
|
||||
audio::openal_buffer const &
|
||||
buffer( audio::buffer_handle const Buffer ) const;
|
||||
|
||||
private:
|
||||
// types
|
||||
|
||||
Reference in New Issue
Block a user