Hello I am using Steingerg ASIO SDK 2.3 (downloaded from there http://ift.tt/1zBp7uO). I am having problem with understanding ASIO data type. I have a host application that connects to device and sends data to ASIO callbacks.
Data type that I get from my device driver is interpreted as ASIOSTInt32LSB which in ASIO SDK documentation is described as:
This format should also be used for 24 bit data, if the sample data is left
aligned. Lowest 8 bit should be reset or dithered whatever the hardware/software provides.
I can't figure out if my signal is 24 or 32 bit one. I try to read documentation of my device and I find:
System handles all data with a 24-bit signal path, regardless of the I/O format.
In ASIO callback data is stored in a pointer to buffer:
bufferInfos[i].buffers[doubleBufferIndex]
Where i is a id of buffer and doubleBufferIndex is 0 or 1 id that switches between left and right pan. It's a 2 channel signal. In documentation data type stored in the buffers is type of void*. When I cast it to (int*) I can actually play it and it works. I have also managed to cast this signal to double <-1, 1>.
Because I want to create 16 bit WAV file, I would like to downsample this signal to 16 bit one but:
- I am a bit inexperienced so I have trouble how to do it.
- I can't figure out what exactly is inside ASIOSTInt32LSB.
Could you help me find any solution? Maybe I could recreate 16 bit signal from the double values. Or do you know how can I get more info about data format of ASIOSTInt32LSB. Maybe how could I downsample it or force driver to return ASIOSTInt16LSB instead? Any kind of solution/hint is appreciated.
Aucun commentaire:
Enregistrer un commentaire