-
Notifications
You must be signed in to change notification settings - Fork 349
Description
I have a USB device - a software defined radio that acts as stereo audio in / audio out. It streams over USB 2.0 FS with S24_3LE format: 24 bit signed integer packed into three bytes. Such format is newly detected by
bool RtApiAlsa :: probeDeviceInfo( RtAudio::DeviceInfo& info, std::string name )
and SND_PCM_FORMAT_S24_3LE is converted to RTAUDIO_SINT24
thus my device is listed out, however
bool RtApiAlsa :: probeDeviceOpen( unsigned int deviceId, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options )
gets RTAUDIO_SINT24 and converts it to SND_PCM_FORMAT_S24, the _3LE suffix is lost by the round trip conversion.
My device does not support SND_PCM_FORMAT_S24, thus audio streaming fails.
indeed, the buffer handling such as
void RtApi :: convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info )
does not work with three byte strides.
Would you please implement SND_PCM_FORMAT_S24_3LE support?
Thank you
The device is
https://qrp-labs.com/qmx.html
and arecord works with the following parameters:
$ arecord -D hw:Transceiver,0 --dump-hw-params -f S24_3LE -r 48000 -c 2 /dev/null
HW Params of device "hw:Transceiver,0":
--------------------
ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT: S24_3LE
SUBFORMAT: STD MSBITS_MAX
SAMPLE_BITS: 24
FRAME_BITS: 48
CHANNELS: 2
RATE: 48000
PERIOD_TIME: [1000 1000000]
PERIOD_SIZE: [48 48000]
PERIOD_BYTES: [288 288000]
PERIODS: [2 1024]
BUFFER_TIME: [2000 2000000]
BUFFER_SIZE: [96 96000]
BUFFER_BYTES: [576 576000]
TICK_TIME: ALL
--------------------
Recording WAVE '/dev/null' : Signed 24 bit Little Endian in 3bytes, Rate 48000 Hz, Stereo