Send fixed number of samples when no output stream (not correct for asynch)
This commit is contained in:
@@ -63,19 +63,21 @@ void AudioHub(server i2s_frame_callback_if i2s,
|
||||
for (int i = 0; i < n_chans; i++) out_samps[i] = samples_out[i];
|
||||
break;
|
||||
|
||||
//Exchange samples with mics & host
|
||||
case i2s.restart_check() -> i2s_restart_t restart:
|
||||
restart = I2S_NO_RESTART; // Keep on looping
|
||||
timer tmr; int t0, t1; tmr :> t0;
|
||||
for (int i = 0; i < NUM_USB_CHAN_OUT; i++) c_audio :> samples_out[i];
|
||||
for (int i = 0; i < NUM_USB_CHAN_IN; i++) c_audio <: raw_mics[i];
|
||||
//tmr :> t1; debug_printf("%d\n", t1 - t0);
|
||||
//delay_microseconds(15); //Test backpressure tolerance
|
||||
|
||||
//Grab mics
|
||||
current = mic_array_get_next_time_domain_frame(c_ds_output, decimatorCount, buffer, mic_audio_frame, dc);
|
||||
unsafe {
|
||||
raw_mics[0] = current->data[0][0];
|
||||
raw_mics[1] = current->data[1][0];
|
||||
}
|
||||
//tmr :> t1; debug_printf("%d\n", t1 - t0);
|
||||
delay_microseconds(15); //Test backpressure tolerance
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user