Commit Graph
14 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 3656fb46e2 Windows: Capture the microphone through WASAPI instead of Media Foundation
Windows now uses the same host interface as SDL and iOS: sceUsbMic sends
startRecording/stopRecording/deviceChanged, and drains buffered input on
the CPU thread with pollRecording. A capture thread asks WASAPI for mono
16-bit at the game's rate (it converts from the mix format, so no more
ffmpeg resampling), and copies packets into a lock-free ring buffer.
It reopens the device when the selection changes, and retries once a
second if the device is missing or gets unplugged.

The device list comes from the active capture endpoints. Their friendly
names are the ones Media Foundation reported, so existing MicDevice
settings still match. An empty setting, now selectable as Auto like on
SDL, means the default capture device.

The Media Foundation audio capture code is removed; the camera still
uses it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 18:28:33 +02:00
Henrik Rydgård d2c2ee337e Remove the mfplat.dll hard dependency (now dynamic). 2026-05-11 16:09:22 +02:00
oltolm 5c1412f84d use ComPtr for misc. things 2025-01-17 18:06:24 +01:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Unknown W. Brackets f44852bb18 Global: Cleanup virtual/override specifiers.
Also missing virtual destructors, hidden non-overrides, etc.
2022-12-10 21:13:36 -08:00
Unknown W. Brackets a1b9eb3cc5 Windows: Prevent some virtual dtor warnings. 2021-02-15 11:59:45 -08:00
Unknown W. Brackets c66d5dcac1 Windows: Prevent hang on shutdown.
Which may occur on ARM64 or perhaps lower thread processors?  Let's avoid
spinloops.
2021-01-02 22:49:06 -08:00
shenweip aac4cbb1dc Changes the way of reading microphone data.
Feeds the microphone buffer continuously(Windows) and overwrites old data with new data when the buffer has no remaining space.
2020-11-22 01:17:25 +08:00
Henrik Rydgård a24e2e6946 Minor cleanups in CaptureDevice 2020-09-12 12:30:44 +02:00
shenweip c7e2eba231 Add basic Microphone support on Windows. 2020-07-31 10:24:17 +08:00
Henrik Rydgård 310e1e4f18 Fix capitalization of mfreadwrite.h include 2020-03-10 15:20:13 +01:00
Florin9doi 58b04ef77b QT Api for Camera (Linux/macOS)
Allow the use of different resolutions (win/android/iOS)
2020-02-10 08:47:55 +02:00
shenweip 3f585782f1 Don't shut down camera when exiting games,also re-enumerating devices if
received WM_DEVICECHANGE.
2020-01-24 16:05:28 +08:00
shenweip 034a257baf Add camera support for windows. 2020-01-13 15:06:02 +08:00