Author Topic: problems with encoded push stream  (Read 108 times)

tongub

  • Posts: 102
problems with encoded push stream
« on: 25 Sep '21 - 10:39 »
Hi,

I have a push stream that looks like this

Code: [Select]
    this->pushStream = BASS_StreamCreate(44100, 2, BASS_STREAM_DECODE, STREAMPROC_PUSH, 0);
    BASS_Encode_Start(this->source, "program.exe - -", 0, EncodeProc, &this->pushStream);

or for lame testing

Code: [Select]
    this->pushStream = BASS_StreamCreate(44100, 2, BASS_STREAM_DECODE, STREAMPROC_PUSH, 0);
    BASS_Encode_Start(this->source, "lame.exe -r --decode -s 44100 - -", 0, EncodeProc, &this->pushStream);

I push the output of an encoder (soundprocessing, but I have also tested lame/decode) and I want to get a stream from it that I can play without problems or add to another mixer. The only problem is that I can't play the push stream, but I can send it to another encoder or to icecast without any problems.

Ian @ un4seen

  • Administrator
  • Posts: 23924
Re: problems with encoded push stream
« Reply #1 on: 27 Sep '21 - 12:41 »
When you say you "can't play the push stream" do you mean a call is failing, and if so, what call is it and what is the error code? If it just isn't sounding right, what is the format of the output from the encoder? BASS_StreamCreate will only work properly with PCM sample data. You would need to use BASS_StreamCreateFileUser instead if it's encoded data (eg. MP3 from LAME).