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

Update fluid_dsound.c #435

Merged
merged 3 commits into from
Sep 29, 2018
Merged

Update fluid_dsound.c #435

merged 3 commits into from
Sep 29, 2018

Conversation

carlo-bramini
Copy link
Contributor

I did some quick improvements to DirectSound driver:

  • fluid_dsound_audio_run() and fluid_win32_error() are now static functions.

  • WAVEFORMATEX is not required by DirectSound during the playback. We do not need it anymore after calling ::SetFormat(), so allocating this structure dynamically inside driver structure is useless.

  • Implemented support for float sample type.

  • Uses an event object for handling the end of thread, it allows to combine the quit event with the later wait in milliseconds in a single block.

  • Calculates the amount of milliseconds to sleep rather than sleeping always for one millisecond.

  • Fix an error into a FLUID_LOG() call.

  • Fix handle leak of the thread, now it is correctly closed with CloseHandle().

  • ExitThread() is a nonsense in that position, since the thread is already exiting.

@derselbst
Copy link
Member

derselbst commented Sep 28, 2018 via email

It's better to include that, in case of NOGDI macro added somewhere,
@carlo-bramini
Copy link
Contributor Author

I'm using it right now, it seems to be fine.

@derselbst
Copy link
Member

Ok, thanks!

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.

2 participants