diff options
author | Matthew Gregan <[email protected]> | 2021-07-20 09:18:40 +1200 |
---|---|---|
committer | Matthew Gregan <[email protected]> | 2021-07-20 09:18:40 +1200 |
commit | b608f590249d5821c91b3ea83e394f0fd839f5b9 (patch) | |
tree | 708baac4318005bf7f4d44fea9f3655ebf2c7d09 | |
parent | b2f60c983df34f8cac0e061ef32da531c6d82536 (diff) | |
download | cubeb-b608f590249d5821c91b3ea83e394f0fd839f5b9.tar.gz cubeb-b608f590249d5821c91b3ea83e394f0fd839f5b9.zip |
wasapi: Don't set AUDCLNT_STREAMFLAGS_NOPERSIST on IAudioClient (<3) streams. Closes #643.
-rw-r--r-- | include/cubeb/cubeb.h | 5 | ||||
-rw-r--r-- | src/cubeb_wasapi.cpp | 9 |
2 files changed, 2 insertions, 12 deletions
diff --git a/include/cubeb/cubeb.h b/include/cubeb/cubeb.h index b678f73..0da5762 100644 --- a/include/cubeb/cubeb.h +++ b/include/cubeb/cubeb.h @@ -240,9 +240,8 @@ typedef enum { except for always on APO, driver and hardware. */ CUBEB_STREAM_PREF_PERSIST = 0x10, /**< Request that the volume and mute settings should persist across restarts of the stream - and/or application. May not be honored for - all backends and platforms. */ - + and/or application. This is obsolete and ignored + by all backends. */ CUBEB_STREAM_PREF_JACK_NO_AUTO_CONNECT = 0x20 /**< Don't automatically try to connect ports. Only affects the jack backend. */ diff --git a/src/cubeb_wasapi.cpp b/src/cubeb_wasapi.cpp index da0fd98..f6f7619 100644 --- a/src/cubeb_wasapi.cpp +++ b/src/cubeb_wasapi.cpp @@ -1915,10 +1915,6 @@ initialize_iaudioclient3(com_ptr<IAudioClient> & audio_client, return false; } - // IAudioClient3 doesn't support AUDCLNT_STREAMFLAGS_NOPERSIST, and will return - // AUDCLNT_E_INVALID_STREAM_FLAG. This is undocumented. - flags = flags & ~AUDCLNT_STREAMFLAGS_NOPERSIST; - // Some people have reported glitches with capture streams: // http://blog.nirbheek.in/2018/03/low-latency-audio-on-windows-with.html if (direction == eCapture) { @@ -2134,11 +2130,6 @@ int setup_wasapi_stream_one_side(cubeb_stream * stm, DWORD flags = 0; - bool is_persist = stream_params->prefs & CUBEB_STREAM_PREF_PERSIST; - if (!is_persist) { - flags |= AUDCLNT_STREAMFLAGS_NOPERSIST; - } - // Check if a loopback device should be requested. Note that event callbacks // do not work with loopback devices, so only request these if not looping. if (is_loopback) { |