static void updateRouter (uint16 const * pRoutes, uint16 nbRoutes) { uROUTER_SETUP setup; uROUTER_SETUP * pSetup = (uROUTER_SETUP *) mDicePtr(DICE_ROUTER1_SETUP); uROUTER_ENTRY * pEntry = (uROUTER_ENTRY *) mDicePtr(DICE_ROUTER1_ENTRY); uint16 n = nbRoutes; while (n--) { pEntry->reg = (uint32)(*pRoutes++); pEntry++; } setup.reg = 0; if (!nbRoutes) { setup.bit.on = 0; } else { setup.bit.numEntry = nbRoutes-1; setup.bit.peakon = 1; setup.bit.on = 1; } *pSetup = setup; }
HRESULT dalRouterInitialize (void) { dalRouterDesc[0].rateMode = eDAL_RATE_MODE_LOW_MID; dalRouterDesc[0].nbEntries = 0; dalRouterDesc[0].pRouterSetup = (uROUTER_SETUP *) mDicePtr(DICE_ROUTER1_SETUP); dalRouterDesc[0].pRouterentries = (uROUTER_ENTRY *) mDicePtr(DICE_ROUTER1_ENTRY); return NO_ERROR; }
uint32 myMeterThreadID = 0; const char* myMeterThreadName = "myMeterThread"; //LEDmode determines if the board use LED for status or metering. Metering is not //possible with the DICE II, this variable is keept to make the module as close as //possible to the DICE Jr/Mini version static bool LEDmode=0; //if 0 LEDs show status otherwise they show meter //we need a few other status things to handle the application specific LED stuff static bool driverAttached; //need a pointer to the peaks uint32 * pEntry = (uint32 * )mDicePtr(DICE_ROUTER1_ENTRY); // The myMode system returns this pointer defining the mode static MODE_CFG * pCurrentMode; // The default name our device will appear as under ASIO and CoreAudio #define MY_DEVICE_NICK_NAME "MyProduct" // forward declaration static HRESULT myDiceDriverCallBack (DICE_DRIVER_MSG_ENUM msg, DICE_DRIVER_CB_DATA * pData); // update the status LED's, called whenever the status affecting the LED's has changed