diff --git a/src/+simulator/SimulatorInterface.m b/src/+simulator/SimulatorInterface.m index fa6e9d6..a1893e7 100644 --- a/src/+simulator/SimulatorInterface.m +++ b/src/+simulator/SimulatorInterface.m @@ -15,7 +15,7 @@ % rendering mex-function % @type function_handle % @default @ssr_binaural - Renderer = @ssr_binaural; + Renderer = @ssr_virtualwfs; % HRIR-dataset % @type DirectionalIR HRIRDataset; diff --git a/src/mex/ssr_virtualwfs.m b/src/mex/ssr_virtualwfs.m new file mode 100644 index 0000000..7c8bd28 --- /dev/null +++ b/src/mex/ssr_virtualwfs.m @@ -0,0 +1,44 @@ +function [varargout] = ssr_virtualwfs(varargin) + +isargchar(varargin{1}) + +varargout = {}; + +switch varargin{1} + case 'init' + if nargin > 3 + error('too much input arguments for "%s"', varargin{1}); + end + isargpositivescalar(varargin{2}); + + params = varargin{3}; + + % init wfs renderer + params.reproduction_setup = '8channels.asd'; + params.prefilter_file = 'wfs_prefilter_100_1300_44100.wav'; + ssr_wfs('init', varargin{2}, rmfield(params,'hrir_file')); + + % get number and positions of loudspeakers + num = ssr_wfs('out_channels'); + pos = ssr_wfs('loudspeaker_position'); + + % remove some fields from the params (just for convenience) + params = rmfield(params, {'prefilter_file', 'reproduction_setup'}); + + % init binaural renderer + ssr_binaural('init', num, params); + ssr_binaural('source_position', pos); + case 'clear' + if nargin > 1 + error('too much input arguments for "%s"', varargin{1}); + end + ssr_wfs('clear'); + ssr_binaural('clear'); + otherwise + if any(strcmp('process',varargin)) + varargout{1} = ssr_wfs(varargin{:}); + varargout{1} = ssr_binaural('process', varargout{1}); + else + ssr_wfs(varargin{:}); + end +end \ No newline at end of file diff --git a/src/mex/ssr_wfs.mexa64 b/src/mex/ssr_wfs.mexa64 new file mode 100755 index 0000000..ae3d359 Binary files /dev/null and b/src/mex/ssr_wfs.mexa64 differ diff --git a/test/8channels.asd b/test/8channels.asd new file mode 100644 index 0000000..0ba146b --- /dev/null +++ b/test/8channels.asd @@ -0,0 +1,55 @@ + + +
+ 8-channel equiangular configuration +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/test/test.xml b/test/test.xml index ef1a580..8e029e3 100644 --- a/test/test.xml +++ b/test/test.xml @@ -2,38 +2,24 @@ - - - - - - - -