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.
27 lines
572 B
27 lines
572 B
#pragma once
|
|
|
|
#include "audio_common.h"
|
|
#include "audio_element.h"
|
|
#include <cstdint>
|
|
|
|
namespace drivers {
|
|
|
|
class IAudioOutput {
|
|
public:
|
|
IAudioOutput(audio_element_handle_t element) : element_(element) {}
|
|
virtual ~IAudioOutput() {
|
|
audio_element_deinit(element_);
|
|
}
|
|
|
|
auto GetAudioElement() -> audio_element_handle_t {
|
|
return element_;
|
|
}
|
|
|
|
virtual auto SetVolume(uint8_t volume) -> void = 0;
|
|
virtual auto Configure(audio_element_info_t info) -> void = 0;
|
|
|
|
protected:
|
|
audio_element_handle_t element_;
|
|
};
|
|
|
|
} // namespace drivers
|
|
|