mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	pcm, null: use the snd_pcm_mmap_avail function
instead of the open-coded equivalent Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
		
							parent
							
								
									0889e94706
								
							
						
					
					
						commit
						4fafa468d4
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
					@ -86,10 +86,7 @@ static snd_pcm_sframes_t snd_pcm_null_avail_update(snd_pcm_t *pcm)
 | 
				
			||||||
        if (null->state == SND_PCM_STATE_PREPARED) {
 | 
					        if (null->state == SND_PCM_STATE_PREPARED) {
 | 
				
			||||||
                /* it is required to return the correct avail count for */
 | 
					                /* it is required to return the correct avail count for */
 | 
				
			||||||
                /* the prepared stream, otherwise the start is not called */
 | 
					                /* the prepared stream, otherwise the start is not called */
 | 
				
			||||||
                if (pcm->stream == SND_PCM_STREAM_PLAYBACK)
 | 
					                return snd_pcm_mmap_avail(pcm);
 | 
				
			||||||
                        return snd_pcm_mmap_playback_avail(pcm);
 | 
					 | 
				
			||||||
                else
 | 
					 | 
				
			||||||
                        return snd_pcm_mmap_capture_avail(pcm);
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
	return pcm->buffer_size;
 | 
						return pcm->buffer_size;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue