Author Topic: BASS_Encode_IsActive returns 0  (Read 131 times)

axisdj

  • Posts: 59
BASS_Encode_IsActive returns 0
« on: 23 Aug '24 - 16:49 »
Hello,

I am using BASS_Encode_IsActive to confirm I am connected to an IceCast Stream service. Occationally BASS_Encode_IsActive returns 0

When this occurs I call BASS_ErrorGetCode() which returns 0

I also check BASS_ENCODE_COUNT_CAST and  BASS_ENCODE_COUNT_OUT which generally returns a pretty high ratio 1 to 1 or 99.9

Any ideas of how to get a better understanding of why  BASS_Encode_IsActive returns 0

In this case I attempt to reconnect to stream server, which works, but I would like to understand why this occurs.

thanks

Ian @ un4seen

  • Administrator
  • Posts: 26078
Re: BASS_Encode_IsActive returns 0
« Reply #1 on: 23 Aug '24 - 17:42 »
You can use BASS_Encode_SetNotify to request a callback when the encoder dies, which will also give you a reason for it. Please see the documentation for details.

axisdj

  • Posts: 59
Re: BASS_Encode_IsActive returns 0
« Reply #2 on: 30 Aug '24 - 14:27 »
the notify triggers error 2 BASS_ENCODE_NOTIFY_CAST

Is that a stream server issue?

Ian @ un4seen

  • Administrator
  • Posts: 26078
Re: BASS_Encode_IsActive returns 0
« Reply #3 on: 30 Aug '24 - 14:59 »
That means the connection with the Icecast server was lost. It could be a server issue, or just the internet connection between you and the server.

axisdj

  • Posts: 59
Re: BASS_Encode_IsActive returns 0
« Reply #4 on: 30 Aug '24 - 17:01 »
thank you Ian, hope you are well.