From 0123a2780c01a859a2166863c68f7dd073cccb82 Mon Sep 17 00:00:00 2001
From: "Dipl.-Ing. Jonas Stienen" <jst@akustik.rwth-aachen.de>
Date: Thu, 6 Dec 2018 09:47:49 +0100
Subject: [PATCH] Added additionally input format

---
 applications/SpatialAudio/ita_hoa_a2bFormat.m | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/applications/SpatialAudio/ita_hoa_a2bFormat.m b/applications/SpatialAudio/ita_hoa_a2bFormat.m
index 3ad0afa0..1ba9ac98 100644
--- a/applications/SpatialAudio/ita_hoa_a2bFormat.m
+++ b/applications/SpatialAudio/ita_hoa_a2bFormat.m
@@ -1,12 +1,26 @@
-function [bformat] = ita_hoa_a2bFormat(FLU, FRD, BLD, BRU)
+function [bformat] = ita_hoa_a2bFormat(varargin)
 %ITA_HOA_A2BFORMAT Converts an A-Format recording to  B-Format
+%FLU,FRD,BLD,BRU
 %   Detailed explanation goes here
 % Back Right Up (BRU);
 % Front Left Up (FLU);
 % Front Right Down (FRD);
 % Back Left Down (BLD);
+if nargin == 4
+    FLU=varargin{1};
+    FRD=varargin{2};
+    BLD=varargin{3};
+    BRU=varargin{4};
+elseif nargin == 1
+    FLU=varargin{1}.ch(1);
+    FRD=varargin{1}.ch(2);
+    BLD=varargin{1}.ch(3);
+    BRU=varargin{1}.ch(4);
+else
+    error('Need 4 channel input or 4 inputs');
+end
 
-
+    
 type=1; % type 2 is for DPA-4 Mics
 
 switch type
-- 
GitLab