Skip to content

Commit 538095f

Browse files
committed
TimeStream: support Stream and Print in constructor
1 parent 611144b commit 538095f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/AudioTools/CoreAudio/AudioIO.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,19 @@ class TimedStream : public ModifyingStream {
449449
setStartSec(startSeconds);
450450
setEndSec(endSeconds);
451451
}
452+
453+
TimedStream(Stream &io, long startSeconds = 0, long endSeconds = -1) {
454+
p_stream = &io;
455+
p_print = &io;
456+
setStartSec(startSeconds);
457+
setEndSec(endSeconds);
458+
}
459+
460+
TimedStream(Print &o, long startSeconds = 0, long endSeconds = -1) {
461+
p_print = &o;
462+
setStartSec(startSeconds);
463+
setEndSec(endSeconds);
464+
}
452465

453466
/// Defines the start time in seconds. The audio before the start time will be
454467
/// skipped

0 commit comments

Comments
 (0)