mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
add panic if recbuf is not allocated
should never happen, but, might as well dot the i's.
This commit is contained in:
parent
7c231f0955
commit
6266d8a74d
1 changed files with 2 additions and 0 deletions
|
|
@ -405,6 +405,8 @@ impl<'a> ShellCmdApi<'a> for Test {
|
||||||
right_samples.push( ((sample & 0xFFFF) as i16) as f32 );
|
right_samples.push( ((sample & 0xFFFF) as i16) as f32 );
|
||||||
//left_samples.push( (((sample >> 16) & 0xFFFF) as i16) as f32 ); // reminder of how to extract the right channel
|
//left_samples.push( (((sample >> 16) & 0xFFFF) as i16) as f32 ); // reminder of how to extract the right channel
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
panic!("recbuf was not allocated");
|
||||||
}
|
}
|
||||||
// only one channel is considered, because in reality the left is just a copy of the right, as
|
// only one channel is considered, because in reality the left is just a copy of the right, as
|
||||||
// we are taking a mono microphone signal and mixing it into both ADCs
|
// we are taking a mono microphone signal and mixing it into both ADCs
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue