Results 1 to 7 of 7

Thread: Can any One help me? - Socket Programming?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default 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...
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default 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.

  3. #3
    Join Date
    Mar 2006
    Posts
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default 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?

  4. The following user says thank you to vinod for this useful post:

    siraansa (21st August 2006)

  5. #4
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Can any One help me? - Socket Programming?

    Quote Originally Posted by vinod
    What will I do?
    post your code here
    a life without programming is like an empty bottle

  6. #5
    Join Date
    Mar 2006
    Posts
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Can any One help me? - Socket Programming?

    Here is my project...
    Attached Files Attached Files

  7. #6
    Join Date
    Aug 2006
    Location
    Erlangen, Germany
    Posts
    2
    Thanks
    2
    Qt products
    Qt3
    Platforms
    Windows

    Default 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

  8. #7
    Join Date
    Sep 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Arrow 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.

Similar Threads

  1. Very strange socket programming problem
    By montylee in forum Qt Programming
    Replies: 5
    Last Post: 11th November 2008, 12:05
  2. Greenphone mini USB socket problem
    By izico in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 25th September 2007, 11:59
  3. Network Socket Programming
    By Walsi in forum Newbie
    Replies: 4
    Last Post: 19th June 2007, 10:04
  4. Socket Programming Port53 QTcpSocket/QUdpSocket
    By patrik08 in forum General Programming
    Replies: 5
    Last Post: 10th May 2007, 16:59
  5. Problems in socket programming
    By vinod in forum Qt Programming
    Replies: 1
    Last Post: 7th March 2006, 08:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.