Page 1 of 1

Bi-directional live audio

PostPosted: August 31st, 2005, 1:06 pm
by Magno
First of all, congratulations Kambiz for the WaveAudio components! :D

Well, I am trying to make a very simple 2-way comunicator and my question is if I need use a technique that has both the Broadcaster & Client within the application or they can handle bi-directional audio streamming? I say that because in this case I will need to use 2 tcp ports.

Other question is if I can send it by UDP?

Thank you a lot and best regards,

Magno

PostPosted: August 31st, 2005, 7:28 pm
by Magno
in advance with this thread, in what could help changing the buffercount of the component LiveAudioPlayer and LiveAudioRecoder?

PostPosted: August 31st, 2005, 11:20 pm
by Kambiz
Hi,

You can include both sending and recieving of audio in one application.

Also, you can choose any data trabsfer protocol, which matches better with your target.

Reducing BufferLength and increasing BufferCount produces less delay on the client side.

Cheers

PostPosted: September 1st, 2005, 12:52 pm
by Magno
Hi Kambiz, thank you for helping :)

Well, I actually did it, but now seems something stranger, I get a echo effect and the sample rate that is reproduced in one side look likes out of format, the voice is accelarated :lol: hehehehe... any clue?

What could be the best techinique:

1. use 2 TCP TSocket, one TClient and other TServer, wasting 2 socket ports
2. use the concept of client server with only one TServer in a side application and a TClient in the client application and send all the audio via only one socket port

Cheers!

PostPosted: September 1st, 2005, 2:40 pm
by Kambiz
For sure, you have to filter recorded data by an echo cancellation algorithm in both parties.

Don't worry about taking two ports. :)

PostPosted: September 1st, 2005, 5:07 pm
by Magno
Hi again.

I modified the code, now using only one socket port but there's something wrong... when I connect I start to listen a high noise, like a non tunned radio, a hiss. The code envolved a lot of modifications due I am using only one TCP componet for each side. What could cause that hiss sound?

All these communicatiors uses such filters Kambiz? as Skype, ie.?

PostPosted: September 2nd, 2005, 7:53 pm
by Magno
Well, for some reason I simply can use one tcp socket :(

Has 2 applications, one with TSocketClient and other with TSocketServer, in both application the TLiveAudioPlayer and TLiveAudioRecorder. On the client application i can receive the sound, in the server i cannot. The problem is because for some reason, after receive (in the server side) the Audio Format header it dont call the OnFormat().

Something suggests me the problem could be in the Data := self, i tried a lot of things but not working. Right now the applications dont handshake the 'READY' string, so after the client call the server it sends his audio format in the ClientAccept, just as the demo, and after it sets the Socket.Data := self.

I really dont know the components is able to work using only one Socket port.

Please, any clue? :cry:

PostPosted: September 3rd, 2005, 6:52 am
by Kambiz
I'm sorry, but I can't help. I don't know so much about sockets.