20 bool setActive(
bool active) {
return active ? play() : stop(); }
23 if (
p_out ==
nullptr)
return false;
26 OSCData msg{data,
sizeof(data)};
36 if (
p_out ==
nullptr)
return false;
38 OSCData msg{data,
sizeof(data)};
48 bool next(
int offset = 1) {
49 if (
p_out ==
nullptr)
return false;
51 OSCData msg{data,
sizeof(data)};
55 msg.write((int32_t)offset);
60 bool previous(
int offset = 1) {
61 if (
p_out ==
nullptr)
return false;
63 OSCData msg{data,
sizeof(data)};
67 msg.write((int32_t)offset);
73 bool setIndex(
int idx) {
74 if (
p_out ==
nullptr)
return false;
76 OSCData msg{data,
sizeof(data)};
80 msg.write((int32_t)idx);
86 bool setPath(
const char *path) {
87 if (
p_out ==
nullptr)
return false;
88 uint8_t data[strlen(path) + 20];
89 OSCData msg{data,
sizeof(data)};
98 bool setVolume(
float volume) {
99 if (
p_out ==
nullptr)
return false;
101 OSCData msg{data,
sizeof(data)};
125 setAudioPlayer(player);
131 bool processInputMessage(
Stream &in) {
135 size_t len = in.
readBytes(data,
sizeof(data));
147 LOGE(
"RCAudioPlayerOSCReceiver: player is null");
#define LOGE(...)
Definition AudioLoggerIDF.h:30
virtual size_t write(const uint8_t *data, size_t len)
Definition Arduino.h:120
virtual size_t readBytes(uint8_t *data, size_t len)
Definition Arduino.h:140
void stop()
stops any further processing by spinning in an endless loop
Definition AudioRuntime.h:71