Changeset 88429 in vbox
- Timestamp:
- Apr 9, 2021 11:12:13 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioAlsa.cpp
r88390 r88429 91 91 /** Size (in bytes) of allocated scratch buffer. */ 92 92 size_t cbBuf; 93 /** Internal stream offset (for debugging). */ 94 uint64_t offInternal; 93 95 } ALSAAUDIOSTREAM, *PALSAAUDIOSTREAM; 94 96 … … 723 725 AssertReturn(cbBuf, VERR_INVALID_PARAMETER); 724 726 AssertPtrReturn(pcbWritten, VERR_INVALID_POINTER); 725 Log4Func((" pvBuf=%p uBufSize=%#x (%u) state=%s - %s\n", pvBuf, cbBuf, cbBuf,727 Log4Func(("@%#RX64: pvBuf=%p cbBuf=%#x (%u) state=%s - %s\n", pStreamALSA->offInternal, pvBuf, cbBuf, cbBuf, 726 728 snd_pcm_state_name(snd_pcm_state(pStreamALSA->phPCM)), pStreamALSA->pCfg->szName)); 727 729 … … 761 763 cbToWrite, cFramesWritten, cFramesAvail)); 762 764 *pcbWritten = PDMAudioPropsFramesToBytes(pProps, cFramesWritten); 765 pStreamALSA->offInternal += *pcbWritten; 763 766 return VINF_SUCCESS; 764 767 } … … 800 803 cbToWrite, cFramesWritten, cFramesAvail)); 801 804 *pcbWritten = PDMAudioPropsFramesToBytes(pProps, cFramesWritten); 805 pStreamALSA->offInternal += *pcbWritten; 802 806 return VINF_SUCCESS; 803 807 } … … 1099 1103 case PDMAUDIOSTREAMCMD_PAUSE: 1100 1104 { 1105 /** @todo shouldn't this try snd_pcm_pause first? */ 1101 1106 err = snd_pcm_drop(pStreamALSA->phPCM); 1102 1107 if (err < 0) … … 1116 1121 || streamState == SND_PCM_STATE_RUNNING) 1117 1122 { 1123 /** @todo r=bird: You want EMT to block here for potentially 200-300ms worth 1124 * of buffer to be drained? That's a certifiably bad idea. */ 1118 1125 err = snd_pcm_nonblock(pStreamALSA->phPCM, 0); 1119 1126 if (err < 0)
Note:
See TracChangeset
for help on using the changeset viewer.