Multiple AudioSourceStreams #1838
-
Hi all, How does one work with multiple AudioStreams, not necessarily in in parallel, but rather one after another and back ? Let's assume I want to have a welcome message played from a TTS source (MP3 Stream) and then switch to an URL Stream like an ICY source. Then if there are alerts back to a TTS source Stream. First off, do the different Stream Sources share the URLStream object (even if different format) ?
Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I suggest you read the Introduction Wiki, then you should be able to answer this yourself! |
Beta Was this translation helpful? Give feedback.
-
You can have multiple sources and sinks: You decide in the loop from which source you copy the data to what destination. If the audio info is changing you can just call destination.setAudioInfo(source.audioInfo()) to synchronize the sample rate, channels and bits per sample or you can let the StreamCopy do this job by calling copier.setSynchAudioInfo(true) in the setup. Finally, as a conclusion you stop, start resume the processing by just stopping or resuming to call copier.copy() or you can call copier.setActive(flag) with the flag true or false, to achieve the same thing. |
Beta Was this translation helpful? Give feedback.
I suggest you read the Introduction Wiki, then you should be able to answer this yourself!