Changeset 76701 in vbox
- Timestamp:
- Jan 8, 2019 11:07:10 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r76700 r76701 2023 2023 Assert(Cfg.enmDir != PDMAUDIODIR_UNKNOWN); 2024 2024 2025 if (pStream->State.pCircBuf)2026 {2027 RTCircBufDestroy(pStream->State.pCircBuf);2028 pStream->State.pCircBuf = NULL;2029 }2030 2031 rc = RTCircBufCreate(&pStream->State.pCircBuf, DrvAudioHlpMilliToBytes(100 /* ms */, &Cfg.Props)); /** @todo Make this configurable. */2032 if (RT_SUCCESS(rc))2033 {2034 ichac97R3MixerRemoveDrvStreams(pThis, pMixSink, Cfg.enmDir, Cfg.DestSource);2035 2036 rc = ichac97R3MixerAddDrvStreams(pThis, pMixSink, &Cfg);2037 if (RT_SUCCESS(rc))2038 rc = DrvAudioHlpStreamCfgCopy(&pStream->State.Cfg, &Cfg);2039 }2040 2041 2025 /* 2042 2026 * Set the stream's timer Hz rate, based on the PCM properties Hz rate. … … 2055 2039 if (pStream->State.uTimerHz) 2056 2040 Cfg.Device.uSchedulingHintMs = 1000 /* ms */ / pStream->State.uTimerHz; 2041 2042 if (pStream->State.pCircBuf) 2043 { 2044 RTCircBufDestroy(pStream->State.pCircBuf); 2045 pStream->State.pCircBuf = NULL; 2046 } 2047 2048 rc = RTCircBufCreate(&pStream->State.pCircBuf, DrvAudioHlpMilliToBytes(100 /* ms */, &Cfg.Props)); /** @todo Make this configurable. */ 2049 if (RT_SUCCESS(rc)) 2050 { 2051 ichac97R3MixerRemoveDrvStreams(pThis, pMixSink, Cfg.enmDir, Cfg.DestSource); 2052 2053 rc = ichac97R3MixerAddDrvStreams(pThis, pMixSink, &Cfg); 2054 if (RT_SUCCESS(rc)) 2055 rc = DrvAudioHlpStreamCfgCopy(&pStream->State.Cfg, &Cfg); 2056 } 2057 2057 2058 2058 /*
Note:
See TracChangeset
for help on using the changeset viewer.