0

I am trying to make sounds with vsti and asio. I have already transfrom the midi event to vst event, and then call the "processReplacing" function to make the vsti audio stream like this:

float *inputs[64];

float *outputs[2];

.....

m_effect->processReplacing(m_effect,inputs,outputs,m_blockSize);

but when I copy the "outputs" data to asio buffer, it make a noise.

memcpy (asioDriverInfo.bufferInfos[i].buffers[index], outputs[index], m_blockSize);

is the vsti audio data need any transformation before copy the asio buffer? I will be very appreciated, if you help me!

light
  • 13
  • 4
  • Usually the representation of sample is different between the VST plugins (float [-1,1]) and the Audio driver (ASIO), which can be an uint or something else. Also note how the separate channels (L/R) are encoded. So you need to read up on ASIO and convert the VST plugin floats to whatever ASIO wants. – obiwanjacobi Jun 01 '18 at 06:16
  • yeah,this's the point that I don't know how to convert. however, thanks for your reply – light Jun 01 '18 at 09:29
  • Linear transform the [-1, 1] range of each sample into what ASIO wants => I think 32 bits ints (lsb) are common (although more than 24 bits would probably be overkill). – obiwanjacobi Jun 01 '18 at 09:43
  • thanks, I fell get some guide by your words, I will get to know more knowledge about asio type(such as ASIOSTInt24LSB,ASIOSTInt32LSB,etc) – light Jun 04 '18 at 06:20

0 Answers0