-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Sound' package likey has no way to set sample format #30
Comments
The input signal to the |
I visited the link before opening this issue and didn't find what I was looking for. I.e. IMO nothing that is stuff like S24_3LE. Am I missing something ? |
I do not understand whether the quoted statement is relevant for the reported issue. If I understand you correctly, the quoted statement is about the following https://jefffessler.github.io/Sound.jl/stable/methods/#Sound.sound :
First of all, I am at the moment interested in specifying capture format (pay attention to "ADC" in my opening statement - which is not DAC) rather than in playback format. |
Ah sorry, I overlooked the "ADC" focus. |
Then I suggest to update the package documentation to state there is no way to explicitly set sample format the way PortAudio "C" library allows to do it. |
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.
The text was updated successfully, but these errors were encountered: