audio_core: Implement OpenAL backend (#6450)

This commit is contained in:
Steveice10
2023-05-01 12:17:45 -07:00
committed by GitHub
parent ce553ab995
commit 055a58f01e
48 changed files with 1042 additions and 576 deletions

View File

@@ -16,9 +16,8 @@ namespace AudioCore {
DspInterface::DspInterface() = default;
DspInterface::~DspInterface() = default;
void DspInterface::SetSink(std::string_view sink_id, std::string_view audio_device) {
sink = CreateSinkFromID(Settings::values.sink_id.GetValue(),
Settings::values.audio_device_id.GetValue());
void DspInterface::SetSink(AudioCore::SinkType sink_type, std::string_view audio_device) {
sink = CreateSinkFromID(sink_type, audio_device);
sink->SetCallback(
[this](s16* buffer, std::size_t num_frames) { OutputCallback(buffer, num_frames); });
time_stretcher.SetOutputSampleRate(sink->GetNativeSampleRate());