ppsspp/Windows/WASAPIStream.h
Unknown W. Brackets c571924765 Windows: Support WASAPI default device switching.
No support for specifying a certain device.
2018-09-30 21:47:00 -07:00

25 lines
642 B
C++

#pragma once
#include "WindowsAudio.h"
// This should only be included from WindowsAudio.cpp and WASAPIStream.cpp.
class WASAPIAudioBackend : public WindowsAudioBackend {
public:
WASAPIAudioBackend();
~WASAPIAudioBackend() override;
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;
volatile int threadData_ = 0;
};