]> git.sesse.net Git - bmusb/blobdiff - bmusb.cpp
Release v0.7.2.
[bmusb] / bmusb.cpp
index 559c33760c96965c6804537b0fb29d2c37cefe0c..05bb2a22f76c03da29b9cecb1b3f57361260ccb0 100644 (file)
--- a/bmusb.cpp
+++ b/bmusb.cpp
@@ -1,4 +1,4 @@
-// Intensity Shuttle USB3 capture driver, v0.6.0
+// Intensity Shuttle USB3 capture driver, v0.7.2
 // Can download 8-bit and 10-bit UYVY/v210-ish frames from HDMI, quite stable
 // (can do captures for hours at a time with no drops), except during startup
 // 576p60/720p60/1080i60 works, 1080p60 does not work (firmware limitation)
@@ -252,7 +252,7 @@ int guess_sample_rate(const VideoFormat &video_format, size_t len, int default_r
        // See if we match or are very close to any of the mandatory HDMI sample rates.
        const int candidate_sample_rates[] = { 32000, 44100, 48000 };
        for (int rate : candidate_sample_rates) {
-               if (abs(int(num_samples_per_second) - rate) < 50) {
+               if (abs(int(num_samples_per_second) - rate) <= 100) {
                        return rate;
                }
        }
@@ -1479,6 +1479,7 @@ void BMUSBCapture::start_bm_thread()
 void BMUSBCapture::stop_bm_thread()
 {
        should_quit = true;
+       libusb_interrupt_event_handler(nullptr);
        usb_thread.join();
 }