S
Sathyaish
I am using MCI (winmm.dll) to read, record and playback sound. For
now, I am doing this with disk files instead of realtime doing it
straight from the memory. If I want to stream/relay/transmit this
sound (file) on a Windows socket (not using FTP but TCP), can I read
the file into a byte array? Because if it is possible then I can send
it on the socket but the problems I foresee are:
How will I repack it into the file. Will just reading back the byte
array into a file with the same extention work? I mean, say, I have a
..wav file and I read that into a byte array. Then I prefix some header
of my own containing the file name, the type and size etc. and send
this message on a socket, then at the other end, I read this header
and the following byte array and read it back into a file with the
same name and extention, will it be okay or it'll just be
gobbledegook?
How do they stream sound on the Internet otherwise?
now, I am doing this with disk files instead of realtime doing it
straight from the memory. If I want to stream/relay/transmit this
sound (file) on a Windows socket (not using FTP but TCP), can I read
the file into a byte array? Because if it is possible then I can send
it on the socket but the problems I foresee are:
How will I repack it into the file. Will just reading back the byte
array into a file with the same extention work? I mean, say, I have a
..wav file and I read that into a byte array. Then I prefix some header
of my own containing the file name, the type and size etc. and send
this message on a socket, then at the other end, I read this header
and the following byte array and read it back into a file with the
same name and extention, will it be okay or it'll just be
gobbledegook?
How do they stream sound on the Internet otherwise?