Skip to content

Commit

Permalink
streams-i2s-a2dp.ino example - remove VolumeStream
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Nov 9, 2023
1 parent 0fcb1d4 commit a9732f8
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,23 @@

I2SStream i2sStream; // Access I2S as stream
A2DPStream a2dpStream; // access A2DP as stream
VolumeStream volume(a2dpStream);
StreamCopy copier(volume, i2sStream); // copy i2sStream to a2dpStream
StreamCopy copier(i2sStream, i2sStream); // copy i2sStream to a2dpStream
ConverterFillLeftAndRight<int16_t> filler(LeftIsEmpty); // fill both channels

// Arduino Setup
void setup(void) {
Serial.begin(115200);
AudioLogger::instance().begin(Serial, AudioLogger::Info);

// set intial volume
volume.setVolume(0.3);

// start bluetooth
Serial.println("starting A2DP...");
auto cfgA2DP = a2dpStream.defaultConfig(TX_MODE);
cfgA2DP.name = "LEXON MINO L";
a2dpStream.begin(cfgA2DP);

// set intial volume
a2dpStream.setVolume(0.3);

// start i2s input with default configuration
Serial.println("starting I2S...");
a2dpStream.setNotifyAudioChange(i2sStream); // i2s is using the info from a2dp
Expand Down

0 comments on commit a9732f8

Please sign in to comment.