CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Windows/WindowsAudio.h
Views: 1401
1
#pragma once
2
3
#include "Common/CommonWindows.h"
4
#include "Core/ConfigValues.h"
5
6
// Always 2 channels, 16-bit audio.
7
typedef int (*StreamCallback)(short *buffer, int numSamples, int rate);
8
9
// Note that the backend may override the passed in sample rate. The actual sample rate
10
// should be returned by GetSampleRate though.
11
class WindowsAudioBackend {
12
public:
13
virtual ~WindowsAudioBackend() {}
14
virtual bool Init(HWND window, StreamCallback _callback, int sampleRate) = 0;
15
virtual int GetSampleRate() const = 0;
16
};
17
18
// Factory
19
WindowsAudioBackend *CreateAudioBackend(AudioBackendType type);
20
21