Hi,

I'm using Visual Studio 2008 on Windows XP.

How do I play a mono sound of approx 2500 samples over 500ms using ASIO Audio Driver?
I'm really stuck on this. I've never used callbacks before, but the ASIO driver does.

I need to use ASIO due to latency issues.

A callback is just a function that you write that will be called by the driver. When initializing the driver function you pass it a pointer to your function. You will have to read the ASIO Auto Driver's programming manual to find out exactly how to code the callback function.

// in the driver code
int inidriver( int *(callback)( <parameters here> ) )
{
   // blabla
}

// your code
int myfn( <parameters here> )
{
   // do something
}

int main()
{
    inidriver( myfn );
    <other stuff here>
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.