diff --git a/README.md b/README.md index 5ef9fbf..c4af981 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,12 @@ Internally it uses [ActivateAudioInterfaceAsync](https://docs.microsoft.com/en-u ## Installation and Usage -1. Head over to the [Releases](https://github.com/bozbez/win-capture-audio/releases) page and download the latest installer (or zip if you are using a portable installation) -2. Run the setup wizard, selecting your OBS folder when asked (or extract the zip to the portable OBS root directory) +1. Head over to the [Releases](https://github.com/bozbez/win-capture-audio/releases/tag/v2.1.0-beta) page and download the latest installer (or zip if you are using a portable installation) +2. Run the setup wizard, selecting your root OBS folder (`obs-studio/`, _not_ `obs-studio/obs-plugins/`) when asked (or extract the zip to the portable OBS root directory) 3. Launch OBS and check out the newly available "Application Audio Output Capture" source + +## Troubleshooting + +- **Application Audio Output Capture source not showing up after install:** this means that either your OBS is out-of-date (check that it is at least 27.1.x) or you have installed the plugin to the wrong location. To re-install, first uninstall via "Add or remove programs" in the Windows settings, and then run the installer again. Make sure to select the top-level `obs-studio/` folder in (probably) `C:/Program Files/`. + +- **Application Audio Output Capture source not picking up any audio:** this happens when your Windows is too old and does not have support for the API. Note that even if you have a more recent major version such as `20H2` you will still need the latest updates for the plugin to work. If you are on a very old version you might need more than one update for this to work, and the second update might not show up for a few days after the first update. \ No newline at end of file diff --git a/data/locale/en-GB.ini b/data/locale/en-GB.ini index af40e99..77dec69 100644 --- a/data/locale/en-GB.ini +++ b/data/locale/en-GB.ini @@ -13,4 +13,4 @@ Window.Priority.Exe="Match title, otherwise find window of same executable" Hotkey.Start="Capture foreground window" Hotkey.Stop="Deactivate capture" -ExcludeProcessTree="Capture all audio EXCEPT the selected window" \ No newline at end of file +ExcludeProcessTree="Capture all audio EXCEPT the selected window (if the window exists)" \ No newline at end of file diff --git a/src/audio-capture.cpp b/src/audio-capture.cpp index c293bb0..bb93a8b 100644 --- a/src/audio-capture.cpp +++ b/src/audio-capture.cpp @@ -17,6 +17,7 @@ #include #include +#include "wil/result_macros.h" #include "window-helpers.h" #include "audio-capture.h" #include "obfuscate.h" @@ -77,8 +78,13 @@ static inline bool process_is_alive(DWORD pid) static void start_capture(audio_capture_context_t *ctx) { - ctx->helper.emplace(ctx->source, ctx->process_id, - !ctx->exclude_process_tree); + try { + ctx->helper.emplace(ctx->source, ctx->process_id, + !ctx->exclude_process_tree); + } catch (wil::ResultException e) { + error("failed to create helper... update Windows?"); + error("%s", e.what()); + } ctx->process = open_process(PROCESS_QUERY_INFORMATION | SYNCHRONIZE, false, ctx->process_id); @@ -89,7 +95,12 @@ static void start_capture(audio_capture_context_t *ctx) static void stop_capture(audio_capture_context_t *ctx) { - ctx->helper.reset(); + try { + ctx->helper.reset(); + } catch (wil::ResultException e) { + error("failed to destruct helper"); + error("%s", e.what()); + } } static void audio_capture_worker_recapture(audio_capture_context_t *ctx)