ppsspp/Windows/WASAPIStream.h
Unknown W. Brackets f44852bb18 Global: Cleanup virtual/override specifiers.
Also missing virtual destructors, hidden non-overrides, etc.
2022-12-10 21:13:36 -08:00

26 lines
651 B
C++

#pragma once
#include <atomic>
#include "WindowsAudio.h"
// This should only be included from WindowsAudio.cpp and WASAPIStream.cpp.
class WASAPIAudioBackend : public WindowsAudioBackend {
public:
WASAPIAudioBackend();
~WASAPIAudioBackend();
bool Init(HWND window, StreamCallback callback, int sampleRate) override; // If fails, can safely delete the object
void Update() override {}
int GetSampleRate() override { return sampleRate_; }
private:
int RunThread();
static unsigned int WINAPI soundThread(void *param);
HANDLE hThread_ = nullptr;
StreamCallback callback_ = nullptr;
int sampleRate_ = 0;
std::atomic<int> threadData_;
};