mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pw-cat: read and write raw formats correctly
We need to transform the number of bytes into frames.
This commit is contained in:
		
							parent
							
								
									0b62cea4f9
								
							
						
					
					
						commit
						d1ee783322
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -196,7 +196,7 @@ static int sf_playback_fill_x8(struct data *d, void *dest, unsigned int n_frames
 | 
			
		|||
	sf_count_t rn;
 | 
			
		||||
 | 
			
		||||
	rn = sf_read_raw(d->file, dest, n_frames * d->stride);
 | 
			
		||||
	return (int)rn;
 | 
			
		||||
	return (int)rn / d->stride;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int sf_playback_fill_s16(struct data *d, void *dest, unsigned int n_frames)
 | 
			
		||||
| 
						 | 
				
			
			@ -278,7 +278,7 @@ static int sf_record_fill_x8(struct data *d, void *src, unsigned int n_frames)
 | 
			
		|||
	sf_count_t rn;
 | 
			
		||||
 | 
			
		||||
	rn = sf_write_raw(d->file, src, n_frames * d->stride);
 | 
			
		||||
	return (int)rn;
 | 
			
		||||
	return (int)rn / d->stride;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int sf_record_fill_s16(struct data *d, void *src, unsigned int n_frames)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue