Author Topic: "BASS_ERROR_NOTAVAIL" in "BASS_ChannelGetData" for decode only on PB5  (Read 1399 times)

Oryaaaaa

  • Posts: 40
Hello

I have use for decoding BASS "M4A and FLAC". I do not use the flag of
 "BASS_DATA_AVAILABLE". When the file is decoded in the order of
 certain conditions, BASS returns an error of "BASS_ERROR_NOTAVAIL"
 in the process of "BASS_ChannelGetData".
"BASS_FLAC_StreamCreateFile" is successful. All files have been
 confirmed to be able to decode. I want to ask you a bug,
 or should I deal with in addition to what kind of processing.

Screen shot


Code: [Select]
Case "M4A", "AAC"
  If MusicFileCheck(Filename)
    chan = BASS_AAC_StreamCreateFile(#False, @Filename, 0, 0, #BASS_STREAM_DECODE | #BASS_SAMPLE_FLOAT)
    If chan=0
      chan = BASS_ALAC_StreamCreateFile(#False, @Filename, 0, 0, #BASS_STREAM_DECODE | #BASS_SAMPLE_FLOAT)
      If chan=0
        chan = BASS_MP4_StreamCreateFile(#False, @Filename, 0, 0, #BASS_STREAM_DECODE | #BASS_SAMPLE_FLOAT)
      EndIf
    EndIf
  EndIf
  
Case "FLAC"
  If MusicFileCheck(Filename)
    chan = BASS_FLAC_StreamCreateFile(#False, @Filename, 0, 0, #BASS_STREAM_DECODE | #BASS_SAMPLE_FLOAT)
  EndIf

Thanks
« Last Edit: 3 Jan '13 - 03:09 by Oryaaaaa »

Ian @ un4seen

  • Administrator
  • Posts: 20389
BASS_ChannelGetData should only result in a BASS_ERROR_NOTAVAIL error when BASS_DATA_AVAILABLE is used on a decoding channel. In your case, perhaps you are unwittingly using BASS_DATA_AVAILABLE? Note it is defined as 0, so requesting 0 bytes of data is the same as using BASS_DATA_AVAILABLE. To confirm whether that is what is happening, please check your BASS_ChannelGetData call's "length" parameter when the error occurs.

Oryaaaaa

  • Posts: 40
Thank you

I added next songs buffer more size, then clear bug.

Oryaaaaa

  • Posts: 40
Hello.. :o

Have changed the buffer length of Windows7,
 buffer length WindowsXP, the amount of Gets "BASS_ChannelGetData" in BASS.

I can not get the amount of this change me?
I want to optimize my source code.

Thank you
« Last Edit: 3 Jan '13 - 03:15 by Oryaaaaa »