Results 1 to 3 of 3

Thread: read files and save the,

  1. #1
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy read files and save the,

    hi guys!
    Ive the following problem: with another programm i record voices and save them into a .wav file. now i want to read this wave file into a qstring , send the string to another pc(with udp-socket) and save the file there, but they haven't the same size and it isn't possible to play the new file. Is there any other possibility to send files over network, and why isn't the size of the new file the same of the old?
    thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: read files and save the,

    You need not use a QString for holding the file, better use a QByteArray, otherwise you can run into issues with encoding and locales. If you use UDP to transfer a file a package loss on the network will mean lost data. Use TCP if you need all packages to arrive.

  3. #3
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: read files and save the,

    i've tested to read the file and save again(without any other operations) but the product is the same, more or less size of the second file.

Similar Threads

  1. save animate to gif
    By Dmitry in forum Qt Programming
    Replies: 2
    Last Post: 16th February 2006, 16:35
  2. Where does VS save its inviornment vars?
    By high_flyer in forum Installation and Deployment
    Replies: 5
    Last Post: 4th February 2006, 10:10
  3. What does "Save All" actually save?
    By Mariane in forum Newbie
    Replies: 7
    Last Post: 31st January 2006, 13:23

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.