Topic: Develop an application to play multichannel signals
We have bought a HDSPe-MADI card,and want to use this card to play multichannel signals?about 30 channels??the signals of each channel are different from each other?
Of course?we need to write an application ourselves to realize this purpose?
It's told that the HDSPe-MADI card is based on the ASIO standard?so we downloaded the ASIO-SDK2 from steinberg homepage?
We plan to develop the application on platform Visual C++ 6.0?however?when running the hostsample.dsw?an example of ASIO application included in the ASIO-SDK2 ??there are some problems?the code can't load the driver,as follows, loadAsioDriver(ASIO_DRIVER_NAME)=0:
///////////////////////////////////////////////////////////////////////////
int main(int argc, char* argv[])
{
// load the driver, this will setup all the necessary internal data structures
if (loadAsioDriver (ASIO_DRIVER_NAME))
{
// initialize the driver
if (ASIOInit (&asioDriverInfo.driverInfo) == ASE_OK)
{
printf ("asioVersion: %d\n"
"driverVersion: %d\n"
"Name: %s\n"
"ErrorMessage: %s\n",
asioDriverInfo.driverInfo.asioVersion, asioDriverInfo.driverInfo.driverVersion,
asioDriverInfo.driverInfo.name, asioDriverInfo.driverInfo.errorMessage);
if (init_asio_static_data (&asioDriverInfo) == 0)
{
// ASIOControlPanel(); you might want to check wether the ASIOControlPanel() can open
// set up the asioCallback structure and create the ASIO data buffer
asioCallbacks.bufferSwitch = &bufferSwitch;
asioCallbacks.sampleRateDidChange = &sampleRateChanged;
asioCallbacks.asioMessage = &asioMessages;
asioCallbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfo;
if (create_asio_buffers (&asioDriverInfo) == ASE_OK)
{
if (ASIOStart() == ASE_OK)
{
// Now all is up and running
fprintf (stdout, "\nASIO Driver started succefully.\n\n");
while (!asioDriverInfo.stopped)
{
#if WINDOWS
Sleep(100); // goto sleep for 100 milliseconds
#elif MAC
unsigned long dummy;
Delay (6, &dummy);
#endif
fprintf (stdout, "%d ms / %d ms / %d samples", asioDriverInfo.sysRefTime, (long)(asioDriverInfo.nanoSeconds / 1000000.0), (long)asioDriverInfo.samples);
// create a more readable time code format (the quick and dirty way)
double remainder = asioDriverInfo.tcSamples;
long hours = (long)(remainder / (asioDriverInfo.sampleRate * 3600));
remainder -= hours * asioDriverInfo.sampleRate * 3600;
long minutes = (long)(remainder / (asioDriverInfo.sampleRate * 60));
remainder -= minutes * asioDriverInfo.sampleRate * 60;
long seconds = (long)(remainder / asioDriverInfo.sampleRate);
remainder -= seconds * asioDriverInfo.sampleRate;
fprintf (stdout, " / TC: %2.2d:%2.2d:%2.2d:%5.5d", (long)hours, (long)minutes, (long)seconds, (long)remainder);
fprintf (stdout, " \r");
#if !MAC
fflush (stdout);
#endif
}
ASIOStop();
}
ASIODisposeBuffers();
}
}
ASIOExit();
}
asioDrivers->removeCurrentDriver();
}
return 0;
}
///////////////////////////////////////////////////////////////////////////
We don't know why this happens
PS:we know there are many obstacles ahead us?and could you provide me some good advices and references to develop such an application? If so,please email me~
My Email?lsghust@163.com