mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
Fix possible noises and optimization with dmix
dmix transfers data in asynchronously so that it doesn't write on the last active period. This will allow the arbitrary buffer size in future, too. The hwsync call to slave is removed from commit and hwsync callbacks. This hack was added to fix the noisy output (typically on xmms/bmp) but it doesn't happen any more. Now the hwsync behavior is as same as on 1.0.8 (i.e. hwsync is called only when slowptr option is set).
This commit is contained in:
parent
1cd04dba82
commit
5227c7e170
3 changed files with 54 additions and 25 deletions
|
|
@ -59,6 +59,7 @@ typedef struct {
|
|||
snd_pcm_sw_params_t sw_params;
|
||||
struct {
|
||||
snd_pcm_uframes_t buffer_size;
|
||||
snd_pcm_uframes_t period_size;
|
||||
snd_pcm_uframes_t boundary;
|
||||
snd_pcm_uframes_t channels;
|
||||
unsigned int sample_bits;
|
||||
|
|
@ -85,6 +86,7 @@ struct snd_pcm_direct {
|
|||
snd_pcm_direct_share_t *shmptr; /* pointer to shared memory area */
|
||||
snd_pcm_t *spcm; /* slave PCM handle */
|
||||
snd_pcm_uframes_t appl_ptr;
|
||||
snd_pcm_uframes_t last_appl_ptr;
|
||||
snd_pcm_uframes_t hw_ptr;
|
||||
snd_pcm_uframes_t avail_max;
|
||||
snd_pcm_uframes_t slave_appl_ptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue