Combining MultiStreamingDecoder and InputMixer? #2137
-
I currently have a signal flow like this working great:
(using the MultiStreamingDecoder copier to drive the computation) But I'd like to add another sound source and swap the VolumeStream for a mixer like this:
My new stream setup looks like this (only showing the structure here to keep it simple):
with copiers like this:
This doesn't look right to me (and causes panics when a URL loads) so I think I'm misunderstanding something fundamental. Is there a way to do this with only 1 copier? Since the InputMixer's inputs aren't explicitly named streams, how can I tell FormatConverterStream to wrap a specific input of InputMixer? Or do I need a queue in between? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 15 replies
-
You can only read from an InputMixer: so you should rather use the OutputMixer! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the thorough explanation. I'm getting closer! I'm implementing the OutputMixer technique you described.
or sometimes simply
Certainly 0 bytes in the buffer is bad. But which buffer and how to set it? Or is it really just a symptom of something else? If it's not obvious, I can post a simplified code example later today. Thanks for all your help so far. |
Beta Was this translation helpful? Give feedback.
-
Wow, I was just pouring over the class docs for BufferedStream and CallbackStream, and I was about to ask for help with writing the callback function. I refreshed this discussion and found that you answered my question before I even asked. I can't thank you enough! |
Beta Was this translation helpful? Give feedback.
-
One more complication. In my application I need to keep the white noise running during the loading of a new URLstream (there are several URLs for the user to choose). The url.begin process blocks while the the connection happens, so I moved it into a task. Now I've confirmed that the loop (including copier) keeps running during the url loading, but the noise falls silent anyway. |
Beta Was this translation helpful? Give feedback.
You can only read from an InputMixer: so you should rather use the OutputMixer!
Alternatively you can write to a Queue and use this a source to the InputMixer.