ppsspp/Windows/WindowsAudio.cpp
2018-09-30 20:29:39 -07:00

20 lines
440 B
C++

#include "Common/OSVersion.h"
#include "WindowsAudio.h"
#include "DSoundStream.h"
#include "WASAPIStream.h"
WindowsAudioBackend *CreateAudioBackend(AudioBackendType type) {
if (IsVistaOrHigher()) {
switch (type) {
case AUDIO_BACKEND_WASAPI:
case AUDIO_BACKEND_AUTO:
return new WASAPIAudioBackend();
case AUDIO_BACKEND_DSOUND:
default:
return new DSoundAudioBackend();
}
} else {
return new DSoundAudioBackend();
}
}