Skip to content

Commit 258c879

Browse files
committed
AudioOutputAdapter base class
1 parent d87f1f1 commit 258c879

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

src/AudioCodecs/AudioEncoded.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,13 +595,13 @@ class EncodedAudioStream : public EncodedAudioOutput {
595595
};
596596

597597
/**
598-
* @brief Facade class which lets an AudioWriter behave like a Print
598+
* @brief Adapter class which lets an AudioWriter behave like a Print
599599
* @author Phil Schatzmann
600600
* @copyright GPLv3
601601
*
602602
*/
603603

604-
class AudioWriterToAudioOutput : public AudioOutput {
604+
class AudioWriterToAudioOutput : public AudioOutputAdapter {
605605
public:
606606
void setWriter(AudioWriter *writer) { p_writer = writer; }
607607
size_t write(const uint8_t *in_ptr, size_t in_size) {

src/AudioTools/AudioOutput.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,18 @@ class HexDumpOutput : public AudioOutput {
292292
// legacy name
293293
using HexDumpStream = HexDumpOutput;
294294

295+
/**
296+
* @brief Base class for Output Adpapters
297+
*
298+
*/
299+
class AudioOutputAdapter : public AudioOutput {
300+
};
301+
295302
/**
296303
* @brief Wrapper which converts a AudioStream to a AudioOutput
297304
* @ingroup tools
298305
*/
299-
class AdapterAudioStreamToAudioOutput : public AudioOutput {
306+
class AdapterAudioStreamToAudioOutput : public AudioOutputAdapter {
300307
public:
301308
AdapterAudioStreamToAudioOutput() = default;
302309

@@ -328,7 +335,7 @@ class AdapterAudioStreamToAudioOutput : public AudioOutput {
328335
* @brief Wrapper which converts a Print to a AudioOutput
329336
* @ingroup tools
330337
*/
331-
class AdapterPrintToAudioOutput : public AudioOutput {
338+
class AdapterPrintToAudioOutput : public AudioOutputAdapter {
332339
public:
333340
AdapterPrintToAudioOutput(Print &print){
334341
p_print = &print;

src/AudioTools/ResampleStream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class TransformationReader {
5959
int availableForWrite() { return print_to_array.availableForWrite(); }
6060

6161
protected:
62-
class AdapterPrintToArray : public AudioOutput {
62+
class AdapterPrintToArray : public AudioOutputAdapter {
6363
public:
6464
void begin(uint8_t *array, size_t data_len) {
6565
TRACED();

0 commit comments

Comments
 (0)