mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
26 lines
485 B
C++
26 lines
485 B
C++
#pragma once
|
|
|
|
#include "tools/PsfPlayer/Source/SoundHandler.h"
|
|
|
|
#include <deque>
|
|
#include <vector>
|
|
#include <mutex>
|
|
|
|
class CSH_LibreAudio : public CSoundHandler
|
|
{
|
|
public:
|
|
CSH_LibreAudio() = default;
|
|
|
|
static CSoundHandler* HandlerFactory();
|
|
|
|
void Reset() override;
|
|
void Write(int16*, unsigned int, unsigned int) override;
|
|
bool HasFreeBuffers() override;
|
|
void RecycleBuffers() override;
|
|
|
|
void ProcessBuffer();
|
|
|
|
private:
|
|
std::vector<int16> m_buffer;
|
|
std::mutex m_buffer_lock;
|
|
};
|