2019-02-27 23:13:51 +01:00
|
|
|
// Copyright 2018 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
2023-05-01 21:17:45 +02:00
|
|
|
#include <string>
|
2019-02-27 23:13:51 +01:00
|
|
|
#include <vector>
|
2023-05-01 21:17:45 +02:00
|
|
|
#include "audio_core/input.h"
|
2019-02-27 23:13:51 +01:00
|
|
|
|
|
|
|
namespace AudioCore {
|
|
|
|
|
2023-05-01 21:17:45 +02:00
|
|
|
class CubebInput final : public Input {
|
2019-02-27 23:13:51 +01:00
|
|
|
public:
|
2019-11-01 19:33:06 +01:00
|
|
|
explicit CubebInput(std::string device_id);
|
2019-03-05 06:47:24 +01:00
|
|
|
~CubebInput() override;
|
2019-02-27 23:13:51 +01:00
|
|
|
|
2023-05-01 21:17:45 +02:00
|
|
|
void StartSampling(const InputParameters& params) override;
|
2019-02-27 23:13:51 +01:00
|
|
|
|
|
|
|
void StopSampling() override;
|
|
|
|
|
|
|
|
void AdjustSampleRate(u32 sample_rate) override;
|
|
|
|
|
2023-05-01 21:17:45 +02:00
|
|
|
Samples Read() override;
|
2019-03-05 06:47:24 +01:00
|
|
|
|
2019-02-27 23:13:51 +01:00
|
|
|
private:
|
|
|
|
struct Impl;
|
|
|
|
std::unique_ptr<Impl> impl;
|
2019-11-01 19:33:06 +01:00
|
|
|
std::string device_id;
|
2019-02-27 23:13:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
std::vector<std::string> ListCubebInputDevices();
|
|
|
|
|
|
|
|
} // namespace AudioCore
|