BASS_ERROR_UNKNOW - windows 8 x64 (.Net)

Started by fstarred,

fstarred

I receive a BASS_ERROR_UNKNOW when I try to Play a tempo channel.

This does not happen if I change Platform to x86.

I have download all latest x64 files, and as the title , I'm running under windows 8 x64.

EDIT
This happens to x86 too. Seems that old libraries did works better

Ian @ un4seen

Please show the relevant code and which call is resulting in the BASS_ERROR_UNKNOWN error.

fstarred

I have built a simple test case for this:


static void Main(string[] args)
        {
            InitBass();

            string location = @"E:\Music\Artist\xxx.mp3";

            int handle = 0;

            handle = Bass.BASS_StreamCreateFile(location, 0L, 0L, BASSFlag.BASS_STREAM_DECODE);

            if (handle != Bass.FALSE)
            {
                int tempo = BassFx.BASS_FX_TempoCreate(handle, BASSFlag.BASS_DEFAULT);

                Console.WriteLine(tempo);

                bool play = Bass.BASS_ChannelPlay(tempo, true);

                BASSError error = Bass.BASS_ErrorGetCode();
            }

            Console.WriteLine(handle + " " + error);

            Console.ReadKey();

        }


        private static bool IsWindowsOS()
        {
            switch (Environment.OSVersion.Platform)
            {
                case PlatformID.Win32NT:
                case PlatformID.Win32S:
                case PlatformID.Win32Windows:
                    return true;
                default:
                    return false;
            }
        }

        private static void InitBass()
        {
            string targetPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            if (Utils.Is64Bit)
                targetPath = Path.Combine(targetPath, "lib/x64");
            else
                targetPath = Path.Combine(targetPath, "lib/x86");

            if (IsWindowsOS())
            {
                bool isBassLoad = Bass.LoadMe(targetPath);
                bool isBassFxLoad = BassFx.LoadMe(targetPath);
            }

            bool isBassInit = Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
        }


All the init goes well, tempo handle return a non zero value but fails to play.
This does not happens with the simple handle.
So, the problem stays in the fx plugin.

I had no problem with windows 7, this happens on win8

Ian @ un4seen

That's strange. Does the problem not happen if you remove the tempo stream and play the file directly, ie. after removing the BASS_STREAM_DECODE flag from the BASS_StreamCreateFile call and playing the returned stream handle? What about if you set the BASS_ChannelPlay call's "restart" parameter to false rather than true?

fstarred

#4
Ian, you saw it right, put restart = false play stream correctly.

Some other hints:
- Plugging the handle into a mixer play it well
- It does happen on Win7 too

Can you investigate on this?
In the meanwhile I'll use an older bassfx.

PS
So I open another sub-thread:
Would not be a bad idea to keep a repository of all BASS libraries with old versions ?

Thank you

EDIT
Event with new version I 've got this issues :(

fstarred

Ian, don't know if you have  read my previous post, so I summarize the bassfx issues:

- restart = true return a BASS_ERROR_UNKNOW code (any system)
- on win8, ONLY on debug, I receive a read / write memory error that cause application to hang up.

Ian @ un4seen

Quote from: zenonIan, you saw it right, put restart = false play stream correctly.

Some other hints:
- Plugging the handle into a mixer play it well
- It does happen on Win7 too

Can you investigate on this?

I think I see the cause of that now. I'll check with Arthur for the next BASS_FX update, which I believe is coming soon :)