mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
23 lines
600 B
C++
23 lines
600 B
C++
#pragma once
|
|
|
|
#include "Common/CommonWindows.h"
|
|
|
|
typedef int (*StreamCallback)(short *buffer, int numSamples, int bits, int rate, int channels);
|
|
|
|
class WindowsAudioBackend {
|
|
public:
|
|
WindowsAudioBackend() {}
|
|
virtual ~WindowsAudioBackend() {}
|
|
virtual bool Init(HWND window, StreamCallback _callback, int sampleRate) = 0;
|
|
virtual void Update() {} // Doesn't have to do anything
|
|
virtual int GetSampleRate() = 0;
|
|
};
|
|
|
|
enum AudioBackendType {
|
|
AUDIO_BACKEND_DSOUND,
|
|
// AUDIO_BACKEND_WASAPI, // TODO
|
|
AUDIO_BACKEND_AUTO
|
|
};
|
|
|
|
// Factory
|
|
WindowsAudioBackend *CreateAudioBackend(AudioBackendType type);
|