sysaudio: disable i24 sample format

Workaround for #1152
This commit is contained in:
Ali Chraghi 2024-04-13 16:18:23 +03:30 committed by Stephen Gutekanst
parent d1c3d26710
commit c45606c290
5 changed files with 51 additions and 29 deletions

View file

@ -740,7 +740,14 @@ fn performOperation(main_loop: *c.pa_threaded_mainloop, op: ?*c.pa_operation) vo
}
}
pub const available_formats = &[_]main.Format{ .u8, .i16, .i24, .i32, .f32 };
pub const available_formats = &[_]main.Format{
.u8,
.i16,
// TODO(i24)
// .i24,
.i32,
.f32,
};
pub fn fromPAChannelPos(pos: c.pa_channel_position_t) !main.ChannelPosition {
return switch (pos) {
@ -773,7 +780,8 @@ pub fn toPAFormat(format: main.Format) c.pa_sample_format_t {
return switch (format) {
.u8 => c.PA_SAMPLE_U8,
.i16 => if (is_little) c.PA_SAMPLE_S16LE else c.PA_SAMPLE_S16BE,
.i24 => if (is_little) c.PA_SAMPLE_S24LE else c.PA_SAMPLE_S24LE,
// TODO(i24)
// .i24 => if (is_little) c.PA_SAMPLE_S24LE else c.PA_SAMPLE_S24LE,
.i32 => if (is_little) c.PA_SAMPLE_S32LE else c.PA_SAMPLE_S32BE,
.f32 => if (is_little) c.PA_SAMPLE_FLOAT32LE else c.PA_SAMPLE_FLOAT32BE,
};