File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -230,16 +230,21 @@ class AudioOutputAdapter : public AudioOutput {};
230230 */
231231class AdapterPrintToAudioOutput : public AudioOutputAdapter {
232232 public:
233- AdapterPrintToAudioOutput (Print &print) { p_print = &print; }
234- void setAudioInfo (AudioInfo info) {}
233+ AdapterPrintToAudioOutput () = default ;
234+ AdapterPrintToAudioOutput (Print &print) { setStream (print); }
235+ void setStream (Print& out) { p_print = &out; }
236+ void setAudioInfo (AudioInfo info) { cfg = info;}
235237 size_t write (const uint8_t *data, size_t len) {
236238 return p_print->write (data, len);
237239 }
238240 // / If true we need to release the related memory in the destructor
239241 virtual bool isDeletable () { return true ; }
240242
243+ AudioInfo audioInfo () {return cfg; }
244+
241245 protected:
242246 Print *p_print = nullptr ;
247+ AudioInfo cfg;
243248};
244249
245250/* *
You can’t perform that action at this time.
0 commit comments