Author Topic: BASS_ERROR_UNKNOW - windows 8 x64 (.Net)  (Read 7057 times)

fstarred

  • Posts: 106
BASS_ERROR_UNKNOW - windows 8 x64 (.Net)
« on: 13 Feb '13 - 18:37 »
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
« Last Edit: 13 Feb '13 - 18:43 by zenon »

Ian @ un4seen

  • Administrator
  • Posts: 26177
Re: BASS_ERROR_UNKNOW - windows 8 x64 (.Net)
« Reply #1 on: 14 Feb '13 - 15:46 »
Please show the relevant code and which call is resulting in the BASS_ERROR_UNKNOWN error.

fstarred

  • Posts: 106
Re: BASS_ERROR_UNKNOW - windows 8 x64 (.Net)
« Reply #2 on: 14 Feb '13 - 23:01 »
I have built a simple test case for this:

Code: [Select]

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

  • Administrator
  • Posts: 26177
Re: BASS_ERROR_UNKNOW - windows 8 x64 (.Net)
« Reply #3 on: 15 Feb '13 - 18:04 »
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

  • Posts: 106
Re: BASS_ERROR_UNKNOW - windows 8 x64 (.Net)
« Reply #4 on: 19 Feb '13 - 16:42 »
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 :(
« Last Edit: 19 Feb '13 - 19:21 by zenon »

fstarred

  • Posts: 106
Re: BASS_ERROR_UNKNOW - windows 8 x64 (.Net)
« Reply #5 on: 26 Feb '13 - 08:46 »
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

  • Administrator
  • Posts: 26177
Re: BASS_ERROR_UNKNOW - windows 8 x64 (.Net)
« Reply #6 on: 26 Feb '13 - 14:41 »
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?

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 :)

fstarred

  • Posts: 106
Re: BASS_ERROR_UNKNOW - windows 8 x64 (.Net)
« Reply #7 on: 26 Feb '13 - 16:50 »
Great! Thank you for the answer  :)