VirtualBox

Ignore:
Timestamp:
Mar 24, 2021 7:00:13 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143494
Message:

Audio: Cleaned up the alsa and pulse audio play methods. Two doxygen fixes. [tweaks] bugref:9890

File:
1 edited

Legend:

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

    r88282 r88283  
    798798                    if (cFramesWritten == -EPIPE)
    799799                    {
    800                         /* underrun occurred */
     800                        /* Underrun occurred. */
    801801                        rc = alsaStreamRecover(pStreamALSA->phPCM);
    802                         if (RT_SUCCESS(rc))
    803                             LogFlowFunc(("Recovered from playback (iTry=%u)\n", iTry));
    804                         else
     802                        if (RT_FAILURE(rc))
    805803                            break;
     804                        LogFlowFunc(("Recovered from playback (iTry=%u)\n", iTry));
    806805                    }
    807806                    else
    808807                    {
    809                         /* an suspended event occurred, needs resuming. */
     808                        /* An suspended event occurred, needs resuming. */
    810809                        rc = alsaStreamResume(pStreamALSA->phPCM);
    811                         if (RT_SUCCESS(rc))
    812                             LogFlowFunc(("Resumed suspended output stream (iTry=%u)\n", iTry));
    813                         else
     810                        if (RT_FAILURE(rc))
    814811                        {
    815812                            LogRel(("ALSA: Failed to resume output stream (iTry=%u, rc=%Rrc)\n", iTry, rc));
    816813                            break;
    817814                        }
     815                        LogFlowFunc(("Resumed suspended output stream (iTry=%u)\n", iTry));
    818816                    }
    819817
     
    827825                    }
    828826                    LogFunc(("snd_pcm_writei w/ cbToWrite=%u -> %ld [cFramesAvail=%ld, iTry=%d]\n", cbToWrite, cFramesWritten, cFramesAvail, iTry));
    829                 } /* For number of tries. */
    830 
    831                 /* Make sure we return with an error. */
     827                }
     828
     829                /* Make sure we return with an error status. */
    832830                if (RT_SUCCESS_NP(rc))
    833831                {
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