Skip to content

Commit 94f4ae9

Browse files
committed
Communication compile errors
1 parent be8e3b2 commit 94f4ae9

File tree

6 files changed

+18
-16
lines changed

6 files changed

+18
-16
lines changed

examples/sandbox/communication/communication-bt-send/communication-bt-send.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
uint16_t sample_rate = 44100;
1717
uint8_t channels = 2; // The stream will have 2 channels
18-
SineWaveGenerator<sound_t> sineWave( 32000); // subclass of SoundGenerator with max amplitude of 32000
19-
GeneratedSoundStream<sound_t> sound( sineWave); // Stream generated from sine wave
18+
SineWaveGenerator<int16_t> sineWave( 32000); // subclass of SoundGenerator with max amplitude of 32000
19+
GeneratedSoundStream<int16_t> sound( sineWave); // Stream generated from sine wave
2020
BluetoothSerial SerialBT;
2121
StreamCopy copier(SerialBT, sound); // copies sound into i2s
2222

examples/sandbox/communication/communication-espnow-receive/communication-espnow-receive.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ uint8_t channels = 2; // The stream will have 2 channels
1818
ESPNowStream now;
1919
I2SStream out;
2020
StreamCopy copier(out, now);
21-
const char *ssd = "ssid";
21+
const char *ssid = "ssid";
2222
const char *password = "password";
23-
const char *peers[] = {"A8:48:FA:0B:93:40"}
23+
const char *peers[] = {"A8:48:FA:0B:93:40"};
2424

2525
void setup() {
2626
Serial.begin(115200);
2727
AudioLogger::instance().begin(Serial, AudioLogger::Info);
2828

2929
now.addPeers(peers);
30-
now.begin(ssid, pasword);
30+
now.begin(ssid, password);
3131

3232
// start I2S
3333
Serial.println("starting I2S...");

examples/sandbox/communication/communication-espnow-send/communication-espnow-send.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515

1616
uint16_t sample_rate = 44100;
1717
uint8_t channels = 2; // The stream will have 2 channels
18-
SineWaveGenerator<sound_t> sineWave( 32000); // subclass of SoundGenerator with max amplitude of 32000
19-
GeneratedSoundStream<sound_t> sound( sineWave); // Stream generated from sine wave
18+
SineWaveGenerator<int16_t> sineWave( 32000); // subclass of SoundGenerator with max amplitude of 32000
19+
GeneratedSoundStream<int16_t> sound( sineWave); // Stream generated from sine wave
2020
ESPNowStream now;
2121
StreamCopy copier(now, sound); // copies sound into i2s
22-
const char *ssd = "ssid";
22+
const char *ssid = "ssid";
2323
const char *password = "password";
24-
const char *peers[] = {"A8:48:FA:0B:93:40"}
24+
const char *peers[] = {"A8:48:FA:0B:93:40"};
2525

2626
void setup() {
2727
Serial.begin(115200);
2828
AudioLogger::instance().begin(Serial, AudioLogger::Info);
2929

3030
now.addPeers(peers);
31-
now.begin(ssid, pasword);
31+
now.begin(ssid, password);
3232

3333
// Setup sine wave
3434
sineWave.begin(channels, sample_rate, N_B4);

examples/sandbox/communication/communication-ip-send/communication-ip-send.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515

1616
uint16_t sample_rate = 44100;
1717
uint8_t channels = 2; // The stream will have 2 channels
18-
SineWaveGenerator<sound_t> sineWave( 32000); // subclass of SoundGenerator with max amplitude of 32000
19-
GeneratedSoundStream<sound_t> sound( sineWave); // Stream generated from sine wave
18+
SineWaveGenerator<int16_t> sineWave( 32000); // subclass of SoundGenerator with max amplitude of 32000
19+
GeneratedSoundStream<int16_t> sound( sineWave); // Stream generated from sine wave
2020
WiFiClient client;
2121
StreamCopy copier(client, sound); // copies sound into i2s
2222
const char *ssid = "ssid";
23+
const char *password = "password";
24+
2325

2426
void setup() {
2527
Serial.begin(115200);

examples/sandbox/communication/communication-serial-send/communication-serial-send.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
uint16_t sample_rate = 44100;
1919
uint8_t channels = 2; // The stream will have 2 channels
20-
SineWaveGenerator<sound_t> sineWave( 32000); // subclass of SoundGenerator with max amplitude of 32000
21-
GeneratedSoundStream<sound_t> sound( sineWave); // Stream generated from sine wave
20+
SineWaveGenerator<int16_t> sineWave( 32000); // subclass of SoundGenerator with max amplitude of 32000
21+
GeneratedSoundStream<int16_t> sound( sineWave); // Stream generated from sine wave
2222
StreamCopy copier(Serial2, sound); // copies sound into i2s
2323

2424
void setup() {

src/AudioLibs/Communication.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ class ESPNowStream : public AudioStreamX {
150150
// we use the first confirming mac_addr for further confirmations and ignore
151151
// others
152152
if (first_mac[0] == 0) {
153-
strcpy(first_mac, mac_addr);
153+
strcpy((char*)first_mac,(char*) mac_addr);
154154
}
155155
LOGI("%s:%d", mac_addr, status);
156-
if (strcmp(first_mac, mac_addr) == 0 && status == ESP_NOW_SEND_SUCCESS) {
156+
if (strcmp((char*)first_mac, (char*)mac_addr) == 0 && status == ESP_NOW_SEND_SUCCESS) {
157157
ESPNowStreamSelf->available_to_write = ESP_NOW_MAX_DATA_LEN;
158158
}
159159
}

0 commit comments

Comments
 (0)