Changeset 64389 in vbox
- Timestamp:
- Oct 24, 2016 2:17:11 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r64387 r64389 568 568 569 569 PAUDMIXSINK pSink = ichac97IndexToSink(pThis, pStream->u8Strm); 570 AssertPtr(pSink); 570 if (!pSink) /* No sink available (yet)? Bail out early. */ 571 return VINF_SUCCESS; 571 572 572 573 const bool fIsEnabled = AudioMixerSinkGetStatus(pSink) & AUDMIXSINK_STS_RUNNING; … … 1121 1122 Log(("-> fMuted=%RTbool, lVol=%RU8, rVol=%RU8\n", fCntlMuted, lVol, rVol)); 1122 1123 1123 int rc ;1124 int rc = VINF_SUCCESS; 1124 1125 1125 1126 if (pThis->pMixer) /* Device can be in reset state, so no mixer available. */ 1126 1127 { 1127 PDMAUDIOVOLUME Vol = { fCntlMuted, lVol, rVol }; 1128 PDMAUDIOVOLUME Vol = { fCntlMuted, lVol, rVol }; 1129 PAUDMIXSINK pSink = NULL; 1130 1128 1131 switch (enmMixerCtl) 1129 1132 { 1130 1133 case PDMAUDIOMIXERCTL_VOLUME_MASTER: 1131 rc = AudioMixerSetMasterVolume(pThis->pMixer, 1134 rc = AudioMixerSetMasterVolume(pThis->pMixer, &Vol); 1132 1135 break; 1136 1133 1137 case PDMAUDIOMIXERCTL_FRONT: 1134 rc = AudioMixerSinkSetVolume(pThis->pSinkOut, &Vol);1138 pSink = pThis->pSinkOut; 1135 1139 break; 1136 1140 1137 1141 case PDMAUDIOMIXERCTL_MIC_IN: 1138 rc = AudioMixerSinkSetVolume(pThis->pSinkMicIn, &Vol);1142 pSink = pThis->pSinkMicIn; 1139 1143 break; 1140 1144 1141 1145 case PDMAUDIOMIXERCTL_LINE_IN: 1142 rc = AudioMixerSinkSetVolume(pThis->pSinkLineIn, &Vol);1146 pSink = pThis->pSinkLineIn; 1143 1147 break; 1144 1148 … … 1148 1152 break; 1149 1153 } 1150 } 1151 else 1152 rc = VINF_SUCCESS; 1154 1155 if (pSink) 1156 rc = AudioMixerSinkSetVolume(pSink, &Vol); 1157 } 1153 1158 1154 1159 ichac97MixerSet(pThis, index, uVal); … … 1942 1947 PAC97BMREGS pRegs = NULL; 1943 1948 1944 PAUDMIXSINK pSink = NULL;1945 1946 1949 if (pStream) 1947 1950 { 1948 1951 pRegs = &pStream->Regs; 1949 pSink = ichac97IndexToSink(pThis, pStream->u8Strm);1950 AssertPtr(pSink);1951 1952 1952 1953 int rc2 = RTCritSectEnter(&pStream->CritSect);
Note:
See TracChangeset
for help on using the changeset viewer.