Commit graph

133 commits

Author SHA1 Message Date
Translation Updater 7c5560bf1b Update translations from Crowdin 2023-03-27 13:39:03 +00:00
PatTheMav 349372b3b3 cmake: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2023-03-26 18:20:38 -04:00
Translation Updater 783bd52197 Update translations from Crowdin 2023-01-08 04:10:37 +00:00
Translation Updater f065f20ce1 Update translations from Crowdin 2022-10-25 22:32:14 +00:00
jpark37 39183c76b5 win-wasapi: Fix Stop hang
Fix hang when audio capture is active in the background and stopped by
either closing OBS, or switching scene collections.
2022-10-01 10:36:08 -07:00
jpark37 cbb910a99c win-wasapi: Don't reconnect when inactive
Unnecessary reconnect attempts may cause noticeable hitches.
2022-10-01 07:06:56 -07:00
Translation Updater cc2d0791ca Update translations from Crowdin 2022-08-30 09:00:44 +00:00
Translation Updater 4aaa07f93d Update translations from Crowdin 2022-08-17 04:22:50 +00:00
shiina424 29574b7fd2 win-wasapi: Add missing locale text 2022-08-06 16:58:16 -07:00
jpark37 f7b58f6f6e win-wasapi: Don't log if reconnect fails 2022-07-31 21:45:37 -07:00
Translation Updater 81734be37c Update translations from Crowdin 2022-07-31 23:40:53 +00:00
jpark37 769a29bd1a win-wasapi: Add support for capturing a process
Use new process output API, and retrofit existing WASAPI abstractions.

Marked as "(BETA)" until we figure out the crackling at 60 minutes.
2022-07-23 17:41:34 -07:00
Richard Stanway c7e83518e1 win-wasapi: Log source name when showing device errors
Sometimes users have a forgotten source pointing to an invalid device,
which is very difficult to locate without us showing the source name.
2022-05-17 02:47:08 -07:00
PatTheMav 49e9d49943
plugins: Update CMakeLists.txt for included plugins 2022-03-16 23:11:08 +01:00
jpark37 2a991a4fa0 win-waspai: Tighten version check for RTWQ
Getting reports that it isn't working for 1607 and below.

If they continue, we should probably just pull the RTWQ path.
2022-03-13 06:07:39 -07:00
Richard Stanway 702df3cd8d win-wasapi: Fall back to old code if RTWQ fails
Fixes a crash if RTWQ is unavailable, e.g. if the mmcss service is not
running.
2022-02-24 19:28:19 -08:00
Matt Gajownik 02f80a1013 win-wasapi: Only enable work queue on Windows 10+
Fixes #5967
2022-02-19 15:37:50 -08:00
Translation Updater ac8dbf67be Update translations from Crowdin 2022-02-06 02:24:08 +00:00
Translation Updater 261345f9ef Update translations from Crowdin 2021-12-12 02:38:59 +00:00
jpark37 c8d0597358 win-wasapi: Log settings 2021-10-10 19:53:27 -07:00
jpark37 ab7d370ada win-wasapi Improve default device handling
Remove lastNotifyTime throttle. Could ignore last device notification.
Will bring back if necessary, but seemed like overkill.

Make isInputDevice const for safety.

Make isDefaultDevice atomic. Allows it to be accessed simultaneously
from settings and notification callback threads. Race between setting
change in OBS and Windows is not a problem, a signal will be sent after
both to consolidate. Worst that should happen is a redundant reconnect
cycle.

