VirtualBox

Changeset 88278 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Mar 24, 2021 1:54:00 PM (4 years ago)
Author:
vboxsync
Message:

Audio: Build fix and some cleanups. bugref:9890

File:
1 edited

Legend:

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

    r88269 r88278  
    16471647     * Do the playing if we decided to play something.
    16481648     */
    1649     int rc = VINF_SUCCESS;
     1649    int rc;
    16501650    if (cFramesToPlay)
    16511651    {
     
    16531653            pThis->pHostDrvAudio->pfnStreamPlayBegin(pThis->pHostDrvAudio, pStream->pvBackend);
    16541654
    1655         /** @todo r=bird: I don't honestly see any difference in interleaved,
    1656          *        non-interrleaved, raw, complicate, or whatever frame format we're
    1657          *        dealing with here.  We'll be formatting a chunk of audio data and feed
    1658          *        it to the backend, the formatting is taken care of by the mixer and
    1659          *        we don't really care about the format anywhere here.
    1660          *
    1661          *        Raw audio is just stereo S64, btw.  Since drvAudioStreamPlayRaw
    1662          *        actually copies the mixer data instead of accessing the internal mixer
    1663          *        buffer directly, there is no advantage to having separate code paths
    1664          *        here.  It only leads to more incomplete crappy code (I find the code
    1665          *        quality quite appaling, given the amount of time spent on it).
    1666          *
    1667          *        What's more, I think the non-interleaved designation here is wrong
    1668          *        anyway.  Non-interleaved means a stereo chunk of 8 frames is
    1669          *        formatted:
    1670          *              - LLLLLLLLRRRRRRRR
    1671          *        whereas I'm pretty darn sure we do:
    1672          *              - LRLRLRLRLRLRLRLR
    1673          *        given that the mixer doesn't know how to output the former.  See the
    1674          *        audioMixBufConvTo##a_Name##Stereo() code, it clearly output LR pairs.
    1675          *
    1676          *        https://stackoverflow.com/questions/17879933/whats-the-interleaved-audio
    1677          */
    16781655        rc = drvAudioStreamPlayDoIt(pThis, pStream, cFramesToPlay, pcFramesPlayed);
    16791656
     
    16831660        pStream->tsLastPlayedCapturedNs = RTTimeNanoTS();
    16841661    }
     1662    else
     1663        rc = VINF_SUCCESS;
    16851664
    16861665    Log3Func(("[%s] Live=%RU32 fr (%RU64 ms) Period=%RU32 fr (%RU64 ms) Writable=%RU32 fr (%RU64 ms) -> ToPlay=%RU32 fr (%RU64 ms) Played=%RU32 fr (%RU64 ms)%s\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