Skip to content

Commit 0206f3c

Browse files
committed
cleanup experiments
1 parent 37c35f9 commit 0206f3c

File tree

10 files changed

+203
-977
lines changed

10 files changed

+203
-977
lines changed

examples/build-arch.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ compile_example "esp8266:esp8266:generic"
2626
compile_example "arduino:mbed_rp2040:pico"
2727
compile_example "rp2040:rp2040:generic"
2828
compile_example "arduino:avr:nano"
29+
compile_example "arduino:samd:arduino_zero_native"
2930
#compile_example "STMicroelectronics:stm32:GenF4"
3031

3132
./cleanup.sh

src/AudioCodecs/CodecBase64.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ class DecoderBase64 : public AudioDecoder {
117117
memset(result.data(), 0, result.size());
118118

119119
for (size_t i = 0, j = 0; i < L; i += 4) {
120-
int n = B64index[p[i]] << 18 | B64index[p[i + 1]] << 12 |
120+
int32_t n = static_cast<int32_t>(B64index[p[i]]) << 18 | B64index[p[i + 1]] << 12 |
121121
B64index[p[i + 2]] << 6 | B64index[p[i + 3]];
122122
result[j++] = n >> 16;
123123
result[j++] = n >> 8 & 0xFF;
124124
result[j++] = n & 0xFF;
125125
}
126126
if (pad) {
127-
int n = B64index[p[L]] << 18 | B64index[p[L + 1]] << 12;
127+
int32_t n = static_cast<int32_t>(B64index[p[L]]) << 18 | B64index[p[L + 1]] << 12;
128128
result[result.size() - 1] = n >> 16;
129129

130130
if (len > L + 2 && p[L + 2] != '=') {

src/AudioConfig.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,14 @@ using WiFiServerSecure = BearSSL::WiFiServerSecure;
472472
#define NO_TRACED
473473
#define NO_TRACEI
474474

475+
// we use spi to emulate i2s
476+
#define PIN_I2S_BCK 13
477+
#define PIN_I2S_WS 10
478+
#define PIN_I2S_DATA_IN 12
479+
#define PIN_I2S_DATA_OUT 11
480+
#define PIN_I2S_MUTE -1
481+
482+
475483
#endif
476484

477485
//---- STM32 ------------

src/AudioTools/Buffers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ class SingleBuffer : public BaseBuffer<T> {
195195
bool isFull() { return availableForWrite() <= 0; }
196196

197197
T *address() { return buffer.data(); }
198+
T *data() { return buffer.data(); }
198199

199200
void reset() {
200201
current_read_pos = 0;

src/Experiments/AudioExperiments.h

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)