@@ -254,6 +254,8 @@ class AdapterAudioStreamToAudioOutput : public AudioOutputAdapter {
254
254
255
255
void setAudioInfo (AudioInfo info) override { p_stream->setAudioInfo (info); }
256
256
257
+ AudioInfo audioInfo () override { return p_stream->audioInfo (); }
258
+
257
259
size_t write (const uint8_t *data, size_t len) override {
258
260
return p_stream->write (data, len);
259
261
}
@@ -267,6 +269,8 @@ class AdapterAudioStreamToAudioOutput : public AudioOutputAdapter {
267
269
// / If true we need to release the related memory in the destructor
268
270
virtual bool isDeletable () { return true ; }
269
271
272
+ operator bool () { return *p_stream; }
273
+
270
274
protected:
271
275
AudioStream *p_stream = nullptr ;
272
276
};
@@ -284,13 +288,22 @@ class AdapterAudioOutputToAudioStream : public AudioStream {
284
288
void setOutput (AudioOutput &stream) { p_stream = &stream; }
285
289
286
290
void setAudioInfo (AudioInfo info) { p_stream->setAudioInfo (info); }
291
+
292
+ AudioInfo audioInfo () override { return p_stream->audioInfo (); }
293
+
287
294
size_t write (const uint8_t *data, size_t len) {
288
295
return p_stream->write (data, len);
289
296
}
290
297
298
+ bool begin () override { return p_stream->begin (); }
299
+
300
+ void end () override { p_stream->end (); }
301
+
291
302
// / If true we need to release the related memory in the destructor
292
303
virtual bool isDeletable () { return true ; }
293
304
305
+ operator bool () override { return *p_stream; }
306
+
294
307
protected:
295
308
AudioOutput *p_stream = nullptr ;
296
309
};
0 commit comments