.....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]
loading into hardware mem, then software mem
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?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement