2023-05-01 20:17:45 +01:00
|
|
|
// Copyright 2023 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include "audio_core/input.h"
|
|
|
|
|
|
|
|
namespace AudioCore {
|
|
|
|
|
|
|
|
class OpenALInput final : public Input {
|
|
|
|
public:
|
|
|
|
explicit OpenALInput(std::string device_id);
|
|
|
|
~OpenALInput() override;
|
|
|
|
|
|
|
|
void StartSampling(const InputParameters& params) override;
|
|
|
|
void StopSampling() override;
|
2023-11-12 21:03:07 +00:00
|
|
|
bool IsSampling() override;
|
2023-05-01 20:17:45 +01:00
|
|
|
void AdjustSampleRate(u32 sample_rate) override;
|
|
|
|
Samples Read() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct Impl;
|
|
|
|
std::unique_ptr<Impl> impl;
|
|
|
|
std::string device_id;
|
|
|
|
};
|
|
|
|
|
|
|
|
std::vector<std::string> ListOpenALInputDevices();
|
|
|
|
|
|
|
|
} // namespace AudioCore
|