Skip to content

'Sound' package likey has no way to set sample format #30

@sergstesh

Description

@sergstesh

Looking into PortAudio documentation, e.g. at https://files.portaudio.com/docs/v19-doxydocs-dev/portaudio_8h.html#a4582d93c2c2e60e12be3d74c5fe00b , which describes 'PaSampleFormat' type, I see that there is a number of sample formats supported.

Also in https://files.portaudio.com/docs/v19-doxydocs-dev/portaudio_8h_source.html I see on line #498 '#define paCustomFormat ((PaSampleFormat) 0x00010000)' . I in practice specifically need S24_3LE for the capture stream of CX31993 because it's the only 24 bit format the ADC supports.

Looking into https://jefffessler.github.io/Sound.jl/stable/methods/#Methods-list I don't see a way to set sample format.

Am I missing something ?

For that matter, looking into https://github.com/JuliaAudio/PortAudio.jl I am not sure it implements setting sample format - I mean number of bits per sample and how the bits are packed in a sample - again, I particularly need S24_3LE.

At the moment I've implemented my code the Linux-only way using 'aplay' and 'arecord' - the two utilities allow me to set whatever sample format supported by the card. I would rather prefer to implement my code cross=platform way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions