mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-22 08:56:57 -05:00
Fixed poll() behaviour for direct plugins, also added snd_pcm_hwsync() call to start callback
This commit is contained in:
parent
bf978c3ff2
commit
c508b496b4
4 changed files with 15 additions and 5 deletions
|
|
@ -407,7 +407,6 @@ static int snd_pcm_dmix_sync_ptr(snd_pcm_t *pcm)
|
|||
}
|
||||
dmix->hw_ptr += diff;
|
||||
dmix->hw_ptr %= pcm->boundary;
|
||||
// printf("sync ptr diff = %li\n", diff);
|
||||
if (pcm->stop_threshold >= pcm->boundary) /* don't care */
|
||||
return 0;
|
||||
if ((avail = snd_pcm_mmap_playback_avail(pcm)) >= pcm->stop_threshold) {
|
||||
|
|
@ -545,6 +544,7 @@ static int snd_pcm_dmix_start(snd_pcm_t *pcm)
|
|||
if (err < 0)
|
||||
return err;
|
||||
dmix->state = SND_PCM_STATE_RUNNING;
|
||||
snd_pcm_hwsync(dmix->spcm);
|
||||
dmix->slave_appl_ptr = dmix->slave_hw_ptr = *dmix->spcm->hw.ptr;
|
||||
avail = snd_pcm_mmap_playback_hw_avail(pcm);
|
||||
if (avail < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue