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

src/output: add algorithm for finding usable AudioFormat #1014

Conversation

ibmibmibm
Copy link
Contributor

  • Add ComWorker to run all COM relative function in same thread.
  • Add Interrupt interface.
  • Reopen device on error.
  • Use WinEvent for as a condition_variable without lock.

See #967

@MaxKellermann
Copy link
Member

Can you split this commit, so I can cherry-pick the fix for the stable branch?
I wouldn't like to merge such a huge commit with so many major possibly-breaking changes into the stable branch.

@ibmibmibm ibmibmibm force-pushed the feature/wasapi-report-format branch 2 times, most recently from d1855a2 to d74dd52 Compare December 4, 2020 07:36
@MaxKellermann
Copy link
Member

Sorry for letting you wait for so long, and thanks for putting so much work into splitting the PR.
I had difficulties with several of your commits because my GCC-mingw build doesn't have threading enabled; this works in GCC only through pthread emulation. Therefore, std::future/std::promise is unavailable, as well as std::mutex (which is why I've been carrying the using Mutex = CriticalSection around for so long).
I wish GCC had proper C++ standard library support for native Win32 threading... but all these years, that didn't happen.

I don't want to use pthread emulation for MPD/Windows builds, so I'll try to figure out how to do it without those C++ threading features.

And I'll try to backport the format detection code to the stable branch without the threading changes. This is the most important change here.

Meanwhile, I've cherry-picked a few trivial commits. It would be great if you could keep your PR branch rebased on my master branch.

* change `ComWorker` to use `Future` and `Promise`
@ibmibmibm
Copy link
Contributor Author

I've implemented std::future and std::promise for mingw32 without pthread.
The implements are inspired by microsoft stl

@MaxKellermann
Copy link
Member

Cherry-picked to v0.22 with some cleanups
da642b2

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.

None yet

2 participants