Skip to content

Commit c01be15

Browse files
committed
RP2040
1 parent b4b0ec4 commit c01be15

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/AudioConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ typedef uint32_t eps32_i2s_sample_rate_type;
225225
//----------------
226226
#if defined(ARDUINO_ARCH_RP2040)
227227
//#define USE_ESP8266_AUDIO
228-
#define USE_I2S 1
228+
//#define USE_I2S 1
229229
#define USE_PWM
230230

231231
#define PWM_START_PIN 6

src/AudioExperiments/I2SBitBangRP2040.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#ifdef ARDUINO_ARCH_RP2040
3+
#if defined(ARDUINO_ARCH_RP2040)
44
#include "AudioConfig.h"
55
#ifdef USE_I2S
66
#include "AudioExperiments/I2SBitBang.h"

src/AudioI2S/I2SRP2040.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#ifdef ARDUINO_ARCH_RP2040
3+
#if defined(ARDUINO_ARCH_RP2040)
44
#include "AudioI2S/I2SConfig.h"
55
#include "AudioExperiments/I2SBitBangRP2040.h"
66
#include <I2S.h>

src/AudioPWM/PWMAudioBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class PWMAudioStreamBase : public AudioPrint, public AudioBaseInfoDependent {
324324

325325
/// determines the next scaled value
326326
virtual int nextValue() {
327-
int result;
327+
int result = 0;
328328
switch(audio_config.bits_per_sample ){
329329
case 8: {
330330
int16_t value = buffer->read();

src/AudioTools/AudioCopy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class StreamCopyT {
118118
// callback with unconverted data
119119
if (onWrite!=nullptr) onWrite(onWriteObj, buffer, result);
120120
#ifndef COPY_LOG_OFF
121-
LOGI("StreamCopy::copy %zu -> %zu -> %zu bytes - in %zu hops", bytes_to_read, bytes_read, result, delayCount);
121+
LOGI("StreamCopy::copy %u -> %u -> %u bytes - in %u hops", (unsigned int)bytes_to_read,(unsigned int) bytes_read, (unsigned int)result, (unsigned int)delayCount);
122122
#endif
123123
} else {
124124
// give the processor some time
@@ -157,7 +157,7 @@ class StreamCopyT {
157157
}
158158
result = write(samples * sizeof(T)*2, delayCount);
159159
#ifndef COPY_LOG_OFF
160-
LOGI("StreamCopy::copy %zu -> %zu bytes - in %d hops", bytes_to_read, result, delayCount);
160+
LOGI("StreamCopy::copy %u -> %u bytes - in %d hops", (unsigned int)bytes_to_read, (unsigned int)result, delayCount);
161161
#endif
162162
} else {
163163
delay(delay_on_no_data);
@@ -313,7 +313,7 @@ class StreamCopy : public StreamCopyT<uint8_t> {
313313
coverter_ptr->convert((T(*)[2])buffer, result / (sizeof(T)*2) );
314314
write(result, delayCount);
315315
#ifndef COPY_LOG_OFF
316-
LOGI("StreamCopy::copy %zu bytes - in %zu hops", result, delayCount);
316+
LOGI("StreamCopy::copy %u bytes - in %u hops", (unsigned int)result,(unsigned int) delayCount);
317317
#endif
318318
} else {
319319
// give the processor some time

0 commit comments

Comments
 (0)