projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d83521
)
move check for n_speakers so that we avoid needless work
author
Paul Davis
<paul@linuxaudiosystems.com>
Wed, 29 Jan 2014 20:50:17 +0000
(15:50 -0500)
committer
Paul Davis
<paul@linuxaudiosystems.com>
Wed, 29 Jan 2014 20:50:17 +0000
(15:50 -0500)
libs/panners/vbap/vbap_speakers.cc
patch
|
blob
|
history
diff --git
a/libs/panners/vbap/vbap_speakers.cc
b/libs/panners/vbap/vbap_speakers.cc
index 79f5b230f7bd46da0148b964c1446a1fcbe6e598..1cf78797b74bb618223c019484ce8c8a495aba2b 100644
(file)
--- a/
libs/panners/vbap/vbap_speakers.cc
+++ b/
libs/panners/vbap/vbap_speakers.cc
@@
-116,6
+116,11
@@
VBAPSpeakers::choose_speaker_triplets(struct ls_triplet_chain **ls_triplets)
int i,j,k,l,table_size;
int n_speakers = _speakers.size ();
+
+ if (n_speakers == 0) {
+ return;
+ }
+
/* variable length arrays arrived in C99, became optional in C11, and
are only planned for C++14. Use alloca which is functionally
identical (but uglier to read).
@@
-131,10
+136,6
@@
VBAPSpeakers::choose_speaker_triplets(struct ls_triplet_chain **ls_triplets)
connections[i] = 0;
}
- if (n_speakers == 0) {
- return;
- }
-
for (i = 0; i < n_speakers; i++) {
for (j = i+1; j < n_speakers; j++) {
for(k = j+1; k < n_speakers; k++) {