16
0
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:
tmj-fstate
2017-11-19 16:02:12 +01:00
parent 7fc1256b46
commit bc43c21174
24 changed files with 566 additions and 182 deletions

View File

@@ -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