@@ -47,8 +47,10 @@ class VS1053Config : public AudioInfo {
4747};
4848
4949/* *
50- * @brief VS1053 Output Interface which processes PCM data by default. If you
51- * want to write encoded data set is_encoded_data = true in the configuration;
50+ * @brief Output Interface which processes PCM data by default using a VS1053
51+ * audio module. If you want to write encoded data set is_encoded_data = true in
52+ * the configuration; Many VS1053 modules also have a built in microphone that
53+ * can be used for recording.
5254 * @ingroup io
5355 * @author Phil Schatzmann
5456 * @copyright GPLv3
@@ -79,6 +81,7 @@ class VS1053Stream : public AudioStream, public VolumeSupport {
7981
8082 ~VS1053Stream () { end (); }
8183
84+ // / Provides the default configuration for the indicated mod
8285 VS1053Config defaultConfig (RxTxMode mode = TX_MODE) {
8386 TRACED ();
8487 VS1053Config c;
@@ -91,9 +94,15 @@ class VS1053Stream : public AudioStream, public VolumeSupport {
9194 }
9295
9396 // / defines the default configuration that is used with the next begin()
94- void setAudioInfo (VS1053Config c) { cfg = c; }
97+ void setAudioInfo (VS1053Config c) {
98+ cfg = c;
99+ notifiyAudioChange (cfg);
100+ }
95101
96- void setAudioInfo (AudioInfo c) { cfg.copyFrom (c); }
102+ void setAudioInfo (AudioInfo c) {
103+ cfg.copyFrom (c);
104+ notifiyAudioChange (cfg);
105+ }
97106
98107 // / Starts with the default config or restarts
99108 bool begin () { return begin (cfg); }
@@ -344,7 +353,7 @@ class VS1053Stream : public AudioStream, public VolumeSupport {
344353 EncodedAudioStream* p_out = nullptr ;
345354 WAVEncoder wav;
346355 AudioEncoder* p_encoder = &wav; // by default we send wav data
347- CopyEncoder copy; // used when is_encoded_data == true
356+ CopyEncoder copy; // used when is_encoded_data == true
348357
349358 bool beginTx () {
350359 TRACEI ();
0 commit comments