Author Topic: Stream in MP3 over the network  (Read 925 times)

MaxPag

  • Posts: 34
Stream in MP3 over the network
« on: 26 Sep '10 - 20:14 »
Hello,

I wish I could send the audio through my LAN, but I'd like to encode the sound in MP3 or Ogg.

I looked at the source "VoiceChat", only the sound is not encoded.

I read that you could use "BASS_StreamCreateFileUser" but there is no concrete example or complete and I can not to use this feature.

Could you help on this subject, knowing that I am using the source "VoiceChat" to make this software.

Thank you in advance.

MaxPag

  • Posts: 34
Re: Stream in MP3 over the network
« Reply #1 on: 27 Sep '10 - 14:22 »
Hello,

Finally I am not longer based on the source VoiceChat. I have a few tried and I turned to "BASS_StreamCreateFileUser", only it returns me the error "BASS_ERROR_FILEFORM. I really do not know what to do to fix this problem.

It lacks the code to put in the FileProc, and I do not know what to do really.

Thanks in advance.
« Last Edit: 27 Sep '10 - 16:57 by MaxPag »

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: Stream in MP3 over the network
« Reply #2 on: 27 Sep '10 - 15:52 »
You can find an outline of what to do here...

   www.un4seen.com/forum/?topic=9412.msg65672#msg65672

That's using the STREAMFILE_BUFFERPUSH system. From your code, it looks like you could use the STREAMFILE_BUFFER system instead and place a "client2.Receive" call in your FileReadProc; if you have too much data (more than is requested by BASS), you would need to buffer the remainder for the next call.

MaxPag

  • Posts: 34
Re: Stream in MP3 over the network
« Reply #3 on: 27 Sep '10 - 15:56 »
Thank you for your reply, I keep looking. I contast coincidence that I had an error "fileform" the first click on the button and clicks as the following, I got a different sound each time about 1/2 seconds.

MaxPag

  • Posts: 34
Re: Stream in MP3 over the network
« Reply #4 on: 27 Sep '10 - 16:57 »
Problem solved, thanks for your help ;)