yse-soundengine icon indicating copy to clipboard operation
yse-soundengine copied to clipboard

Sound artifacts on .NET Core 6 and x64 builds

Open TacoGuyAT opened this issue 2 years ago • 1 comments

Hi, I've trying to use YSE in my .NET Core project but there were no releases since 2018 (1.0.66). On .NET Framework sound works great, but on .NET Core it produces some strange artifacts. Pre-Built libraries are only x86 and though I've compiled x64 version of Yse.dll, native examples started to behave like my attempts at running YSE with .NET Core project. Maybe I've done something wrong while compiling it, but there's no instructions on how to do that, so can't really say much, especially since YSE C# demo project running on .NET Core 6 instead of .NET Framework using the nuget package (1.0.66) produces the same effect.

https://user-images.githubusercontent.com/35270005/184539667-3c0eb8e7-962f-4a9e-ac28-d5cc56ed4fbd.mp4

(Attached only x64 native video, since the result in .NET Core is exactly the same)

P. S.: Not really useful, but eh: YSElog.txt

TacoGuyAT avatar Aug 14 '22 13:08 TacoGuyAT

Yeah, there is a problem there. I noticed that too, last year. Thing is, although I keep telling myself I am going to fix this, a year has passed and I did not find the time to work on it. So I certainly cannot promise you now that I'll fix it soon.

It does not have anything to do with .NET core or framework. The actual audio processing happens in the dll, which is c++ code. It seems that the actual audio callbacks are taking way more time to calculate than they used to. This results in missed callbacks and jitter.

I thought it might be related to the Visual Studio version and compiler version used. I got as far as installing VS2017 again but that did not solve the problem. But maybe an even earlier version of VS could work, like VS2015 or 2012.

Another thing to look at are windows updates. Maybe there's something there. A few years back I started on another app which also uses PortAudio and it started having the same problem. But portaudio itself is pretty stable and other users aren't reporting a problem.

If I had more time I would contact the portaudio developers, but I am reluctant to do so because I know I don't have time to contribute with testing and such.

Suggestions are welcome.

yvanvds avatar Aug 15 '22 16:08 yvanvds