VirtualBox

Changeset 54968 in vbox


Ignore:
Timestamp:
Mar 26, 2015 3:33:05 PM (10 years ago)
Author:
vboxsync
Message:

DrvAudio.cpp: Fixed output stream rate conversion.

File:
1 edited

Legend:

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

    r54942 r54968  
    616616    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
    617617
    618     PPDMAUDIOSTREAMCFG pThisCfg;
     618    /*
     619     * Try figuring out which audio stream configuration this backend
     620     * should use. If fixed output is enabled the backend will be tied
     621     * to a fixed rate in (Hz), regardless of what the backend could do else.
     622     */
     623    PPDMAUDIOSTREAMCFG pBackendCfg;
    619624    if (conf.fixed_out.enabled)
    620         pThisCfg = &conf.fixed_out.settings;
     625        pBackendCfg = &conf.fixed_out.settings;
    621626    else
    622         pThisCfg = pCfg;
    623 
    624     AssertPtrReturn(pThisCfg, VERR_INVALID_POINTER);
     627        pBackendCfg = pCfg;
     628
     629    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
    625630
    626631    LogFlowFunc(("Using fixed audio output settings: %RTbool\n",
     
    635640    }
    636641
     642    /*
     643     * The host stream always will get the backend audio stream configuration.
     644     */
    637645    PPDMAUDIOHSTSTRMOUT pHstStrmOut;
    638     int rc = drvAudioAddHstOut(pThis, pszName, pThisCfg, &pHstStrmOut);
     646    int rc = drvAudioAddHstOut(pThis, pszName, pBackendCfg, &pHstStrmOut);
    639647    if (RT_FAILURE(rc))
    640648    {
     
    645653    }
    646654
    647     rc = drvAudioGstOutInit(pGstStrmOut, pHstStrmOut, pszName, pThisCfg);
     655    /*
     656     * The guest stream always will get the the audio stream configuration told
     657     * by the device emulation (which in turn was/could be set by the guest OS).
     658     */
     659    rc = drvAudioGstOutInit(pGstStrmOut, pHstStrmOut, pszName, pCfg);
    648660    if (RT_SUCCESS(rc))
    649661    {
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