PDA

View Full Version : Can any One help me? - Socket Programming?



vinod
7th March 2006, 07:40
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...

wysota
7th March 2006, 10:16
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.

vinod
8th March 2006, 09:16
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?

zlatko
8th March 2006, 09:21
What will I do?
post your code here

vinod
8th March 2006, 10:04
Here is my project...

siraansa
21st August 2006, 14:15
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

Rajeshsan
18th November 2009, 09:46
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.