Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
connecting a TALSpeexDecompressor output to a TALAudioMixer input at runtime
08-21-2014, 08:49 AM (This post was last modified: 08-22-2014 03:25 AM by fisherman.)
Post: #1
connecting a TALSpeexDecompressor output to a TALAudioMixer input at runtime
What do I have to do to connect a TALSpeexDecompressor output pin to a TALAudioMixer input pin in code?

I can successfully connect a TALWavePlayer output pin to a TALAudioMixer input pin in code.

playerWave.OutputPin.Connect(mixer.InputPins[0]);

Connecting a TALAudioMixer output pin to a TALAudioOut input pin works also.

mixer.OutputPin.Connect(audioOut.InputPin);

But I am trying the whole day now to connect a TALSpeexDecompressor output pin to a TALAudioMixer input pin in code. But there is no signal. Please note: There is a channel and an input in the mixer available for connecting. Connecting the same two components visually at design time works fine, so the audio format settings should be fine.
Find all posts by this user
Quote this message in a reply
08-22-2014, 06:50 PM
Post: #2
RE: connecting a TALSpeexDecompressor output to a TALAudioMixer input at runtime
Hi! Sometimes it helps to disable a component before connecting it to another. Perhaps worth a try. Untested.

Regards,
Dave
Quote this message in a reply
08-22-2014, 10:36 PM
Post: #3
RE: connecting a TALSpeexDecompressor output to a TALAudioMixer input at runtime
(08-22-2014 06:50 PM)Dave Wrote:  Hi! Sometimes it helps to disable a component before connecting it to another. Perhaps worth a try. Untested.

Regards,
Dave

Hi Dave,

yes, that worked. I stumbled over this solution when I set the filename property at runtime, not in the property editor. In combination with the setting to restart the player on new file, it worked, because this implicitly stops and starts the player.

Now for the next step (this was not the real issue, just the simplest possible description Wink
The Speex compressed packets are sent via an udp client / server. On the server they are decompressed and routed to a dynamically created / assigned mixer channel and input pin. I am using TSLGenericFilters on the client and server to transmit the bytes via UDP. I have all this working, except that the server's Generic Filter OnProcessData event is never called, though the bytes arrive correctly in the UDP server. (When I connect the decompressor and mixer at design time, again everything works) But now I can not restart the wave player because I am on a server and the wave file is played on the client. The mixer has a Stop method, but no Start. The decompressor does not have any Enabled / Stop / Start methods. So to get this solved we need an understanding what the Stop/Start command in the wave player does, to create the same functionality on the server side in the decompressor and/or mixer components.
Find all posts by this user
Quote this message in a reply
08-23-2014, 08:02 PM
Post: #4
RE: connecting a TALSpeexDecompressor output to a TALAudioMixer input at runtime
I think the overall problem here is flowcontrol, 3 commands for communication might not be sufficient. I created something similar once but with video. It worked and played but as soon as the data somehow got corrupted (also UDP connection) it would never start again. Perhaps a second connection would be a solution which handles the flowcontrol.

If you can't get this working properly you can contact mr. Boian himself at mitov@mivov.com.

Regards,
Dave
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)