Sign in to follow this  
Dan_

Using ASIO for audio capture

Recommended Posts

Hello, I'm using ASIO to do some FX processing, and I can send data to output buffers successfully, but I'm having trouble reading data from the microphone input; the buffers don't seem to be filled with any data when I read from them and I'm not sure if there's anything special I need to do in order to activate inputs or anything. Currently, I'm creating input channels using ASIOCreateBuffers, where the ASIOBufferInfo struct contains the channel number and ASIOTrue for the isInput parameter. I then use ASIOGetChannelInfo to get some information about the channel, and isActive is set to true after the call. I'm reading from the buffer contained in the ASIOBufferInfo struct built by ASIOCreateBuffers, using the buffer index specified by the bufferSwitch callback. When I read from the buffer, I'm using a switch on the channel type (supplied by ASIOGetChannelInfo) to see which data format its using, which is a 32 bit integer. When I try to read the buffer as an int all I'm getting is zeroes. So as far as I know I'm creating the channels/buffers correctly and I'm reading the correct buffers. Does anyone have any suggestions about something that I may have missed? Any help is appreciated. Dan

Share this post


Link to post
Share on other sites
I've found the solution to my problem, so I'll state it here in case someone has a similar problem.

Basically, when I was opening channels I was doing them one at a time, each channel had its own call to ASIOCreateBuffers. First I was creating the input channel, and then the output channel. The output channel was working fine, but the input wasn't. I changed to creating all the buffers at the same time and it solved my problem. I can now read audio from an input and stream it to my outputs.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this