VirtualBox

Changeset 63844 in vbox for trunk


Ignore:
Timestamp:
Sep 15, 2016 9:39:02 AM (8 years ago)
Author:
vboxsync
Message:

Audio/AudioMixer.cpp: Added audioMixerStreamCtlInternal().

File:
1 edited

Legend:

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

    r63828 r63844  
    5858static int audioMixerSinkUpdateInternal(PAUDMIXSINK pSink);
    5959
     60int audioMixerStreamCtlInternal(PAUDMIXSTREAM pMixStream, PDMAUDIOSTREAMCMD enmCmd, uint32_t fCtl);
    6061static void audioMixerStreamDestroyInternal(PAUDMIXSTREAM pStream);
    6162
     
    644645    RTListForEach(&pSink->lstStreams, pStream, AUDMIXSTREAM, Node)
    645646    {
    646         int rc2 = AudioMixerStreamCtl(pStream, enmCmdStream, AUDMIXSTRMCTL_FLAG_NONE);
     647        int rc2 = audioMixerStreamCtlInternal(pStream, enmCmdStream, AUDMIXSTRMCTL_FLAG_NONE);
    647648        if (RT_SUCCESS(rc))
    648649            rc = rc2;
     
    15401541
    15411542/**
    1542  * Controls a mixer stream.
     1543 * Controls a mixer stream, internal version.
    15431544 *
    15441545 * @returns IPRT status code.
     
    15471548 * @param   fCtl                Additional control flags. Pass 0.
    15481549 */
     1550int audioMixerStreamCtlInternal(PAUDMIXSTREAM pMixStream, PDMAUDIOSTREAMCMD enmCmd, uint32_t fCtl)
     1551{
     1552    AssertPtr(pMixStream->pConn);
     1553    AssertPtr(pMixStream->pStream);
     1554
     1555    RT_NOREF(fCtl);
     1556
     1557    int rc = pMixStream->pConn->pfnStreamControl(pMixStream->pConn, pMixStream->pStream, enmCmd);
     1558
     1559    LogFlowFunc(("[%s] enmCmd=%ld, rc=%Rrc\n", pMixStream->pszName, enmCmd, rc));
     1560
     1561    return rc;
     1562}
     1563
     1564/**
     1565 * Controls a mixer stream.
     1566 *
     1567 * @returns IPRT status code.
     1568 * @param   pMixStream          Mixer stream to control.
     1569 * @param   enmCmd              Mixer stream command to use.
     1570 * @param   fCtl                Additional control flags. Pass 0.
     1571 */
    15491572int AudioMixerStreamCtl(PAUDMIXSTREAM pMixStream, PDMAUDIOSTREAMCMD enmCmd, uint32_t fCtl)
    15501573{
     
    15571580        return rc;
    15581581
    1559     AssertPtr(pMixStream->pConn);
    1560     AssertPtr(pMixStream->pStream);
    1561 
    1562     rc = pMixStream->pConn->pfnStreamControl(pMixStream->pConn, pMixStream->pStream, enmCmd);
    1563 
    1564     LogFlowFunc(("[%s] enmCmd=%ld, rc=%Rrc\n", pMixStream->pszName, enmCmd, rc));
     1582    rc = audioMixerStreamCtlInternal(pMixStream, enmCmd, fCtl);
    15651583
    15661584    int rc2 = RTCritSectLeave(&pMixStream->CritSect);
    1567     AssertRC(rc2);
     1585    if (RT_SUCCESS(rc))
     1586        rc = rc2;
    15681587
    15691588    return rc;
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