Skip to content

Commit a54b1bb

Browse files
committed
AudioSource: support setAutoNext(bool)
1 parent 494c127 commit a54b1bb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/AudioTools/Disk/AudioSource.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ class AudioSource {
6060
virtual void setTimeout(int millisec) {};
6161

6262
/// Returns default setting go to the next
63-
virtual bool isAutoNext() { return true; }
63+
virtual bool isAutoNext() { return is_auto_next; }
64+
65+
// Prevent automatic move to the next stream
66+
virtual void setAutoNext(bool flag) { is_auto_next = flag; }
6467

6568
/// access with array syntax
6669
Stream* operator[](int idx) { return setIndex(idx); }
@@ -70,6 +73,7 @@ class AudioSource {
7073

7174
protected:
7275
int timeout_auto_next_value = 500;
76+
bool is_auto_next = true;
7377
};
7478

7579
/**

0 commit comments

Comments
 (0)