karaoke-dev / osu-framework-microphone

Unofficial support for using microphone as a input device.
MIT License
5 stars 1 forks source link

got index out of range exception in osx #43

Open andy840119 opened 3 years ago

andy840119 commented 3 years ago

Here's the log:

[runtime] 2021-04-21 13:18:34 [error]: An unhandled error has occurred.
[runtime] 2021-04-21 13:18:34 [error]: System.IndexOutOfRangeException: Index was outside the bounds of the array.
[runtime] 2021-04-21 13:18:34 [error]: at NWaves.Features.Pitch.FromYin(Single[] signal, Int32 samplingRate, Int32 startPos, Int32 endPos, Single low, Single high, Single cmdfThreshold)
[runtime] 2021-04-21 13:18:34 [error]: at osu.Framework.Input.Handlers.Microphone.OsuTKMicrophoneHandler.procedure(Int32 handle, IntPtr buffer, Int32 length, IntPtr user)
Unhandled exception.Unhandled exception.  System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at NWaves.Features.Pitch.FromYin(Single[] signal, Int32 samplingRate, Int32 startPos, Int32 endPos, Single low, Single high, Single cmdfThreshold)
   at osu.Framework.Input.Handlers.Microphone.OsuTKMicrophoneHandler.procedure(Int32 handle, IntPtr buffer, Int32 length, IntPtr user)
--- End of stack trace from previous location ---
   at osu.Framework.Platform.GameHost.<>c__DisplayClass103_0.<abortExecutionFromException>b__0()
   at osu.Framework.Threading.ScheduledDelegate.RunTaskInternal()
   at osu.Framework.Threading.Scheduler.Update()
   at osu.Framework.Threading.GameThread.ProcessFrame()
   at osu.Framework.Platform.ThreadRunner.RunMainLoop()
   at osu.Framework.Platform.GameHost.windowUpdate()
   at osu.Framework.Platform.SDL2DesktopWindow.Run()
   at osu.Framework.Platform.GameHost.Run(Game game)
   at osu.Game.Rulesets.Karaoke.Tests.VisualTestRunner.Main(String[] args) in /Volumes/Data/Github/karaoke-dev/karaoke/osu.Game.Rulesets.Karaoke.Tests/VisualTestRunner.cs:line 18System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at NWaves.Features.Pitch.FromYin(Single[] signal, Int32 samplingRate, Int32 startPos, Int32 endPos, Single low, Single high, Single cmdfThreshold)
   at osu.Framework.Input.Handlers.Microphone.OsuTKMicrophoneHandler.procedure(Int32 handle, IntPtr buffer, Int32 length, IntPtr user)
--- End of stack trace from previous location ---
   at osu.Framework.Platform.GameHost.<>c__DisplayClass103_0.<abortExecutionFromException>b__0()
   at osu.Framework.Threading.ScheduledDelegate.RunTaskInternal()
   at osu.Framework.Threading.Scheduler.Update()
   at osu.Framework.Threading.GameThread.ProcessFrame()
   at osu.Framework.Platform.ThreadRunner.RunMainLoop()
   at osu.Framework.Platform.GameHost.windowUpdate()
   at osu.Framework.Platform.SDL2DesktopWindow.Run()
   at osu.Framework.Platform.GameHost.Run(Game game)
   at osu.Game.Rulesets.Karaoke.Tests.VisualTestRunner.Mai
n(String[] args) in /Volumes/Data/Github/karaoke-dev/karaoke/osu.Game.Rulesets.Karaoke.Tests/VisualTestRunner.cs:line 18

Need to check about that.

andy840119 commented 3 years ago

Highlight : NWaves.Features.Pitch.FromYi

andy840119 commented 3 years ago

Maybe run this project in osx then try again. update : not run smoothly in osx. Also got no idea why led in camera not lighting.

andy840119 commented 3 years ago

https://www.nuget.org/packages/ManagedBass/ maybe should upgrade manageBass to 3.0.0 wait for osu-framework to update that then try again.

andy840119 commented 3 years ago

Not really sure only caused in big sur. Need to tested in older version.