From e1a81d67edc8e3634ee8f3c30e558e171367f628 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 17 Nov 2015 19:30:12 +0100 Subject: [PATCH] Add a paranoia assert. --- mixer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mixer.cpp b/mixer.cpp index e305376..1603b8d 100644 --- a/mixer.cpp +++ b/mixer.cpp @@ -398,6 +398,7 @@ void Mixer::thread_func() int num_samples_times_timebase = OUTPUT_FREQUENCY * card->new_frame_length + card->fractional_samples; num_samples[card_index] = num_samples_times_timebase / TIMEBASE; card->fractional_samples = num_samples_times_timebase % TIMEBASE; + assert(num_samples[card_index] >= 0); } } -- 2.39.2