]> code.octet-stream.net Git - m17rt/blobdiff - demod/src/main.rs
Defining input sources for Soundmodem
[m17rt] / demod / src / main.rs
index c1a7eb9e744a136e6b1856b9ee299c48de448c02..78ff2b0732086a4ea0911b57ecd70274b095d19e 100755 (executable)
@@ -57,7 +57,12 @@ pub fn run_my_decode() {
                     let stream = def
                         .build_output_stream(
                             &config.into(),
                     let stream = def
                         .build_output_stream(
                             &config.into(),
-                            move |data: &mut [i16], _: &cpal::OutputCallbackInfo| {
+                            move |data: &mut [i16], info: &cpal::OutputCallbackInfo| {
+                                debug!(
+                                    "callback {:?} playback {:?}",
+                                    info.timestamp().callback,
+                                    info.timestamp().playback
+                                );
                                 println!(
                                     "iteration {counter} asked for {} samples at time {}",
                                     data.len(),
                                 println!(
                                     "iteration {counter} asked for {} samples at time {}",
                                     data.len(),
@@ -72,7 +77,7 @@ pub fn run_my_decode() {
                                 data[0..qty].copy_from_slice(&samples[index..(index + qty)]);
                                 index += qty;
                             },
                                 data[0..qty].copy_from_slice(&samples[index..(index + qty)]);
                                 index += qty;
                             },
-                            move |e| {
+                            move |_e| {
                                 println!("error occurred");
                             },
                             None,
                                 println!("error occurred");
                             },
                             None,