VCX. Barix audio streaming
The article describes how to write an application for Barix Annuncicom/Exstreamer/Instreamer device using the VCX library for Visual Studio (C#, Visual Basic .NET, Visual Basic 6.0 or Visual C++ 6.0).
Binary : sample_directstream.zip
Proper audio streaming to Barix Annuncicom (Exstreamer, Instreamer) requires the identical audio settings on the Annuncicom and your program sides. Make sure you have the same codec/bitrate selected in the program...
...and Annuncicom control panel (Encoding select):
Send audio to Barix Annuncicom
Use Stream to device control group in the demo program. Make sure that the network settings are correct: UDP/port/device IP in the program and UDP receiver port in the Annuncicom control panel:
Press the Talk and Stop buttons in the program to send/stop sending audio to your Barix Annuncicom device.
Receive audio from Barix Annuncicom
Use Listen to device control group in our demo. Make sure that the network settings are correct: TCP or UDP/port in the program and Streaming table (protocol/IP/port) in the Annuncicom control panel:
Press the Listen and Stop buttons in the program to receive/stop receiving audio from your Barix Annuncicom device.
PCM streaming problem
You may experience the byte-order problem with Barix Annuncicom device when you stream audio in PCM format. There is no problem with other codecs (aLwa, uLaw, MPEG) though, so the text below applies to the uncompressed format only.
In order to overcome this problem, you can use StreamByteOrderInput IpServer component property which let you always swap bytes, auto-detect the byte order once and swap bytes accordingly, or auto-detect the byte order and swap bytes constantly.
Try the "auto-detect once" option and then "auto-detect constantly" one.
1) Receive audio from Barix Annuncicom. Use the following component chain:
IpServer > Codec > WaveOut
IpServer receives audio stream, Codec decodes it, WaveOut plays back audio stream on your sound card.
2) Send audio to Barix Annuncicom. Use the following component chain:
WaveIn > Codec > IpClient
WaveIn records audio stream from your sound card, Codec encodes it, IpClient sends it to Barix Annuncicom.
3) Set IpServer.StreamingMode and IpClient.StreamingMode = RAW.
4) When you select a codec or change the sampling rate value, set the Codec.FormatTag and Codec.PcmSamplesPerSec values accordingly.
Codec.FormatTag = 1 if you stream in the PCM format (aLaw = 6, uLaw = 7, MPEG = 85).Read more about Barix support