Only read/write default_id from notification callback for thread safety.
2021-10-10 19:53:27 -07:00
jpark37 24d82062ae win-wasapi: Schedule work on real-time work queue
MS claims it can schedule audio better if we use their API.
2021-10-10 19:53:27 -07:00
jpark37 d1230c292e win-wasapi: Register capture thread with MMCSS
Ensure audio gets more priority to help prevent glitching.
2021-10-10 19:53:27 -07:00
jpark37 a995c305b7 win-wasapi: Remove bools and persist threads
This simplifies synchronization, and fixes several races.
2021-10-10 19:53:27 -07:00
jpark37 a504691af8 win-wasapi: Clean reset on initialization failure
Do not store IAudioClient and IAudioCaptureClient onto the source object
until initialization is almost complete, right before the capture thread
is created. We don't to retain objects from failed attempts. Also clear
them when stopping.
2021-10-10 19:53:26 -07:00
jpark37 b166b0488b win-wasapi: Remove unnecessary inline tags 2021-10-10 19:53:26 -07:00
jpark37 49aa9074f8 win-wasapi: Remove undefined function InitName 2021-10-10 19:53:26 -07:00
jpark37 88164affae win-wasapi: Rename InitRender to ClearBuffer
We no longer persist the render client.
2021-10-10 19:53:26 -07:00
jpark37 5a2e884d14 win-wasapi: Simplify sample rate logging 2021-10-10 19:53:26 -07:00
jpark37 4503c4fdac win-wasapi: Remove persistent references
Only need IMMDevice and IAudioRenderClient during initialization.
2021-10-10 19:53:26 -07:00
jpark37 15f9d37aef win-wasapi: Persist objects beyond Start/Stop
Initialize IMMNotificationClient and IMMDeviceEnumerator in constructor
to simplify cleanup and initializaiton. Both can survive a reset.
2021-10-10 19:53:26 -07:00
jpark37 12442c3e57 win-wasapi: Make InitDevice throw to log errors 2021-10-10 19:53:26 -07:00
jpark37 8f33e01b84 win-wasapi: Fix incorrect log strings 2021-10-10 19:53:26 -07:00
jpark37 5f2d0456bc win-wasapi: Mark GetWASAPIAudioDevices_ as static 2021-10-10 19:53:26 -07:00
jpark37 8ce1bb645f win-wasapi: Remove monitor invalidation code
The previous monitor recovery logic touches the source monitoring type,
resets the monitor even if the output device hasn't been invalidated,
and was susceptible to races. Monitor invalidation should live within
the monitor abstraction.
2021-10-10 19:22:35 -07:00
Vainock 11a690b038 Update translations from Crowdin 2021-09-24 09:42:08 -07:00
Translation ef2b1eb1c6 Update translations from Crowdin 2021-06-11 07:18:15 -07:00
Gol-D-Ace 90df8d44df Update translations from Crowdin 2021-05-30 20:33:35 +02:00
jp9000 6cf22c54dc win-waspi: Make sure to unregister notification obj
Fixes a bug where the notify object existed after source deletion
2021-02-06 10:41:19 -08:00
jp9000 74e6448195 win-wasapi: Add default audio device change detection
Probably long time coming, but when the user changes their default audio
device in Windows sound settings, OBS will now detect it and change the
audio device automatically to the new device if it was set to use the
"Default" device.
2021-02-06 00:29:54 -08:00
Gol-D-Ace 7368a2c7cc Update translations from Crowdin 2020-12-14 00:29:44 +01:00
Gol-D-Ace 7ab98ca00f Update translations from Crowdin 2020-11-25 20:11:39 +01:00
Gol-D-Ace c66ebde080 Update translations from Crowdin 2020-09-27 23:07:27 +02:00
Jim 665180350d
Merge pull request #2657 from hselasky/improvement
libobs: Implement and use better scaling function for 64-bit integers
2020-05-21 18:07:53 -07:00
jp9000 7993179466 cmake: Add cmake folders 2020-05-13 06:52:37 -07:00
Colin Edwards 55e2985026
Merge pull request #1944 from WizardCM/windows-rc-definition
CMake: Build Windows modules with file descriptors
2020-04-18 18:27:22 -05:00
Hans Petter Selasky 0e4ea14ba1 libobs: Implement and use better scaling function for 64-bit integers
As os_gettime_ns() gets large the current scaling methods, mostly by casting
to uint64_t, may lead to numerical overflows. Sweep the code and use
util_mul_div64() where applicable.

Signed-off-by: Hans Petter Selasky <hps@selasky.org>
2020-04-05 20:27:28 +02:00
Richard Stanway 4563e03442 win-wasapi: Fix leaking IPropertyStore 2020-03-20 17:58:14 +01:00
Richard Stanway 21737d5f7a win-wasapi: Fix crash on certain devices
Not all devices return PKEY_AudioEngine_DeviceFormat properties.

Per MSDN, if the PROPERTYKEY referenced in key is not present in
the property store, this method returns S_OK and the vt member of
the structure pointed to by pv is set to VT_EMPTY.
2020-03-20 17:53:18 +01:00
Gol-D-Ace d74fc65047 Update translations from Crowdin 2020-03-16 20:14:50 +01:00