Skip to content

Commit d45bd15

Browse files
committed
Some typos
1 parent f6c5c01 commit d45bd15

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

examples/feedback_interleaved.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn main() -> Result<(), coreaudio::Error> {
3434
let mut output_audio_unit = audio_unit_from_device_id(output_device_id, false)?;
3535

3636
let format_flag = match SAMPLE_FORMAT {
37-
SampleFormat::F32 => LinearPcmFlags::IS_FLOAT,
37+
SampleFormat::F32 => LinearPcmFlags::IS_FLOAT | LinearPcmFlags::IS_PACKED,
3838
SampleFormat::I32 | SampleFormat::I24_3 | SampleFormat::I16 | SampleFormat::I8 => {
3939
LinearPcmFlags::IS_SIGNED_INTEGER | LinearPcmFlags::IS_PACKED
4040
}
@@ -44,14 +44,14 @@ fn main() -> Result<(), coreaudio::Error> {
4444
let in_stream_format = StreamFormat {
4545
sample_rate: SAMPLE_RATE,
4646
sample_format: SAMPLE_FORMAT,
47-
flags: format_flag | LinearPcmFlags::IS_PACKED,
47+
flags: format_flag,
4848
channels: 2,
4949
};
5050

5151
let out_stream_format = StreamFormat {
5252
sample_rate: SAMPLE_RATE,
5353
sample_format: SAMPLE_FORMAT,
54-
flags: format_flag | LinearPcmFlags::IS_PACKED,
54+
flags: format_flag,
5555
channels: 2,
5656
};
5757

examples/sine_advanced.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn main() -> Result<(), coreaudio::Error> {
6060
let mut audio_unit = audio_unit_from_device_id(audio_unit_id, false)?;
6161

6262
let mut format_flag = match SAMPLE_FORMAT {
63-
SampleFormat::F32 => LinearPcmFlags::IS_FLOAT,
63+
SampleFormat::F32 => LinearPcmFlags::IS_FLOAT | LinearPcmFlags::IS_PACKED,
6464
SampleFormat::I32 | SampleFormat::I24_3 | SampleFormat::I16 | SampleFormat::I8 => {
6565
LinearPcmFlags::IS_SIGNED_INTEGER | LinearPcmFlags::IS_PACKED
6666
}
@@ -74,7 +74,7 @@ fn main() -> Result<(), coreaudio::Error> {
7474
let stream_format = StreamFormat {
7575
sample_rate: SAMPLE_RATE,
7676
sample_format: SAMPLE_FORMAT,
77-
flags: format_flag | LinearPcmFlags::IS_PACKED,
77+
flags: format_flag,
7878
// you can change this to 1
7979
channels: 2,
8080
};

src/audio_unit/sample_format.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ pub enum SampleFormat {
1111
I24_3,
1212
/// 24-bit signed integer, stored in 4 bytes where one is padding.
1313
I24_4,
14-
// 16-bit signed integer.
14+
/// 16-bit signed integer.
1515
I16,
16-
// 8-bit signed integer.
16+
/// 8-bit signed integer.
1717
I8,
1818
}
1919

0 commit comments

Comments
 (0)