add u8 sample format
This commit is contained in:
parent
6645d57d14
commit
c6560bd6cb
1 changed files with 4 additions and 0 deletions
|
|
@ -79,6 +79,10 @@ impl AudioRecorder {
|
||||||
);
|
);
|
||||||
|
|
||||||
let stream = match config.sample_format() {
|
let stream = match config.sample_format() {
|
||||||
|
cpal::SampleFormat::U8 => {
|
||||||
|
AudioRecorder::build_stream::<u8>(&thread_device, &config, sample_tx, channels)
|
||||||
|
.unwrap()
|
||||||
|
}
|
||||||
cpal::SampleFormat::I8 => {
|
cpal::SampleFormat::I8 => {
|
||||||
AudioRecorder::build_stream::<i8>(&thread_device, &config, sample_tx, channels)
|
AudioRecorder::build_stream::<i8>(&thread_device, &config, sample_tx, channels)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue