Skip to content

Commit 98575f8

Browse files
committed
Compile warnings
1 parent 8fabff6 commit 98575f8

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

src/AudioEffects/AudioEffects.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#pragma once
2-
#if __cplusplus >= 201703L
3-
# include <variant>
4-
#endif
52
#include "AudioBasic/Collections.h"
63
#include "AudioEffects/SoundGenerator.h"
74
#include "AudioEffects/AudioEffect.h"
85
#include "AudioTools/AudioStreams.h"
6+
#if __cplusplus >= 201703L
7+
# include <variant>
8+
#endif
99

1010
/**
1111
* @defgroup effects Effects
@@ -350,7 +350,7 @@ class AudioEffectStreamT : public AudioStream {
350350
void addEffect(AudioEffect *effect){
351351
TRACED();
352352
effects.addEffect(effect);
353-
LOGI("addEffect -> Number of effects: %d", size());
353+
LOGI("addEffect -> Number of effects: %d", (int) size());
354354
}
355355

356356
/// deletes all defined effects

src/AudioTimer/AudioTimerESP8266.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace audio_tools {
88

9-
typedef void (* repeating_timer_callback_t )(void* obj);
9+
typedef void (*repeating_timer_callback_t )(void* obj);
1010

1111
class TimerAlarmRepeatingDriverESP8266;
1212
TimerAlarmRepeatingDriverESP8266 *self;
@@ -42,7 +42,7 @@ class TimerAlarmRepeatingDriverESP8266 : public TimerAlarmRepeatingDriverBase {
4242
break;
4343
}
4444

45-
ticker.attach<void*>(timeUs / 1000000, callback_f, this);
45+
ticker.attach_ms(timeUs / 1000, callback_f, (void*)this);
4646

4747
return true;
4848
}

src/AudioTools/AudioStreams.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@
2222
#else
2323
# define STREAM_WRITE_OVERRIDE
2424
#endif
25-
25+
26+
#ifdef ARDUINO
27+
# define STREAM_READ_OVERRIDE
28+
#else
29+
# define STREAM_READ_OVERRIDE override
30+
#endif
31+
2632
namespace audio_tools {
2733

2834
/**
@@ -55,7 +61,7 @@ class AudioStream : public Stream, public AudioBaseInfoDependent, public AudioBa
5561
p_notify = &bi;
5662
}
5763

58-
virtual size_t readBytes(uint8_t *buffer, size_t length) { return not_supported(0); }
64+
virtual size_t readBytes(uint8_t *buffer, size_t length) STREAM_READ_OVERRIDE { return not_supported(0); }
5965

6066
virtual size_t write(const uint8_t *buffer, size_t size) override{ return not_supported(0); }
6167

0 commit comments

Comments
 (0)