Skip to content

Commit 7b48253

Browse files
committed
FormatConverterStream provide begin()
1 parent 2208cc0 commit 7b48253

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/AudioTools/AudioStreamsConverter.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,11 +752,16 @@ class FormatConverterStream : public ReformatBaseStream {
752752
return begin(from);
753753
}
754754

755+
/// Starts the processing: call setAudioInfoOut before to define the target
755756
bool begin(AudioInfo from) {
756-
TRACED();
757-
is_output_notify = false;
758757
setAudioInfo(from);
758+
return begin();
759+
}
759760

761+
/// (Re-)Starts the processing: call setAudioInfo and setAudioInfoOut before
762+
bool begin() override {
763+
TRACED();
764+
is_output_notify = false;
760765
// build output chain
761766
if (getStream() != nullptr) {
762767
sampleRateConverter.setStream(*getStream());

0 commit comments

Comments
 (0)