Board index » cppbuilder » TIdTCPServer / TIdTCP Client and audio streaming

TIdTCPServer / TIdTCP Client and audio streaming


2005-10-28 08:16:39 AM
cppbuilder73
Hi all,
I'm trying to send an MP3 file from a TIdTCPServer to a TIdTCPClient while
it playing.
Could somebody help me?
The final goal is to hear the sound remotely from the client of an MP3
stored on the server while the file is transferring.
Thanks for any kind of help.
Lapo
 
 

Re:TIdTCPServer / TIdTCP Client and audio streaming

Lapo Guidi wrote:
Quote
I'm trying to send an MP3 file from a TIdTCPServer to a TIdTCPClient
while it playing.
Could somebody help me?
Have you already written the code to transfer the file ?
Jonathan
 

Re:TIdTCPServer / TIdTCP Client and audio streaming

Not yet completely.
After the client request it, the server send a Stream to the client.
The client receive the Stream.
When the Stream terminated to transfer, the mp3 is played, but this is not
what I need, I would hear the mp3 playing while download the stream like
Media player or similar do.
Have you some tips?
Lapo
 

{smallsort}

Re:TIdTCPServer / TIdTCP Client and audio streaming

"Lapo Guidi" < XXXX@XXXXX.COM >wrote in message
Quote
When the Stream terminated to transfer, the mp3 is played,
but this is not what I need, I would hear the mp3 playing
while download the stream like Media player or similar do.
You have to send the MP3 data in small chunks, such as with
Read/WriteBuffer(), and then pass each chunk to the audio system as soon as
it arrives.
Gambit
 

Re:TIdTCPServer / TIdTCP Client and audio streaming

Thanks Remy for the answer.
I supposed to have to do that and I'm trying to write this.
But what about the "audio system" as you called it?
Thanks again for the help
Lapo
 

Re:TIdTCPServer / TIdTCP Client and audio streaming

"Lapo Guidi" < XXXX@XXXXX.COM >wrote in message
Quote
But what about the "audio system" as you called it?
Working with the audio system is beyond the scope of this newsgroup. It has
nothing to do with socket programming. Please read the Win32 API Multimedia
documentation for working with audio, and then direct any questions about it
to the "borland.public.cppbuilder.multimedia" or
"borland.public.cppbuilder.nativeapi" newsgroup.
Gambit
 

Re:TIdTCPServer / TIdTCP Client and audio streaming

Okay, thanks
Lapo