Author Topic: Query re. internal change to BASS_ChannelGetData  (Read 204 times)

Gazoo

  • Posts: 56
Hey BASS'ems,

A quick question re. a change in BASS. Previously this call would yield a usable value for a microphones available data:

Code: [Select]
BASS_ChannelGetData( HRECORD, 0, BASS_DATA_FLOAT | BASS_DATA_AVAILABLE );
I recently found this to now always yield 0, and I've swapped it out with the following working call:

Code: [Select]
BASS_ChannelGetData( HRECORD, 0, BASS_DATA_AVAILABLE );
I recognize that it doesn't make a ton of sense to add the BASS_DATA_FLOAT flag, as the returned value is the same regardless, but I'm just wondering if this change is intentional?

Cheers,

Gazoo

Chris

  • Posts: 1980
Re: Query re. internal change to BASS_ChannelGetData
« Reply #1 on: 21 Sep '21 - 14:42 »
See it in the Doc
When requesting sample data, the number of bytes written to buffer will be returned (not necessarily the same as the number of bytes read when using the BASS_DATA_FLOAT or BASS_DATA_FIXED flag). When using the BASS_DATA_AVAILABLE flag, the number of bytes in the channel's buffer is returned.

BASS_ChannelGetData( HRECORD, 0, BASS_DATA_FLOAT | BASS_DATA_AVAILABLE );
Your BASS_ChannelGetData Call is without a Buffer Deklaration 

Ian @ un4seen

  • Administrator
  • Posts: 23924
Re: Query re. internal change to BASS_ChannelGetData
« Reply #2 on: 21 Sep '21 - 15:24 »
This did indeed change in BASS 2.4.16, whereby the BASS_DATA_AVAILABLE option now needs to be used by itself without any other flags. BASS_ChannelGetData did previously accept BASS_DATA_FLOAT with it but that wasn't actually affecting the return value, ie. it was still returning the amount of data in its original format. It would probably be better if it did accept the BASS_DATA_FLOAT flag and adjusted the return value accordingly - I'll look into that for the next release.