Author Topic: how to feed Bass_EncodeCastInit with ready encoded mp3 without using an encoder  (Read 435 times)


  • Posts: 44

I'd like to reatransmit an internet radio station.
For this I receive the stream via BASS_StreamCreateURL( .... @downloadproc....)
getting the unencoded mp3 frames in the downloadproc,
put them into a ram-buffer.  so far this is no problem.

I __dont__ want__ to decode the mp3-stream, feed sampledata into encoder and connect encoder to Bass_encode_CastInit, I'd rather like to feed the received mp3-frames into the

But I don't know how....

Thanks for any idea & help!!

Ian @ un4seen

  • Administrator
  • Posts: 25273
That should be possible by creating a PCM encoder (BASS_ENCODE_PCM) on a "dummy" stream (STREAMPROC_DUMMY), and then using BASS_Encode_Write to feed the pre-encoded data to it. An example code snippet can be found in the BASS_Encode_CastInit documentation.


  • Posts: 44
Thanks very much Ian, sounds good, I will try that