loading into hardware mem, then software mem

Started by
-1 comments, last by docyoung83 20 years, 5 months ago
Is this the proper way to attempt to load a sound into the hardware memory, then, if the memory is full, load it into software memory instead?


.....code code code.....

    dsbd.dwFlags = DSBCAPS_CTRLDEFAULT | DSBCAPS_STATIC | DSBCAPS_LOCHARDWARE;

    // create the sound buffer
    if (lpds->CreateSoundBuffer(&dsbd,&lpdsbuffer,NULL)!=DS_OK)
    {
        dsbd.dwFlags		= DSBCAPS_CTRLDEFAULT | DSBCAPS_STATIC | DSBCAPS_LOCSOFTWARE;

        if (lpds->CreateSoundBuffer(&dsbd, &lpdsbuffer, NULL) != DS_OK)
        {
           // return error
           return false;
        }
    } // end if
  
[edited by - StonieJ on November 8, 2003 11:27:56 PM]

This topic is closed to new replies.

Advertisement