mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	alsa: set stride to frame size
This commit is contained in:
		
							parent
							
								
									4606d46621
								
							
						
					
					
						commit
						2fd8f0906f
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -397,13 +397,13 @@ impl_node_port_enum_params(struct spa_node *node,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		param = spa_pod_builder_object(&b,
 | 
							param = spa_pod_builder_object(&b,
 | 
				
			||||||
			SPA_TYPE_OBJECT_ParamBuffers, id,
 | 
								SPA_TYPE_OBJECT_ParamBuffers, id,
 | 
				
			||||||
			SPA_PARAM_BUFFERS_buffers, &SPA_POD_CHOICE_RANGE_Int(1, 1, MAX_BUFFERS),
 | 
								SPA_PARAM_BUFFERS_buffers, &SPA_POD_CHOICE_RANGE_Int(3, 1, MAX_BUFFERS),
 | 
				
			||||||
			SPA_PARAM_BUFFERS_blocks,  &SPA_POD_Int(1),
 | 
								SPA_PARAM_BUFFERS_blocks,  &SPA_POD_Int(1),
 | 
				
			||||||
			SPA_PARAM_BUFFERS_size,    &SPA_POD_CHOICE_RANGE_Int(
 | 
								SPA_PARAM_BUFFERS_size,    &SPA_POD_CHOICE_RANGE_Int(
 | 
				
			||||||
							this->props.max_latency * this->frame_size,
 | 
												this->props.max_latency * this->frame_size,
 | 
				
			||||||
							this->props.min_latency * this->frame_size,
 | 
												this->props.min_latency * this->frame_size,
 | 
				
			||||||
							INT32_MAX),
 | 
												INT32_MAX),
 | 
				
			||||||
			SPA_PARAM_BUFFERS_stride,  &SPA_POD_Int(0),
 | 
								SPA_PARAM_BUFFERS_stride,  &SPA_POD_Int(this->frame_size),
 | 
				
			||||||
			SPA_PARAM_BUFFERS_align,   &SPA_POD_Int(16),
 | 
								SPA_PARAM_BUFFERS_align,   &SPA_POD_Int(16),
 | 
				
			||||||
			0);
 | 
								0);
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
| 
						 | 
					@ -574,6 +574,7 @@ impl_node_port_use_buffers(struct spa_node *node,
 | 
				
			||||||
			spa_log_error(this->log, NAME " %p: need mapped memory", this);
 | 
								spa_log_error(this->log, NAME " %p: need mapped memory", this);
 | 
				
			||||||
			return -EINVAL;
 | 
								return -EINVAL;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							spa_log_debug(this->log, "alsa-sink %p: %d %p data:%p", this, i, b->buf, d[0].data);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	this->n_buffers = n_buffers;
 | 
						this->n_buffers = n_buffers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue