mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	add new API call pa_cvolume_init()
This commit is contained in:
		
							parent
							
								
									db975c7127
								
							
						
					
					
						commit
						be77bcd9ad
					
				
					 2 changed files with 19 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -47,6 +47,19 @@ int pa_cvolume_equal(const pa_cvolume *a, const pa_cvolume *b) {
 | 
			
		|||
    return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pa_cvolume* pa_cvolume_init(pa_cvolume *a) {
 | 
			
		||||
    unsigned c;
 | 
			
		||||
 | 
			
		||||
    pa_assert(a);
 | 
			
		||||
 | 
			
		||||
    a->channels = 0;
 | 
			
		||||
 | 
			
		||||
    for (c = 0; c < PA_CHANNELS_MAX; c++)
 | 
			
		||||
        a->values[c] = (pa_volume_t) -1;
 | 
			
		||||
 | 
			
		||||
    return a;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pa_cvolume* pa_cvolume_set(pa_cvolume *a, unsigned channels, pa_volume_t v) {
 | 
			
		||||
    int i;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -88,7 +101,7 @@ pa_volume_t pa_cvolume_max(const pa_cvolume *a) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
pa_volume_t pa_sw_volume_multiply(pa_volume_t a, pa_volume_t b) {
 | 
			
		||||
    return pa_sw_volume_from_linear(pa_sw_volume_to_linear(a)* pa_sw_volume_to_linear(b));
 | 
			
		||||
    return pa_sw_volume_from_linear(pa_sw_volume_to_linear(a) * pa_sw_volume_to_linear(b));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define USER_DECIBEL_RANGE 60
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue