mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	filter-chain: Fix build error without FFTW
And some style changes while on it.
Fixes: c67232718 ("filter-chain: move fft mem function to dsp_ops")
			
			
This commit is contained in:
		
							parent
							
								
									c672327181
								
							
						
					
					
						commit
						2ab11d0f6c
					
				
					 1 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
					@ -258,21 +258,22 @@ void dsp_fft_free_c(struct dsp_ops *ops, void *fft)
 | 
				
			||||||
	pffft_destroy_setup(fft);
 | 
						pffft_destroy_setup(fft);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void *dsp_fft_memalloc_c(struct dsp_ops *ops, uint32_t size, bool real)
 | 
					void *dsp_fft_memalloc_c(struct dsp_ops *ops, uint32_t size, bool real)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef HAVE_FFTW
 | 
					#ifdef HAVE_FFTW
 | 
				
			||||||
	if (real)
 | 
						if (real)
 | 
				
			||||||
		return fftwf_alloc_real(size);
 | 
							return fftwf_alloc_real(size);
 | 
				
			||||||
	else {
 | 
						else
 | 
				
			||||||
		return fftwf_alloc_complex(size);
 | 
							return fftwf_alloc_complex(size);
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	if (real)
 | 
						if (real)
 | 
				
			||||||
		pffft_aligned_malloc(size * sizeof(float));
 | 
							return pffft_aligned_malloc(size * sizeof(float));
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		pffft_aligned_malloc(size * 2 * sizeof(float));
 | 
							return pffft_aligned_malloc(size * 2 * sizeof(float));
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void dsp_fft_memfree_c(struct dsp_ops *ops, void *data)
 | 
					void dsp_fft_memfree_c(struct dsp_ops *ops, void *data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef HAVE_FFTW
 | 
					#ifdef HAVE_FFTW
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue