- Timestamp:
- Jul 10, 2018 4:06:45 PM (7 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixer.cpp
r70640 r73039 811 811 } 812 812 813 #ifdef VBOX_AUDIO_MIXER_DEBUG 814 DrvAudioHlpFileDestroy(pSink->Dbg.pFile); 815 pSink->Dbg.pFile = NULL; 816 #endif 817 813 818 if (pSink->pszName) 814 819 { … … 1157 1162 # error "Implement me!" 1158 1163 #else 1164 Assert(cbRead <= cbBuf); 1159 1165 if (cbRead) 1160 1166 memcpy(pvBuf, pvMixBuf, cbRead); 1161 1167 #endif 1168 1169 #ifdef VBOX_AUDIO_MIXER_DEBUG 1170 int rc2 = DrvAudioHlpFileWrite(pSink->Dbg.pFile, pvBuf, cbRead, 0 /* fFlags */); 1171 AssertRC(rc2); 1172 #endif 1162 1173 if (pcbRead) 1163 1174 *pcbRead = cbRead; … … 1167 1178 RTMemFree(pvMixBuf); 1168 1179 #endif 1169 1170 1180 1171 1181 #ifdef LOG_ENABLED … … 1401 1411 } 1402 1412 #endif /* VBOX_AUDIO_MIXER_WITH_MIXBUF */ 1413 1414 #ifdef VBOX_AUDIO_MIXER_DEBUG 1415 if (RT_SUCCESS(rc)) 1416 { 1417 DrvAudioHlpFileClose(pSink->Dbg.pFile); 1418 1419 char szTemp[RTPATH_MAX]; 1420 int rc2 = RTPathTemp(szTemp, sizeof(szTemp)); 1421 if (RT_SUCCESS(rc2)) 1422 { 1423 /** @todo Sanitize sink name. */ 1424 1425 char szName[64]; 1426 RTStrPrintf(szName, sizeof(szName), "MixerSink-%s", pSink->pszName); 1427 1428 char szFile[RTPATH_MAX + 1]; 1429 rc2 = DrvAudioHlpGetFileName(szFile, RT_ELEMENTS(szFile), szTemp, szName, 1430 0 /* Instance */, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAG_NONE); 1431 if (RT_SUCCESS(rc2)) 1432 { 1433 rc2 = DrvAudioHlpFileCreate(PDMAUDIOFILETYPE_WAV, szFile, PDMAUDIOFILE_FLAG_NONE, 1434 &pSink->Dbg.pFile); 1435 if (RT_SUCCESS(rc2)) 1436 rc2 = DrvAudioHlpFileOpen(pSink->Dbg.pFile, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS, &pSink->PCMProps); 1437 } 1438 } 1439 } 1440 #endif 1403 1441 1404 1442 int rc2 = RTCritSectLeave(&pSink->CritSect); -
trunk/src/VBox/Devices/Audio/AudioMixer.h
r69500 r73039 192 192 /** Timestamp (in ms) since last update. */ 193 193 uint64_t tsLastUpdatedMS; 194 #ifdef VBOX_AUDIO_MIXER_DEBUG 195 struct 196 { 197 PPDMAUDIOFILE pFile; 198 } Dbg; 199 #endif 194 200 } AUDMIXSINK, *PAUDMIXSINK; 195 201
Note:
See TracChangeset
for help on using the changeset viewer.