Skip to content

Commit

Permalink
added i24 to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-franco-gomez committed Nov 13, 2024
1 parent c79edf3 commit 95022fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extern crate cpal;

use cpal::{
traits::{DeviceTrait, HostTrait, StreamTrait},
SizedSample,
SizedSample, I24,
};
use cpal::{FromSample, Sample};

Expand All @@ -22,7 +22,7 @@ fn main() {
match config.sample_format() {
cpal::SampleFormat::I8 => run::<i8>(&device, &config.into()).unwrap(),
cpal::SampleFormat::I16 => run::<i16>(&device, &config.into()).unwrap(),
// cpal::SampleFormat::I24 => run::<I24>(&device, &config.into()).unwrap(),
cpal::SampleFormat::I24 => run::<I24>(&device, &config.into()).unwrap(),
cpal::SampleFormat::I32 => run::<i32>(&device, &config.into()).unwrap(),
// cpal::SampleFormat::I48 => run::<I48>(&device, &config.into()).unwrap(),
cpal::SampleFormat::I64 => run::<i64>(&device, &config.into()).unwrap(),
Expand Down
4 changes: 2 additions & 2 deletions examples/beep.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use clap::Parser;
use cpal::{
traits::{DeviceTrait, HostTrait, StreamTrait},
FromSample, Sample, SizedSample,
FromSample, Sample, SizedSample, I24,
};

#[derive(Parser, Debug)]
Expand Down Expand Up @@ -78,7 +78,7 @@ fn main() -> anyhow::Result<()> {
match config.sample_format() {
cpal::SampleFormat::I8 => run::<i8>(&device, &config.into()),
cpal::SampleFormat::I16 => run::<i16>(&device, &config.into()),
// cpal::SampleFormat::I24 => run::<I24>(&device, &config.into()),
cpal::SampleFormat::I24 => run::<I24>(&device, &config.into()),
cpal::SampleFormat::I32 => run::<i32>(&device, &config.into()),
// cpal::SampleFormat::I48 => run::<I48>(&device, &config.into()),
cpal::SampleFormat::I64 => run::<i64>(&device, &config.into()),
Expand Down
3 changes: 2 additions & 1 deletion examples/synth_tones.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extern crate cpal;

use cpal::{
traits::{DeviceTrait, HostTrait, StreamTrait},
SizedSample,
SizedSample, I24,
};
use cpal::{FromSample, Sample};

Expand Down Expand Up @@ -98,6 +98,7 @@ where
match config.sample_format() {
cpal::SampleFormat::I8 => make_stream::<i8>(&device, &config.into()),
cpal::SampleFormat::I16 => make_stream::<i16>(&device, &config.into()),
cpal::SampleFormat::I24 => make_stream::<I24>(&device, &config.into()),
cpal::SampleFormat::I32 => make_stream::<i32>(&device, &config.into()),
cpal::SampleFormat::I64 => make_stream::<i64>(&device, &config.into()),
cpal::SampleFormat::U8 => make_stream::<u8>(&device, &config.into()),
Expand Down

0 comments on commit 95022fa

Please sign in to comment.