mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
31 lines
666 B
C++
31 lines
666 B
C++
#pragma once
|
|
|
|
#include "PLCore.h"
|
|
|
|
namespace PortabilityLayer
|
|
{
|
|
struct AudioChannel;
|
|
|
|
typedef void (*AudioChannelCallback_t)(PortabilityLayer::AudioChannel *channel);
|
|
|
|
struct AudioChannel
|
|
{
|
|
virtual void Destroy(bool wait) = 0;
|
|
virtual bool AddBuffer(const void *lengthTaggedBuffer, bool blocking) = 0;
|
|
virtual bool AddCallback(AudioChannelCallback_t callback, bool blocking) = 0;
|
|
virtual void ClearAllCommands() = 0;
|
|
virtual void Stop() = 0;
|
|
};
|
|
|
|
class SoundSystem
|
|
{
|
|
public:
|
|
virtual AudioChannel *CreateChannel() = 0;
|
|
|
|
virtual void SetVolume(uint8_t vol) = 0;
|
|
virtual uint8_t GetVolume() const = 0;
|
|
|
|
static SoundSystem *GetInstance();
|
|
};
|
|
}
|