PDA

View Full Version : read files and save the,



kernel_panic
3rd January 2007, 14:39
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:confused:

e8johan
3rd January 2007, 15:06
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.

kernel_panic
4th January 2007, 07:31
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.