out_input must be filled by the consumer node. Fixes a bug when getting a wrong connection info

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5579 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2003-12-05 09:13:41 +00:00
parent 37e1ff91ea
commit bde7e6208e

View File

@ -324,7 +324,7 @@ AudioMixer::Connected(const media_source &producer, const media_destination &whe
const media_format &with_format, media_input *out_input)
{
// a BBufferProducer is connection to our BBufferConsumer
// incoming connections should always have an incoming ID=0,
// and the port number must match our ControlPort()
if (where.id != 0 || where.port != ControlPort())
@ -340,6 +340,9 @@ AudioMixer::Connected(const media_source &producer, const media_destination &whe
// if the input has no name, assign one
if (strlen(out_input->name) == 0)
sprintf(out_input->name, "Input %ld", out_input->destination.id);
out_input->node = Node();
out_input->source = producer;
out_input->format = with_format;
// add a new input to the mixer engine
MixerInput *input;
@ -354,7 +357,7 @@ AudioMixer::Connected(const media_source &producer, const media_destination &whe
// But we have no special buffer requirements anyway...
UpdateParameterWeb();
return B_OK;
}