projects
/
nihav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d532000
)
more utility code for formats.rs
author
Kostya Shishkov
<kostya.shishkov@gmail.com>
Tue, 23 May 2017 17:09:30 +0000
(19:09 +0200)
committer
Kostya Shishkov
<kostya.shishkov@gmail.com>
Tue, 23 May 2017 17:11:21 +0000
(19:11 +0200)
src/formats.rs
patch
|
blob
|
blame
|
history
diff --git
a/src/formats.rs
b/src/formats.rs
index 03e6411bf107e4e5e12cb7a8d73738db8f205d37..aa053b2e75f55df7eb5cf6b7e0b64b3121a89a35 100644
(file)
--- a/
src/formats.rs
+++ b/
src/formats.rs
@@
-59,7
+59,7
@@
impl fmt::Display for NASoniton {
}
}
-#[derive(Debug,Clone,Copy)]
+#[derive(Debug,Clone,Copy
,PartialEq
)]
pub enum NAChannelType {
C, L, R, Cs, Ls, Rs, Lss, Rss, LFE, Lc, Rc, Lh, Rh, Ch, LFE2, Lw, Rw, Ov, Lhs, Rhs, Chs, Ll, Rl, Cl, Lt, Rt, Lo, Ro
}
@@
-142,6
+142,11
@@
impl NAChannelMap {
pub fn add_channel(&mut self, ch: NAChannelType) {
self.ids.push(ch);
}
+ pub fn add_channels(&mut self, chs: &[NAChannelType]) {
+ for i in 0..chs.len() {
+ self.ids.push(chs[i]);
+ }
+ }
pub fn num_channels(&self) -> usize {
self.ids.len()
}