1 Attachment(s)
Can any One help me? - Socket Programming?
I want to trasmit raw audio captured from a DSP device using microphone over a network(LAN),
My front end is QT. I had already established a socket connection between server and client.
For that I used QServerSocket class at Server side and QSocket class at client side.
But I have done my audio capuring program in C language and I want to integrate it into QT.
While I am trying to transmit sound signals, I got some bad signals (some noise) at client side. But when I am trying to transfer some text through this socket using the same buffer I got it fine at client side.
Without GUI , my C program works well.
Can any one give any suggestion to resolve this pblm?
I have enclosed my project here...
Re: Can any One help me? - Socket Programming?
You can't use QTextStream, as it converts line endings, encodings, etc.
Use QSocket::writeBlock and/or QDataStream::writeRawBytes/readRawBytes.
I'd also advise to use UDP instead of TCP for audio transmission.
Re: Can any One help me? - Socket Programming?
Thank You !!!!
It works fine... when I use Rawbytes()
But now I got repeated sound signals...
It is because ,I had used one while loop inside the readClient().
Now I remove it ..
then I can't here any sound signals...
What will I do?
Re: Can any One help me? - Socket Programming?
Quote:
Originally Posted by vinod
What will I do?
post your code here
1 Attachment(s)
Re: Can any One help me? - Socket Programming?
Re: Can any One help me? - Socket Programming?
Hallo Vinod,
Is it real-time interface, It would be nice if you give little more information on your project as I also started similar project where I would like to transfer the text from server to client side in real-time
Thanks in advance,
Raviprasad
Re: Can any One help me? - Socket Programming?
Hi Vinod,
Im new to Qt TCP sockets programming. So i need to write a program for sockets in Qt to transfer packets of data.How it can be done, just by entering remote IP address, An connection should be established.I saw your RAF.zip code its very good to understand from basics, but i didnt get the program properly bcoz my application is different.I need to implement Qt GUI for it.My application is like i need to transfer data/commnads for some other DSP and FPGA boards. plz can you share with me, How it can be done.What are the things essential for programming.How to create GUI a simple chat window or to send some strings as commands. plz kindly assist me.
Thanks in Advance.