Author Topic: Store - bass/or Bass.Net broken RecordStart in Fall Creators Edition.  (Read 135 times)

cablehead

  • Posts: 315
Installed the latest Windows 10 (Fall Creators Edition)...and all preexisting recording code is broken (UWP).

            Bass.BASS_RecordInit(-1);
            var init = Bass.BASS_ErrorGetCode();
            Debug.WriteLine(init);

            var loopback = new BASS_RECORDINFO();
            Bass.BASS_RecordGetInfo(loopback);
            var error = Bass.BASS_ErrorGetCode();
           
            recProc = new RECORDPROC(RECPROC);
            Debug.WriteLine(loopback.freq);

            var recordHandle = Bass.BASS_RecordStart(loopback.freq, loopback.Channels,
            BASSFlag.BASS_SAMPLE_FLOAT, 50, recProc, IntPtr.Zero);
            error = Bass.BASS_ErrorGetCode();
            Debug.WriteLine(error); // Will always return BASS_ERROR_UNKNOWN.

EDIT: Just tried ManagedBass ( Not sure if it ever worked (UWP)...same result.
EDIT FIX: Not needed with older versions of Windows 10
 await Task.Run(() =>
                {
                    var recordHandle = Bass.BASS_RecordStart(loopback.freq, loopback.Channels, BASSFlag.BASS_SAMPLE_FLOAT, 30, null, IntPtr.Zero);
                });
« Last Edit: 22 Oct '17 - 15:53 by cablehead »

Ian @ un4seen

  • Administrator
  • Posts: 20431
Good to see that you have already found the solution. A BASS_ERROR_UNKNOWN error from BASS_RecordStart indicates that the device initialization failed for some unknown reason (not because it was busy). I will look into that, but if the solution is to make the call asynchronously then it looks like the device initialization needs to be done outside of the main thread now.