tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

0004-disable-cubeb_one_duplex_one_input-macos10.15.patch (1360B)


      1 diff --git a/test/test_duplex.cpp b/test/test_duplex.cpp
      2 --- a/test/test_duplex.cpp
      3 +++ b/test/test_duplex.cpp
      4 @@ -12,16 +12,19 @@
      5 #define _XOPEN_SOURCE 600
      6 #endif
      7 #include "cubeb/cubeb.h"
      8 #include <atomic>
      9 #include <math.h>
     10 #include <memory>
     11 #include <stdio.h>
     12 #include <stdlib.h>
     13 +#ifdef __APPLE__
     14 +#include <sys/utsname.h>
     15 +#endif
     16 
     17 #include "mozilla/gtest/MozHelpers.h"
     18 
     19 // #define ENABLE_NORMAL_LOG
     20 // #define ENABLE_VERBOSE_LOG
     21 #include "common.h"
     22 
     23 #define SAMPLE_FREQUENCY 48000
     24 @@ -294,16 +296,27 @@ TEST(cubeb, one_duplex_one_input)
     25   cubeb * ctx;
     26   cubeb_stream * duplex_stream;
     27   cubeb_stream_params input_params;
     28   cubeb_stream_params output_params;
     29   int r;
     30   user_state_duplex duplex_stream_state;
     31   uint32_t latency_frames = 0;
     32 
     33 +  // Disabled on 10.15, see bug 1867183
     34 +#ifdef __APPLE__
     35 +  struct utsname uts;
     36 +  uname(&uts);
     37 +  // 10.15 correspond to Darwin 19
     38 +  if (strncmp(uts.release, "19", 2) == 0) {
     39 +    printf("Test disabled on macOS 10.15, exiting.\n");
     40 +    return;
     41 +  }
     42 +#endif
     43 +
     44   r = common_init(&ctx, "Cubeb duplex example");
     45   ASSERT_EQ(r, CUBEB_OK) << "Error initializing cubeb library";
     46 
     47   std::unique_ptr<cubeb, decltype(&cubeb_destroy)> cleanup_cubeb_at_exit(
     48       ctx, cubeb_destroy);
     49 
     50   /* This test needs at least two available input devices. */
     51   std::vector<cubeb_devid> input_devices =