Author Topic: Can't open stream BASS_ERROR_FILEOPEN  (Read 106 times)

HardRock

  • Posts: 17
Can't open stream BASS_ERROR_FILEOPEN
« on: 15 Jun '17 - 17:14 »
Hi, I am using c# BASS.NET library, version 2.4.12.5, version of bass.dll is 2.4.12.

I am trying to open flac file and in result I have this error "BASS_ERROR_FILEOPEN".

Code: [Select]
return Bass.BASS_StreamCreateFile(pathToAudioFile, 0, 0, flags);
File can be too big, because it is whole album (375 mb), is there a way to open this file by parts, song by song for example?
I have .cue file near by, so I know at what time each song is started.

Just saw that I can set "long offset" and "long length" as a parameters, I think this can help, but I don't know how to convert file length in seconds from .cue file to "long offset" and "long length" parameters.

Can someone please help me with an example ?

Ian @ un4seen

  • Administrator
  • Posts: 20210
Re: Can't open stream BASS_ERROR_FILEOPEN
« Reply #1 on: 15 Jun '17 - 17:29 »
A BASS_ERROR_FILEOPEN error means the file couldn't be opened, and it won't be related to the file's size. Usually it's because the file doesn't exist, or if the BASS_UNICODE flag isn't used when it should be (that won't be the problem when using BASS.Net though), but it could also be a permissions issue. Are you sure the path (pathToAudioFile) is correct? Can you play the file with the pre-compiled PLUGINS.EXE example included in the BASS package? (C\BIN folder)

HardRock

  • Posts: 17
Re: Can't open stream BASS_ERROR_FILEOPEN
« Reply #2 on: 15 Jun '17 - 17:39 »
A BASS_ERROR_FILEOPEN error means the file couldn't be opened, and it won't be related to the file's size. Usually it's because the file doesn't exist, or if the BASS_UNICODE flag isn't used when it should be (that won't be the problem when using BASS.Net though), but it could also be a permissions issue. Are you sure the path (pathToAudioFile) is correct? Can you play the file with the pre-compiled PLUGINS.EXE example included in the BASS package? (C\BIN folder)

It's a shame, but it's really was wrong file path, I thought I had double check it, but no :)
Thank you :)