mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	virtual-surround-sink: Use FFTW3 instead of naive approach
This replaces the original virtual surround sink with a total rewrite, aiming to implement any number of hrir use cases, including asymmetrical impulses as two separate left and right output files. It uses FFTW3 FFT convolution, using the overlap- save method, with full rewind support. It operates in steps equal to the resampled length of the hrir, and overlaps input blocks in increments equal to the size of the FFT block. If using paired hrirs, it requires matched sample spec and sample rates and channel maps. For best results, the input files should have speaker maps, rather than expecting the sample loader to auto detect the mapping. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/240>
This commit is contained in:
		
							parent
							
								
									5f3717f39c
								
							
						
					
					
						commit
						00bd8e1ef8
					
				
					 3 changed files with 603 additions and 291 deletions
				
			
		| 
						 | 
				
			
			@ -1268,7 +1268,6 @@ modlibexec_LTLIBRARIES += \
 | 
			
		|||
		module-loopback.la \
 | 
			
		||||
		module-virtual-sink.la \
 | 
			
		||||
		module-virtual-source.la \
 | 
			
		||||
		module-virtual-surround-sink.la \
 | 
			
		||||
		module-switch-on-connect.la \
 | 
			
		||||
		module-switch-on-port-available.la \
 | 
			
		||||
		module-filter-apply.la \
 | 
			
		||||
| 
						 | 
				
			
			@ -1530,6 +1529,11 @@ endif
 | 
			
		|||
endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_FFTW
 | 
			
		||||
modlibexec_LTLIBRARIES += \
 | 
			
		||||
		module-virtual-surround-sink.la
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_DBUS
 | 
			
		||||
if HAVE_FFTW
 | 
			
		||||
modlibexec_LTLIBRARIES += \
 | 
			
		||||
| 
						 | 
				
			
			@ -1775,9 +1779,9 @@ module_virtual_source_la_LDFLAGS = $(MODULE_LDFLAGS)
 | 
			
		|||
module_virtual_source_la_LIBADD = $(MODULE_LIBADD)
 | 
			
		||||
 | 
			
		||||
module_virtual_surround_sink_la_SOURCES = modules/module-virtual-surround-sink.c
 | 
			
		||||
module_virtual_surround_sink_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) -DPA_MODULE_NAME=module_virtual_surround_sink
 | 
			
		||||
module_virtual_surround_sink_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) $(FFTW_CFLAGS) -DPA_MODULE_NAME=module_virtual_surround_sink
 | 
			
		||||
module_virtual_surround_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
 | 
			
		||||
module_virtual_surround_sink_la_LIBADD = $(MODULE_LIBADD)
 | 
			
		||||
module_virtual_surround_sink_la_LIBADD = $(MODULE_LIBADD) $(FFTW_LIBS)
 | 
			
		||||
 | 
			
		||||
# X11
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -61,7 +61,6 @@ all_modules = [
 | 
			
		|||
  [ 'module-tunnel-source-new', 'module-tunnel-source-new.c' ],
 | 
			
		||||
  [ 'module-virtual-sink', 'module-virtual-sink.c' ],
 | 
			
		||||
  [ 'module-virtual-source', 'module-virtual-source.c' ],
 | 
			
		||||
  [ 'module-virtual-surround-sink', 'module-virtual-surround-sink.c' ],
 | 
			
		||||
  [ 'module-volume-restore', 'module-volume-restore.c' ],
 | 
			
		||||
#  [ 'module-waveout', 'module-waveout.c' ],
 | 
			
		||||
]
 | 
			
		||||
| 
						 | 
				
			
			@ -137,6 +136,12 @@ if dbus_dep.found()
 | 
			
		|||
  ]
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if fftw_dep.found()
 | 
			
		||||
  all_modules += [
 | 
			
		||||
    [ 'module-virtual-surround-sink', 'module-virtual-surround-sink.c', [], [], [fftw_dep, libm_dep] ],
 | 
			
		||||
  ]
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if dbus_dep.found() and fftw_dep.found()
 | 
			
		||||
  all_modules += [
 | 
			
		||||
    [ 'module-equalizer-sink', 'module-equalizer-sink.c', [], [], [dbus_dep, fftw_dep, libm_dep] ],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue