mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Fix block_size calculation
This commit is contained in:
		
							parent
							
								
									b5c4d2e5f1
								
							
						
					
					
						commit
						e545479563
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -445,17 +445,16 @@ static int bt_setconf(struct userdata *u) {
 | 
			
		|||
 | 
			
		||||
    u->transport = setconf_rsp->transport;
 | 
			
		||||
    u->link_mtu = setconf_rsp->link_mtu;
 | 
			
		||||
    if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP)
 | 
			
		||||
        /* TODO: Check the max possible size */ u->block_size = u->link_mtu / 2;
 | 
			
		||||
    else
 | 
			
		||||
        u->block_size = u->link_mtu;
 | 
			
		||||
 | 
			
		||||
    /* setup SBC encoder now we agree on parameters */
 | 
			
		||||
    if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP) {
 | 
			
		||||
        bt_a2dp_setup(&u->a2dp);
 | 
			
		||||
        u->block_size = u->a2dp.codesize;
 | 
			
		||||
        pa_log/*debug*/("\tallocation=%u\n\tsubbands=%u\n\tblocks=%u\n\tbitpool=%u\n",
 | 
			
		||||
                u->a2dp.sbc.allocation, u->a2dp.sbc.subbands, u->a2dp.sbc.blocks, u->a2dp.sbc.bitpool);
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
        u->block_size = u->link_mtu;
 | 
			
		||||
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue