VirtualBox

Ignore:
Timestamp:
Jan 10, 2025 4:46:13 PM (10 days ago)
Author:
vboxsync
Message:

src/VBox/Devices/Audio/DrvHostAudioCoreAudio.cpp: Fixed warnings found by Parfait (unused assignment). Don't leak crit sect on CFGM errors. jiraref:VBP-1424

File:
1 edited

Legend:

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

    r106061 r107692  
    27752775    pThis->IHostAudio.pfnStreamCapture              = drvHstAudCaHA_StreamCapture;
    27762776
    2777     int rc = RTCritSectInit(&pThis->CritSect);
    2778     AssertRCReturn(rc, rc);
    2779 
    27802777    /*
    27812778     * Validate and read configuration.
     
    27842781
    27852782    char *pszTmp = NULL;
    2786     rc = pHlp->pfnCFGMQueryStringAlloc(pCfg, "InputDeviceID", &pszTmp);
     2783    int rc = pHlp->pfnCFGMQueryStringAlloc(pCfg, "InputDeviceID", &pszTmp);
    27872784    if (RT_SUCCESS(rc))
    27882785    {
    27892786        rc = drvHstAudCaSetDevice(pThis, &pThis->InputDevice, true /*fInput*/, false /*fNotify*/, pszTmp);
     2787        if (RT_FAILURE(rc))
     2788            LogRel(("CoreAudio: Failed to set input device to '%s' (%Rrc)\n", pszTmp, rc));
    27902789        PDMDrvHlpMMHeapFree(pDrvIns, pszTmp);
    27912790    }
     
    27972796    {
    27982797        rc = drvHstAudCaSetDevice(pThis, &pThis->OutputDevice, false /*fInput*/, false /*fNotify*/, pszTmp);
     2798        if (RT_FAILURE(rc))
     2799            LogRel(("CoreAudio: Failed to set output device to '%s' (%Rrc)\n", pszTmp, rc));
    27992800        PDMDrvHlpMMHeapFree(pDrvIns, pszTmp);
    28002801    }
     
    28072808    pThis->pIHostAudioPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIHOSTAUDIOPORT);
    28082809    AssertReturn(pThis->pIHostAudioPort, VERR_PDM_MISSING_INTERFACE_ABOVE);
     2810
     2811    rc = RTCritSectInit(&pThis->CritSect);
     2812    AssertRCReturn(rc, rc);
    28092813
    28102814#ifdef CORE_AUDIO_WITH_WORKER_THREAD
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