Archived

This topic is now archived and is closed to further replies.

loading into hardware mem, then software mem

This topic is 5146 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites