You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
505 B
26 lines
505 B
/*
|
|
* Copyright 2023 jacqueline <me@jacqueline.id.au>
|
|
*
|
|
* SPDX-License-Identifier: GPL-3.0-only
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
namespace drivers {
|
|
|
|
class IAudioBackend {
|
|
public:
|
|
virtual ~IAudioBackend() {}
|
|
|
|
enum SampleRate {};
|
|
enum BitDepth {};
|
|
|
|
virtual auto Configure(SampleRate sample_rate, BitDepth bit_depth)
|
|
-> bool = 0;
|
|
virtual auto WritePcmData(uint8_t* data, size_t length) -> bool = 0;
|
|
|
|
virtual auto SetVolume(uint8_t percent) -> void = 0;
|
|
};
|
|
|
|
} // namespace drivers
|
|
|