Bug 950026 - Bail out when we don't get an expected return value from AudioClient::IsFormatSupported, instead of asserting. r=kinetik
authorPaul Adenot <paul@paul.cx>
Fri, 13 Dec 2013 18:11:06 +0100
changeset 160576 5c1ca8f7cf8803a4324329a503cddf75ba3b2580
parent 160575 9c55ce329853a06b095608367abcd29f7801c7c7
child 160577 34dba94651ccffb314a7506eef7e6440201517a0
push id37644
push userpaul@paul.cx
push dateMon, 16 Dec 2013 13:05:05 +0000
treeherdermozilla-inbound@5c1ca8f7cf88 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs950026
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 950026 - Bail out when we don't get an expected return value from AudioClient::IsFormatSupported, instead of asserting. r=kinetik This will fall back to our own channel mapping code, instead of trying to use the platform's.
media/libcubeb/src/cubeb_wasapi.cpp
--- a/media/libcubeb/src/cubeb_wasapi.cpp
+++ b/media/libcubeb/src/cubeb_wasapi.cpp
@@ -687,18 +687,16 @@ handle_channel_layout(cubeb_stream * stm
     assert(closest_pcm->SubFormat == format_pcm->SubFormat);
     CoTaskMemFree(*mix_format);
     *mix_format = closest;
   } else if (hr == AUDCLNT_E_UNSUPPORTED_FORMAT) {
     /* Not supported, no suggestion, there is a bug somewhere. */
     assert(false && "Format not supported, and no suggestion from WASAPI.");
   } else if (hr == S_OK) {
     LOG("Requested format accepted by WASAPI.");
-  } else {
-    assert(false && "Not reached.");
   }
 }
 
 int
 wasapi_stream_init(cubeb * context, cubeb_stream ** stream,
                    char const * stream_name, cubeb_stream_params stream_params,
                    unsigned int latency, cubeb_data_callback data_callback,
                    cubeb_state_callback state_callback, void * user_ptr)