Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
4e6214e5
Commit
4e6214e5
authored
Feb 27, 2019
by
Markus Mueller-Trapet
Browse files
bugfix (somebody needs to test their functions before committing!)
parent
20a2d372
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/SpatialAudio/ita_hoa_a2bFormat.m
View file @
4e6214e5
...
...
@@ -12,10 +12,9 @@ function [ varargout ] = ita_hoa_a2bFormat(varargin)
%
% Channel assignment outgoing: W, X, Y, Z
%
opts
.
type
In
=
1
;
% type 2 is for DPA-4 Mics, then channel assignment: FLD, FRU, BLU, BRD
opts
.
type
=
1
;
% type 2 is for DPA-4 Mics, then channel assignment: FLD, FRU, BLU, BRD
if
(
~
isa
(
varargin
{
2
},
'itaAudio'
)
)
if
nargin
<
2
||
~
isa
(
varargin
{
2
},
'itaAudio'
)
assert
(
varargin
{
1
}
.
nChannels
==
4
)
varargin
{
1
}
=
merge
(
varargin
{
1
}(:));
FLU
=
varargin
{
1
}
.
ch
(
1
);
...
...
@@ -33,20 +32,25 @@ else
error
(
'Need 4 channel input or at least 4 itaAudio inputs'
);
end
switch
type
switch
opts
.
type
case
1
W
=
FLU
+
FRD
+
BLD
+
BRU
;
X
=
FLU
+
FRD
-
BLD
-
BRU
;
Y
=
FLU
-
FRD
+
BLD
-
BRU
;
Z
=
FLU
-
FRD
-
BLD
+
BRU
;
W
=
FLU
+
FRD
+
BLD
+
BRU
;
X
=
FLU
+
FRD
-
BLD
-
BRU
;
Y
=
FLU
-
FRD
+
BLD
-
BRU
;
Z
=
FLU
-
FRD
-
BLD
+
BRU
;
case
2
W
=
FLD
+
FRU
+
BLU
+
BRD
;
X
=
FLD
+
FRU
-
BLU
-
BRD
;
Y
=
FLD
-
FRU
+
BLU
-
BRD
;
Z
=
-
FLD
+
FRU
+
BLU
-
BRD
;
W
=
FLD
+
FRU
+
BLU
+
BRD
;
X
=
FLD
+
FRU
-
BLU
-
BRD
;
Y
=
FLD
-
FRU
+
BLU
-
BRD
;
Z
=
-
FLD
+
FRU
+
BLU
-
BRD
;
end
if
nargout
==
1
W
.
channelNames
=
{
'W'
};
X
.
channelNames
=
{
'X'
};
Y
.
channelNames
=
{
'Y'
};
Z
.
channelNames
=
{
'Z'
};
if
~
nargout
||
nargout
==
1
varargout
{
1
}
=
ita_merge
(
W
,
X
,
Y
,
Z
);
else
varargout
{
1
}
=
W
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment