Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WAVEOUT] Dynamic alloc of WAVEHDR #873

Merged
merged 1 commit into from
May 3, 2021
Merged

[WAVEOUT] Dynamic alloc of WAVEHDR #873

merged 1 commit into from
May 3, 2021

Conversation

carlo-bramini
Copy link
Contributor

It seems that the addition of multichannel output has broken the WaveOut driver.
If you try to run FluidSynth with -a waveout, you will get this message:

fluidsynth: audio.periods 8 exceeds internal limit 4

Actually, the default value for period is set to 8, so it will never work unless you change that value before opening the driver. Rather than lowering the default period value or rising the limit of the number of buffers, in my opinion it would be better to free the driver from this limitation, by allocating the needed amount of memory for WAVEHDR too.
Attached patch fixes this bug.

It seems that the addition of multichannel output has broken the WaveOut driver.
If you try to run FluidSynth with -a waveout, you will get this message:

fluidsynth: audio.periods 8 exceeds internal limit 4

Actually, the default value for period is set to 8, so it will never work unless you change that value before opening the driver. Rather than lowering the default period value or rising the limit of the number of buffers, in my opinion it would be better to free the driver from this limitation, by allocating the needed amount of memory for WAVEHDR too.
Attached patch fixes this bug.
@sonarcloud
Copy link

sonarcloud bot commented May 3, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@jjceresa
Copy link
Collaborator

jjceresa commented May 3, 2021

in my opinion it would be better to free the driver from this limitation, by allocating the needed amount of memory for WAVEHDR too.

Thanks Carlo, Indeed, it is better.

Copy link
Member

@derselbst derselbst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@derselbst derselbst merged commit f88f27c into FluidSynth:master May 3, 2021
@carlo-bramini carlo-bramini deleted the fix_waveout branch June 7, 2021 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants