Skip to content

Commit 2276cf4

Browse files
committed
Compile warnings
1 parent 5f23a37 commit 2276cf4

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

src/AudioBasic/Int24.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class int24_t {
4343
set((int32_t)in);
4444
}
4545

46-
#if defined(STM32) || defined(ESP32C3) || defined(TARGET_RP2040) || !defined(ARDUINO)
46+
#if defined(STM32) || defined(ESP32C3) || defined(TARGET_RP2040) || defined(AUDIOKIT_USE_IDF)
4747

4848
int24_t(const int &in) {
4949
set(in);

src/AudioCodecs/AudioEncoded.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ class AudioDecoder : public AudioWriter, public AudioInfoSource {
4343
setNotifyAudioChange(out_stream);
4444
}
4545

46-
virtual void setOutputStream(Print &out_stream) {
46+
virtual void setOutputStream(Print &out_stream) override {
4747
p_print = &out_stream;
4848
}
4949
// Th decoding result is PCM data
5050
virtual bool isResultPCM() { return true;}
5151

5252
/// Registers an object that is notified if the audio format is changing
53-
void setNotifyAudioChange(AudioInfoDependent &notify){ p_notify = &notify;}
53+
void setNotifyAudioChange(AudioInfoDependent &notify) override { p_notify = &notify;}
5454

5555
protected:
5656
Print *p_print=nullptr;
@@ -508,7 +508,7 @@ class EncodedAudioStream : public EncodedAudioPrint {
508508
}
509509

510510
size_t readBytes(uint8_t *buffer, size_t length) override {
511-
LOGD("EncodedAudioStream::readBytes: %d", length);
511+
LOGD("EncodedAudioStream::readBytes: %d", (int)length);
512512
if (p_stream==nullptr) {
513513
TRACEE();
514514
return 0;

src/AudioCodecs/CodecBase64.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class DecoderBase64 : public AudioDecoder {
9292
static const int B64index[256];
9393

9494
void decodeLine(uint8_t *data, size_t byteCount) {
95-
LOGD("decode: %d", byteCount);
95+
LOGD("decode: %d", (int)byteCount);
9696
int len = byteCount;
9797

9898
unsigned char *p = (unsigned char *)data;
@@ -222,7 +222,7 @@ class EncoderBase64 : public AudioEncoder {
222222

223223
/// Writes PCM data to be encoded as RAW
224224
virtual size_t write(const void *binary, size_t len) override {
225-
LOGD("EncoderBase64::write: %d",len);
225+
LOGD("EncoderBase64::write: %d", (int)len);
226226
uint8_t *data = (uint8_t *)binary;
227227

228228
switch (newline_logic) {
@@ -272,7 +272,7 @@ class EncoderBase64 : public AudioEncoder {
272272
}
273273

274274
void encodeLine(uint8_t *data, size_t input_length) {
275-
LOGD("EncoderBase64::encodeLine: %d",input_length);
275+
LOGD("EncoderBase64::encodeLine: %d", (int)input_length);
276276
int output_length = 4 * ((input_length + 2) / 3);
277277
if (ret.size() < output_length + 1) {
278278
ret.resize(output_length + 1);

src/AudioTools/AudioStreams.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,11 +1455,11 @@ class CallbackStream : public AudioStream {
14551455
return begin();
14561456
}
14571457

1458-
virtual bool begin() {
1458+
virtual bool begin() override {
14591459
active = true;
14601460
return true;
14611461
}
1462-
void end() { active = false;}
1462+
void end() override { active = false;}
14631463

14641464
size_t readBytes(uint8_t* data, size_t len) override {
14651465
if (!active) return 0;

src/AudioTools/AudioStreamsConverter.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class ChannelFormatConverterStream : public ReformatBaseStream {
137137
}
138138

139139
virtual size_t write(const uint8_t *data, size_t size) override {
140-
LOGD("ChannelFormatConverterStream::write: %d", size);
140+
LOGD("ChannelFormatConverterStream::write: %d", (int)size);
141141
switch (bits_per_sample) {
142142
case 8:
143143
return getConverter<int8_t>()->write(data, size);
@@ -153,7 +153,7 @@ class ChannelFormatConverterStream : public ReformatBaseStream {
153153
}
154154

155155
size_t readBytes(uint8_t *data, size_t size) override {
156-
LOGD("ChannelFormatConverterStream::readBytes: %d", size);
156+
LOGD("ChannelFormatConverterStream::readBytes: %d", (int)size);
157157
switch (bits_per_sample) {
158158
case 8:
159159
return getConverter<int8_t>()->readBytes(data, size);
@@ -276,7 +276,7 @@ class NumberFormatConverterStreamT : public ReformatBaseStream {
276276
NumberFormatConverterStreamT(Print &print) { setStream(print); }
277277

278278
bool begin() override {
279-
LOGI("begin %d -> %d bits", sizeof(TFrom), sizeof(TTo));
279+
LOGI("begin %d -> %d bits", (int) sizeof(TFrom),(int) sizeof(TTo));
280280
return true;
281281
}
282282

@@ -306,7 +306,7 @@ class NumberFormatConverterStreamT : public ReformatBaseStream {
306306
}
307307

308308
size_t readBytes(uint8_t *data, size_t size) override {
309-
LOGD("NumberFormatConverterStreamT::readBytes: %d", size);
309+
LOGD("NumberFormatConverterStreamT::readBytes: %d", (int)size);
310310
if (p_stream == nullptr) return 0;
311311
size_t samples = size / sizeof(TTo);
312312
TTo *data_target = (TTo *)data;
@@ -359,7 +359,7 @@ class NumberFormatConverterStream : public ReformatBaseStream {
359359
NumberFormatConverterStream(Stream &stream) { setStream(stream); }
360360
NumberFormatConverterStream(Print &print) { setStream(print); }
361361

362-
void setAudioInfo (AudioInfo info) {
362+
void setAudioInfo (AudioInfo info) override {
363363
this->from_bit_per_samples = info.sample_rate;
364364
AudioStream::setAudioInfo(info);
365365
}
@@ -405,7 +405,7 @@ class NumberFormatConverterStream : public ReformatBaseStream {
405405
}
406406

407407
virtual size_t write(const uint8_t *data, size_t size) override {
408-
LOGD("NumberFormatConverterStream::write: %d", size);
408+
LOGD("NumberFormatConverterStream::write: %d", (int) size);
409409
if (from_bit_per_samples == to_bit_per_samples) {
410410
return p_print->write(data, size);
411411
}
@@ -429,7 +429,7 @@ class NumberFormatConverterStream : public ReformatBaseStream {
429429
}
430430

431431
size_t readBytes(uint8_t *data, size_t size) override {
432-
LOGD("NumberFormatConverterStream::readBytes: %d", size);
432+
LOGD("NumberFormatConverterStream::readBytes: %d", (int)size);
433433
if (from_bit_per_samples == to_bit_per_samples) {
434434
return p_stream->readBytes(data, size);
435435
}
@@ -644,7 +644,7 @@ class FormatConverterStream : public ReformatBaseStream {
644644
}
645645

646646
virtual size_t write(const uint8_t *data, size_t size) override {
647-
LOGD("FormatConverterStream::write: %d", size);
647+
LOGD("FormatConverterStream::write: %d", (int)size);
648648
return channelFormatConverter.write(data, size);
649649
}
650650

src/AudioTools/ResampleStream.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TransformationReader {
3636
}
3737

3838
size_t readBytes(uint8_t *data, size_t byteCount) {
39-
LOGD("TransformationReader::readBytes: %d", byteCount);
39+
LOGD("TransformationReader::readBytes: %d", (int)byteCount);
4040
if (!active) {
4141
LOGE("inactive");
4242
return 0;
@@ -71,7 +71,7 @@ class TransformationReader {
7171
int availableForWrite() override { return max_len; }
7272

7373
size_t write(const uint8_t *data, size_t byteCount) override {
74-
LOGD("AdapterPrintToArray::write: %d (%d)", byteCount, pos);
74+
LOGD("AdapterPrintToArray::write: %d (%d)", (int) byteCount, (int) pos);
7575
if (pos + byteCount > max_len) return 0;
7676
memcpy(p_data + pos, data, byteCount);
7777

@@ -147,7 +147,7 @@ class ReformatBaseStream : public AudioStream {
147147
virtual Stream *getStream() { return p_stream; }
148148

149149
size_t readBytes(uint8_t *data, size_t size) override {
150-
LOGD("ReformatBaseStream::readBytes: %d", size);
150+
LOGD("ReformatBaseStream::readBytes: %d", (int)size);
151151
return reader.readBytes(data, size);
152152
}
153153

@@ -276,7 +276,7 @@ class ResampleStream : public ReformatBaseStream {
276276
// int availableForWrite() override { return p_print->availableForWrite(); }
277277

278278
size_t write(const uint8_t *buffer, size_t bytes) override {
279-
LOGD("ResampleStream::write: %d", bytes);
279+
LOGD("ResampleStream::write: %d", (int)bytes);
280280
size_t written;
281281
switch (info.bits_per_sample) {
282282
case 16:

0 commit comments

Comments
 (0)