mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	pcm: rate - use pcm_frame_diff() in snd_pcm_rate_playback_internal_delay()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
		
							parent
							
								
									6cee452eab
								
							
						
					
					
						commit
						fc0f7af9ee
					
				
					 1 changed files with 1 additions and 5 deletions
				
			
		| 
						 | 
					@ -612,11 +612,7 @@ static snd_pcm_uframes_t snd_pcm_rate_playback_internal_delay(snd_pcm_t *pcm)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	snd_pcm_rate_t *rate = pcm->private_data;
 | 
						snd_pcm_rate_t *rate = pcm->private_data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (rate->appl_ptr < rate->last_commit_ptr) {
 | 
						return pcm_frame_diff(rate->appl_ptr, rate->last_commit_ptr, pcm->boundary);
 | 
				
			||||||
		return rate->appl_ptr - rate->last_commit_ptr + pcm->boundary;
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		return rate->appl_ptr - rate->last_commit_ptr;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int snd_pcm_rate_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
 | 
					static int snd_pcm_rate_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue