ppsspp/Windows/DSoundStream.h

22 lines
684 B
C
Raw Normal View History

#pragma once
2012-11-01 15:19:01 +00:00
#include "Common/CommonWindows.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
typedef int (*StreamCallback)(short *buffer, int numSamples, int bits, int rate, int channels);
2012-11-01 15:19:01 +00:00
// Note that the backend may override the passed in sample rate. The actual sample rate
// should be returned by GetSampleRate though.
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;
};
2012-11-01 15:19:01 +00:00
// Factory
WindowsAudioBackend *CreateAudioBackend(AudioBackendType type);