Skip to content

Commit 76d7ab2

Browse files
committed
A2DPStream begin returns bool
1 parent 30f36cc commit 76d7ab2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/AudioLibs/AudioA2DP.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ class A2DPStream : public AudioStream {
133133
}
134134

135135
/// Opens the processing
136-
void begin(A2DPConfig cfg){
136+
bool begin(A2DPConfig cfg){
137137
this->config = cfg;
138+
bool result = false;
138139
LOGI("Connecting to %s",cfg.name);
139140
if (a2dp_buffer==nullptr){
140141
a2dp_buffer = new RingBuffer<uint8_t>(cfg.bufferSize);
@@ -159,6 +160,7 @@ class A2DPStream : public AudioStream {
159160
LOGI("a2dp_source is connected...");
160161
notifyBaseInfo(44100);
161162
//is_a2dp_active = true;
163+
result = true;
162164
break;
163165

164166
case RX_MODE:
@@ -176,8 +178,11 @@ class A2DPStream : public AudioStream {
176178
}
177179
LOGI("a2dp_sink is connected...");
178180
is_a2dp_active = true;
181+
result = true;
179182
break;
180-
}
183+
}
184+
185+
return result;
181186
}
182187

183188
/// checks if we are connected

0 commit comments

Comments
 (0)