mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	volume: Decrease PA_VOLUME_MAX to be < 2^31
This decrease PA_VOLUME_MAX to be less than 2^31. We want to do this in order to simplify signed arithmetic when applying software volume scaling (since the volume can now always be safely treated as a signed number).
This commit is contained in:
		
							parent
							
								
									3265424f27
								
							
						
					
					
						commit
						179b291b18
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -113,7 +113,7 @@ typedef uint32_t pa_volume_t;
 | 
				
			||||||
#define PA_VOLUME_MUTED ((pa_volume_t) 0U)
 | 
					#define PA_VOLUME_MUTED ((pa_volume_t) 0U)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Maximum valid volume we can store. \since 0.9.15 */
 | 
					/** Maximum valid volume we can store. \since 0.9.15 */
 | 
				
			||||||
#define PA_VOLUME_MAX ((pa_volume_t) UINT32_MAX-1)
 | 
					#define PA_VOLUME_MAX ((pa_volume_t) UINT32_MAX/2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Special 'invalid' volume. \since 0.9.16 */
 | 
					/** Special 'invalid' volume. \since 0.9.16 */
 | 
				
			||||||
#define PA_VOLUME_INVALID ((pa_volume_t) UINT32_MAX)
 | 
					#define PA_VOLUME_INVALID ((pa_volume_t) UINT32_MAX)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue