mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-06 10:09:33 +02:00
Start alsa PCM
This commit is contained in:
parent
7981b6c5c8
commit
273ad96228
1 changed files with 6 additions and 0 deletions
|
@ -381,6 +381,12 @@ void AlsaPlayer::initAlsa()
|
|||
// snd_pcm_sw_params_set_stop_threshold(pcm_handle, swparams, frames_);
|
||||
snd_pcm_sw_params(handle_, swparams);
|
||||
|
||||
if (snd_pcm_state(handle_) == SND_PCM_STATE_PREPARED)
|
||||
{
|
||||
if ((err = snd_pcm_start(handle_)) < 0)
|
||||
throw SnapException("Failed to start PCM: " + string(snd_strerror(err)));
|
||||
}
|
||||
|
||||
if (ctl_ == nullptr)
|
||||
initMixer();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue