Skip to content

Commit 046cac7

Browse files
committed
Updates examples setServerIP, AudioKit driver API
1 parent e0e75df commit 046cac7

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

examples/SnapClientAudioKit/SnapClientAudioKit.ino

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
*/
66
#include "AudioTools.h"
77
#include "SnapClient.h"
8-
#include "AudioLibs/AudioKit.h"
8+
#include "AudioLibs/AudioBoardStream.h" // install https://github.com/pschatzmann/arduino-audio-driver
99
#include "AudioCodecs/CodecOpus.h" // https://github.com/pschatzmann/arduino-libopus
1010
//#include "AudioCodecs/CodecFLAC.h" // https://github.com/pschatzmann/arduino-libflac.git
1111
//#include "AudioCodecs/CodecVorbis.h" //https://github.com/pschatzmann/arduino-libvorbis-idec
1212

1313
#define ARDUINO_LOOP_STACK_SIZE (10 * 1024)
1414

15-
AudioKitStream out;
15+
AudioBoardStream out(AudioKitEs8388V1);
1616
//FLACDecoder flac;
1717
//VorbisDecoder ogg;
1818
//WAVDecoder pcm;
@@ -23,7 +23,8 @@ SnapClient client(wifi, out, opus);
2323

2424
void setup() {
2525
Serial.begin(115200);
26-
// login to wifi
26+
27+
// login to wifi -> Define values in SnapConfig.h or replace them here
2728
WiFi.begin(CONFIG_WIFI_SSID, CONFIG_WIFI_PASSWORD);
2829
Serial.print("Connecting to WiFi ..");
2930
while (WiFi.status() != WL_CONNECTED) {
@@ -38,6 +39,9 @@ void setup() {
3839
// use full volume of kit - volume control done by client
3940
out.setVolume(1.0);
4041

42+
// Define CONFIG_SNAPCAST_SERVER_HOST in SnapConfig.h or here
43+
// client.setServerIP(IPAddress(192,168,1,38));
44+
4145
// start snap client
4246
client.begin(synch);
4347
}

examples/SnapClientI2S/SnapClientI2S.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ SnapClient client(wifi, out, opus);
1717

1818
void setup() {
1919
Serial.begin(115200);
20-
// login to wifi
20+
21+
// login to wifi -> Define values in SnapConfig.h or replace them here
2122
WiFi.begin(CONFIG_WIFI_SSID, CONFIG_WIFI_PASSWORD);
2223
Serial.print("Connecting to WiFi ..");
2324
while (WiFi.status() != WL_CONNECTED) {
@@ -36,6 +37,9 @@ void setup() {
3637
cfg.pin_data = 22;
3738
out.begin(cfg);
3839

40+
// Define CONFIG_SNAPCAST_SERVER_HOST in SnapConfig.h or here
41+
// client.setServerIP(IPAddress(192,168,1,38));
42+
3943
// start snap client
4044
client.begin();
4145
}

examples/SnapClientInternalDAC/SnapClientInternalDAC.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ SnapClient client(wifi, out, opus);
1717

1818
void setup() {
1919
Serial.begin(115200);
20-
// login to wifi
20+
21+
// login to wifi -> Define values in SnapConfig.h or replace them here
2122
WiFi.begin(CONFIG_WIFI_SSID, CONFIG_WIFI_PASSWORD);
2223
Serial.print("Connecting to WiFi ..");
2324
while (WiFi.status() != WL_CONNECTED) {
@@ -29,6 +30,9 @@ void setup() {
2930
Serial.println();
3031
Serial.println(WiFi.localIP());
3132

33+
// Define CONFIG_SNAPCAST_SERVER_HOST in SnapConfig.h or here
34+
// client.setServerIP(IPAddress(192,168,1,38));
35+
3236
// start snap client
3337
client.begin();
3438
}

0 commit comments

Comments
 (0)