How to send audio data being recorded to a ShoutCAST server

Started by Mark25, July 29, 2017, 10:52:06 AM

Previous topic - Next topic

Mark25

Hi,

I need to send audio data being recorded to a ShoutCAST server while the recording session is still in progress: the Audio Sound Recorder for .NET doesn't give this possibility so I was wondering if there is a way I could use to reach my goal.

Regards

Mark

Administrator

Hello,

this specific feature can be achieved by using the "Audio DJ Studio for .NET" component, which can be used as a source for various kinds of casting servers, in conjunction with the "Audio Sound Recorder for .NET" component.

The first thing to do is to create, through the "Audio DJ Studio for .NET" component, a custom "Stream mixer" and to attach to this mixer a "player": the tutorial "How to use custom Stream Mixers"  http://www.multimediasoft.com/adjstudnet/help/adjstudnet_000075.htm shows how to do this step through the StreamMixerCreate method and the StreamMixerPlayerAdd method.

At this point we could play, through the Audio DJ Studio component, audio data being currently recorded: this can be done through the PlaySoundFromRecorderEx method of the Audio DJ Studio component. Details about playing audio data recorded through the "Audio Sound Recorder for .NET" component can be found inside the tutorial "How to load and play sounds recorded by Audio Sound Recorder for .NET" http://www.multimediasoft.com/adjstudnet/help/adjstudnet_00012c.htm
It's important to note that, by default, this method will also play audio data being recorded through the local speakers directly: in case you shouldn't need this feature, you could disable direct playback by setting to -1 the "nOutput" parameter of the mentioned StreamMixerCreate method

At this point the custom stream mixer will start receiving audio data from the recorder component so we can now use the output of the stream mixer as a source for sending audio data to the casting server; the tutorial "How to use the control as a source for streaming servers like SHOUTcast" http://www.multimediasoft.com/adjstudnet/help/adjstudnet_000076.htm shows how to connect and start sending audio data to the casting server.

The "Audio Sound Suite for .NET" collection of components
http://www.multimediasoft.com/asostnet,
which allows installing both components through one convenient single setup package, comes with a set of supplementary samples which show how our audio components can interact together inside the same application: the "StreamMixer" sample, available in both C# and VB flavours, shows how to connect an input channel to a stream mixer whose output can be sent to a casting server.

Hope this helps

Kind Regards

Severino Delaurenti
MultiMedia Soft

Mark25

Hi,

thanks for your guidelines.

Can your custom stream mixer be used to mix and send audio data incoming from multiple input channels to the casting server? If yes, how?

Regards

Mark

Administrator

Hello,,

you are welcome.
Yes, this is possible: the only difference from the previously described procedure, is the fact that you need to add an instance of the Audio Sound Recorder component for each input channel you want to record from and, through Audio DJ Studio, you need to instance a dedicated "player" for each instance of the recorder and, finally, to attach each player to the custom stream mixer: the mixer will mix any audio stream of attached players before sending mixed audio data to the casting server.

Kind Regards

Severino Delaurenti
MultiMedia Soft