Author Topic: "BASS_Encode_MP3_StartFile" fails: Error 33  (Read 402 times)

kafffee

  • Posts: 151
Hi :-)

I am trying to rip an mp3 file from CD and encounter error 33 (Couldnt create the file) on BASS_Encode_MP3_StartFile in this code:

Code: [Select]
BassEnc_Mp3.BASS_Encode_MP3_GetVersion()
Debug.WriteLine("GetVersion: " & CStr(Bass.BASS_ErrorGetCode))
BassEnc_Mp3.BASS_Encode_MP3_StartFile(stream, EncodingParameter, AddOn.Enc.BASSEncode.BASS_UNICODE, FileName)
Debug.WriteLine("StartFile: " & CStr(Bass.BASS_ErrorGetCode))
Dim encBuffer(35000) As Byte
While Bass.BASS_ChannelIsActive(stream) = CInt(BASSActive.BASS_ACTIVE_PLAYING)
Dim Len As Integer = Bass.BASS_ChannelGetData(stream, encBuffer, 35000)
End While
BassEnc.BASS_Encode_Stop(stream)
Debug.WriteLine("Stop: " & CStr(Bass.BASS_ErrorGetCode))

FileName seems to be okay. Is there anything I am doing wrong?

Ian @ un4seen

  • Administrator
  • Posts: 24786
Re: "BASS_Encode_MP3_StartFile" fails: Error 33
« Reply #1 on: 7 Nov '22 - 12:19 »
From the error code, it sounds like the problem is in the filename parameter. Are you sure it's valid, eg. the directory exists and your app has permission to write there?

kafffee

  • Posts: 151
Re: "BASS_Encode_MP3_StartFile" fails: Error 33
« Reply #2 on: 8 Nov '22 - 17:09 »
Restarted my computer and it works :-)