VirtualBox

Changeset 107589 in vbox for trunk


Ignore:
Timestamp:
Jan 9, 2025 11:16:11 AM (10 days ago)
Author:
vboxsync
Message:

src/VBox/Devices/Audio/AudioMixer.cpp: Fixed warnings found by Parfait (assignment unused). This will only try re-initializing the mixing buffer peek/write state if re-initializing the stream was successful. Needs review. jiraref:VBP-1424

File:
1 edited

Legend:

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

    r106061 r107589  
    25982598            LogFunc(("[%s] re-init returns %Rrc and %s.\n", pMixStream->pszName, rc, PDMAudioStreamStateGetName(enmState)));
    25992599
    2600             PAUDMIXSINK const pSink = pMixStream->pSink;
    2601             AssertPtr(pSink);
    2602             if (pSink->enmDir == PDMAUDIODIR_OUT)
     2600            if (RT_SUCCESS(rc))
    26032601            {
    2604                 rc = AudioMixBufInitPeekState(&pSink->MixBuf, &pMixStream->PeekState, &pStream->Cfg.Props);
    2605                 /** @todo we need to remember this, don't we? */
    2606                 AssertLogRelRCReturn(rc, VINF_SUCCESS);
    2607             }
    2608             else
    2609             {
    2610                 rc = AudioMixBufInitWriteState(&pSink->MixBuf, &pMixStream->WriteState, &pStream->Cfg.Props);
    2611                 /** @todo we need to remember this, don't we? */
    2612                 AssertLogRelRCReturn(rc, VINF_SUCCESS);
     2602                PAUDMIXSINK const pSink = pMixStream->pSink;
     2603                AssertPtr(pSink);
     2604                if (pSink->enmDir == PDMAUDIODIR_OUT)
     2605                {
     2606                    rc = AudioMixBufInitPeekState(&pSink->MixBuf, &pMixStream->PeekState, &pStream->Cfg.Props);
     2607                    AssertLogRelRCReturnStmt(rc, enmState = PDMAUDIOSTREAMSTATE_NOT_WORKING, VINF_SUCCESS);
     2608                }
     2609                else
     2610                {
     2611                    rc = AudioMixBufInitWriteState(&pSink->MixBuf, &pMixStream->WriteState, &pStream->Cfg.Props);
     2612                    AssertLogRelRCReturnStmt(rc, enmState = PDMAUDIOSTREAMSTATE_NOT_WORKING, VINF_SUCCESS);
     2613                }
    26132614            }
    26142615        }
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