VirtualBox

Changeset 73785 in vbox for trunk


Ignore:
Timestamp:
Aug 20, 2018 1:14:35 PM (6 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio: Don't clear (finish) more input frames than available in drvAudioStreamRead(); should help wrt testbox crashes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r73731 r73785  
    23032303        }
    23042304
     2305        if (cfReadTotal)
     2306        {
     2307            if (pThis->In.Cfg.Dbg.fEnabled)
     2308                DrvAudioHlpFileWrite(pStream->In.Dbg.pFileStreamRead,
     2309                                     pvBuf, AUDIOMIXBUF_F2B(&pStream->Guest.MixBuf, cfReadTotal), 0 /* fFlags */);
     2310
     2311            AudioMixBufFinish(&pStream->Guest.MixBuf, cfReadTotal);
     2312        }
     2313
    23052314        /* If we were not able to read as much data as requested, fill up the returned
    23062315         * data with silence.
     
    23212330        }
    23222331
    2323         if (cfReadTotal)
    2324         {
    2325             if (pThis->In.Cfg.Dbg.fEnabled)
    2326                 DrvAudioHlpFileWrite(pStream->In.Dbg.pFileStreamRead,
    2327                                      pvBuf, AUDIOMIXBUF_F2B(&pStream->Guest.MixBuf, cfReadTotal), 0 /* fFlags */);
    2328 
    2329             AudioMixBufFinish(&pStream->Guest.MixBuf, cfReadTotal);
    2330 
    2331             cbReadTotal = AUDIOMIXBUF_F2B(&pStream->Guest.MixBuf, cfReadTotal);
    2332         }
     2332        cbReadTotal = AUDIOMIXBUF_F2B(&pStream->Guest.MixBuf, cfReadTotal);
    23332333
    23342334        pStream->tsLastReadWrittenNs = RTTimeNanoTS();
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