Changeset 89449 in vbox
- Timestamp:
- Jun 1, 2021 11:37:30 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioAlsa.cpp
r89258 r89449 501 501 AssertLogRelMsgReturn(err >= 0, ("ALSA: Failed to get start threshold: %s\n", snd_strerror(err)), err); 502 502 503 LogRel2(("ALSA: SW params: % ul frames threshold, %ulframe avail minimum\n",503 LogRel2(("ALSA: SW params: %lu frames threshold, %lu frame avail minimum\n", 504 504 pCfgObt->threshold, pCfgReq->period_size)); 505 505 return 0; … … 548 548 err = snd_pcm_hw_params_set_channels_near(hPCM, pHWParms, &cChannels); 549 549 AssertLogRelMsgReturn(err >= 0, ("ALSA: Failed to set number of channels to %d\n", pCfgReq->cChannels), err); 550 AssertLogRelMsgReturn(cChannels == 1 || cChannels == 2, ("ALSA: Number of audio channels (%u) not supported\n", cChannels), -1);551 550 pCfgObt->cChannels = cChannels; 552 551 … … 1129 1128 PDMHOSTAUDIOSTREAMSTATE enmStreamState = PDMHOSTAUDIOSTREAMSTATE_OKAY; 1130 1129 snd_pcm_state_t enmAlsaState = snd_pcm_state(pStreamALSA->hPCM); 1130 if (enmAlsaState == SND_PCM_STATE_DRAINING) 1131 { 1132 /* We're operating in non-blocking mode, so we must (at least for a demux 1133 config) call snd_pcm_drain again to drive it forward. Otherwise we 1134 might be stuck in the drain state forever. */ 1135 Log5Func(("Calling snd_pcm_drain again...\n")); 1136 snd_pcm_drain(pStreamALSA->hPCM); 1137 enmAlsaState = snd_pcm_state(pStreamALSA->hPCM); 1138 } 1139 1131 1140 if (enmAlsaState == SND_PCM_STATE_DRAINING) 1132 1141 enmStreamState = PDMHOSTAUDIOSTREAMSTATE_DRAINING;
Note:
See TracChangeset
for help on using the changeset viewer.