mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	channelmix: always handle 1 channel as mono
Handle 1 channel as a mono channel, which gets copied to all outputs or gets the average of all inputs. Fixes the case where a mono channel is handled like a FRONT channel and then gets attenuated when mixed into left and right.
This commit is contained in:
		
							parent
							
								
									f5ec830cc2
								
							
						
					
					
						commit
						ce02c7d435
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -168,7 +168,9 @@ static int make_matrix(struct channelmix *mix)
 | 
				
			||||||
	src_mask >>= 3;
 | 
						src_mask >>= 3;
 | 
				
			||||||
	dst_mask >>= 3;
 | 
						dst_mask >>= 3;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (src_mask == 0 || dst_mask == 0) {
 | 
						/* unknown channels or just 1 channel */
 | 
				
			||||||
 | 
						if (src_mask == 0 || mix->src_chan == 1 ||
 | 
				
			||||||
 | 
						    dst_mask == 0 || mix->dst_chan == 1) {
 | 
				
			||||||
		if (src_mask == FRONT && mix->src_chan == 1) {
 | 
							if (src_mask == FRONT && mix->src_chan == 1) {
 | 
				
			||||||
			/* one FC/MONO src goes everywhere */
 | 
								/* one FC/MONO src goes everywhere */
 | 
				
			||||||
			spa_log_debug(mix->log, "distribute FC/MONO");
 | 
								spa_log_debug(mix->log, "distribute FC/MONO");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue