parent
d1c3d26710
commit
c45606c290
5 changed files with 51 additions and 29 deletions
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue