Replies: 8 comments 11 replies
-
Please download the most recent build from here, execute |
Beta Was this translation helpful? Give feedback.
-
Ok, 44.1 kHz is natively supported by your sound card in shared mode. By default, it should use int16 samples. Pls try float samples by specifying Also try to use exclusive mode with different sample rates, e.g.: |
Beta Was this translation helpful? Give feedback.
-
Chris,
I assume you are asking that we try adding the call to
timeBeginPeriod(1) before
creating the audio driver and timeEndPeriod(1) after deleting it in the
Miditzer?
Based on that request, is this blog post of any relevance:
https://randomascii.wordpress.com/2020/10/04/windows-timer-resolution-the-great-rule-change/
?
Thanks,
Jim Henry
…On Fri, Mar 12, 2021 at 10:28 AM Chris Xiong ***@***.***> wrote:
1. DirectSound always determines size of the primary buffer
automatically iirc, which means there would be additional mixing latency
(even the mixing stage doesn't do anything for fluidsynth's use case).
2. I'm less familiar with the MME API (WaveOut). But since Windows
Vista it became a wrapper of the new Windows Core Audio API. So I believe
there's also an additional buffering stage.
The additional buffering stage employed by the backends of these drivers
would result in higher latency, but does make them less prone to dropouts.
With that said, WASAPI in shared mode also have a fixed period size.
However the current implementation uses audio.period-size instead of the
value provided by the driver. I wonder whether that could be the problem.
I'll open a PR for this.
I'm not able to reproduce any audible dropouts in my Windows 10 VM even
with -z 256 -c 8. I do use a very basic soundfont (converted from gm.dls
that comes with Windows) and Windows' bundled MIDI files for testing
though, so take that with a grain of salt.
@jimhen3ry <https://github.com/jimhen3ry> If you have the chance, please
try inserting a call to timeBeginPeriod(1) before creating the audio
driver and timeEndPeriod(1) after deleting it (don't change any default
audio driver settings). Please let me know if that is effective.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#799 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHHXR645QEH3TCKEYS6RT3TDI6LLANCNFSM4Y7ORPSA>
.
|
Beta Was this translation helpful? Give feedback.
-
Understood. I'll let you know the results.
…On Fri, Mar 12, 2021 at 8:48 PM Chris Xiong ***@***.***> wrote:
No, I didn't mean making a permanent change in your application. I need to
find out whether it's an effective solution because my test environment
couldn't reproduce the dropouts. Just make a temporary change in your
testing environment. If it's effective I'll incorporate it in fluidsynth's
WASAPI driver.
The change is relatively simple. Your code may look like something like
this:
timeBeginPeriod(1);
adriver = new_fluid_audio_driver(settings, synth);
...delete_fluid_audio_driver(adriver);timeEndPeriod(1);
Add #include <windows.h> and any required platform detection code as
needed. Also link with -lwinmm (or add winmm.lib if you are using msvc).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#799 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHHXR6D42263CIKXJ2VCUTTDLG6BANCNFSM4Y7ORPSA>
.
|
Beta Was this translation helpful? Give feedback.
-
timeBeginPeriod(1) did not affect the dropouts. (Thank you for the detailed
instructions.) I am wondering if the following is preventing
timeBeginPeriod(1) from affecting FluidSynth:
Starting with Windows 10, version 2004, this function no longer affects
global timer resolution. For processes which call this function, Windows
uses the lowest value (that is, highest resolution) requested by any
process. For processes which have not called this function, Windows does
not guarantee a higher resolution than the default system resolution.
I am trying to identify a simple test case to demonstrate the issue so that
you can work with it directly and not have to rely on my reports.
…On Fri, Mar 12, 2021 at 8:48 PM Chris Xiong ***@***.***> wrote:
No, I didn't mean making a permanent change in your application. I need to
find out whether it's an effective solution because my test environment
couldn't reproduce the dropouts. Just make a temporary change in your
testing environment. If it's effective I'll incorporate it in fluidsynth's
WASAPI driver.
The change is relatively simple. Your code may look like something like
this:
timeBeginPeriod(1);
adriver = new_fluid_audio_driver(settings, synth);
...delete_fluid_audio_driver(adriver);timeEndPeriod(1);
Add #include <windows.h> and any required platform detection code as
needed. Also link with -lwinmm (or add winmm.lib if you are using msvc).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#799 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHHXR6D42263CIKXJ2VCUTTDLG6BANCNFSM4Y7ORPSA>
.
|
Beta Was this translation helpful? Give feedback.
-
I thought I had a test case for you but, as I was verifying it, the
dropouts vanished. I have retraced my steps and now I can't cause dropouts
with any of the things that reliably produced them before. Unless and until
the dropouts reappear, I don't think there is anything for you to do.
Thanks for your input.
…On Sat, Mar 13, 2021 at 11:36 AM Chris Xiong ***@***.***> wrote:
Well, I think that rules out timer resolution as the cause. (I don't think
the behavior change in 2004 will affect this conclusion. Microsoft's
documentation could be sometimes confusing.)
So far I cannot pinpoint the cause of the dropouts. A test case would be
very appreciated.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#799 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHHXRZ26AGRGBDC5GN2DHDTDOPANANCNFSM4Y7ORPSA>
.
|
Beta Was this translation helpful? Give feedback.
-
I experimented the same kind of problem using a Gigabyte motherboard which comes with a tool called EasySaver devoted to save CPU power consumption. Setting this tool off before using fluidsynth resolved all problems such as |
Beta Was this translation helpful? Give feedback.
-
Good to know you have figured out the solution. I've also noticed audio dropouts in Windows 10 (Not only in fluidsynth. Other applications, even DAWs using ASIO or WASAPI exclusive mode suffers from similar dropouts). In my case the dropout can usually be eliminated by sliding the "power mode" slider all the way to the max (it forces the CPU to run at the max possible frequency all the time). Energy management in Windows 10 is sometimes troublesome to deal with. Anyway I appreciate the feedback. Please keep testing the driver! |
Beta Was this translation helpful? Give feedback.
-
I am getting dropouts when using the new FluidSynth WASAPI audio driver in a 64 bit version of FluidSynth running on Windows 10 Home (lower track in the image below). I do not get dropouts when I use the PortAudio WASAPI audio driver (upper track):
Is anyone else experiencing this? Any ideas of what I might try to get a handle on the issue?
Beta Was this translation helpful? Give feedback.
All reactions