VirtualBox

Changeset 35573 in vbox for trunk/src


Ignore:
Timestamp:
Jan 14, 2011 3:36:42 PM (14 years ago)
Author:
vboxsync
Message:

dsound: Try restoring buffer if GetCurrentPosition failed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/dsoundaudio.c

    r35353 r35573  
    235235
    236236    AUD_log (AUDIO_CAP, "Reason: %s\n", str);
    237 #ifdef VBOX
    238     LogRel(("DSound: Reason: %s\n", str));
    239 #endif
    240237}
    241238
     
    718715        ds->first_time ? &wpos : NULL
    719716        );
     717    if (hr == DSERR_BUFFERLOST) {
     718        if (dsound_restore_out(dsb))
     719            return 0;
     720        hr = IDirectSoundBuffer_GetCurrentPosition(dsb, &ppos, ds->first_time ? &wpos : NULL);
     721    }
    720722    if (FAILED (hr)) {
    721723        dsound_logerr (hr, "Could not get playback buffer position\n");
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette