@@ -16,7 +16,7 @@ namespace audio_tools {
16
16
class AudioSource {
17
17
public:
18
18
// / Reset actual stream and move to root
19
- virtual void begin () = 0;
19
+ virtual bool begin () = 0;
20
20
21
21
// / Returns next audio stream
22
22
virtual Stream* nextStream (int offset) = 0;
@@ -90,9 +90,10 @@ class AudioSourceCallback : public AudioSource {
90
90
}
91
91
92
92
// / Reset actual stream and move to root
93
- virtual void begin () override {
93
+ virtual bool begin () override {
94
94
TRACED ();
95
95
if (onStartCallback != nullptr ) onStartCallback ();
96
+ return true ;
96
97
};
97
98
98
99
// / Returns next (with positive index) or previous stream (with negative
@@ -259,10 +260,11 @@ class AudioSourceVector : public AudioSource, public PathNamesRegistry {
259
260
: nameToStreamCallback(callback) {}
260
261
261
262
// / Reset actual stream and move to root
262
- virtual void begin () override {
263
+ bool begin () override {
263
264
TRACED ();
264
265
current_index = 0 ;
265
266
current_stream = nullptr ;
267
+ return true ;
266
268
}
267
269
268
270
// / Returns next audio stream
@@ -548,10 +550,11 @@ class AudioSourceArray : public AudioSource {
548
550
nameToStreamCallback(callback) {}
549
551
550
552
// / Reset actual stream and move to root
551
- virtual void begin () override {
553
+ virtual bool begin () override {
552
554
TRACED ();
553
555
current_index = 0 ;
554
556
current_stream = nullptr ;
557
+ return true ;
555
558
}
556
559
557
560
// / Returns next audio stream
0 commit comments