Skip to content

Commit f3cc90f

Browse files
committed
make example compile both on the desktop and in arduino
1 parent 1f56d51 commit f3cc90f

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

examples-desktop/generator/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# Desktop Implementation
1+
# Playing Sound on your Desktop
22

33
We provide some generic output which will also work on Linux, Windows and OS/X
4-
The provided cmake is downloading all dependencies and builds an executable from the sketch
4+
The cmake is downloading all dependencies and builds an executable from the sketch.
5+
6+
You just need to provide an Arduino Sketch as cpp file. In our example we use an example setup that can be compiled both in Arduin and with cmake:
7+
8+
- the sketch is provided as ino file
9+
- the cpp file is including the Arduino.h and the ino file
510

611
To build the example execute
712

@@ -10,4 +15,5 @@ mkdir build
1015
cd build
1116
cmake ..
1217
make
13-
```
18+
```
19+

examples-desktop/generator/generator.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void setup(void) {
1515
AudioLogger::instance().begin(Serial, AudioLogger::Info);
1616

1717
// open output
18-
PortAudioConfig config = out.defaultConfig();
18+
auto config = out.defaultConfig();
1919
config.sample_rate = sample_rate;
2020
config.channels = channels;
2121
config.bits_per_sample = sizeof(int16_t)*8;

0 commit comments

Comments
 (0)