1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
use std::ffi::{CString};
use super::super::{libaudioverse_sys, server};
use super::Node;
use super::properties::{ bool_property, float_property };
use check;
use Result;
pub struct HrtfNode {
handle: libaudioverse_sys::LavHandle
}
impl Node for HrtfNode {
#[doc(hidden)]
fn get_handle(&self) -> libaudioverse_sys::LavHandle {
self.handle
}
}
impl HrtfNode {
pub fn new(server : &server::Server, hrtf_path : &CString) -> Result<HrtfNode> {
let mut node_handle : libaudioverse_sys::LavHandle = 0;
check(unsafe { libaudioverse_sys::Lav_createHrtfNode(server.handle, hrtf_path.as_ptr(), &mut node_handle) })?;
Ok(HrtfNode { handle : node_handle })
}
pub fn azimuth(&self) -> float_property::FloatProperty {
float_property::FloatProperty { index : libaudioverse_sys::Lav_PANNER_PROPERTIES_Lav_PANNER_AZIMUTH, node_handle : self.handle }
}
pub fn elevation(&self) -> float_property::FloatProperty {
float_property::FloatProperty { index : libaudioverse_sys::Lav_PANNER_PROPERTIES_Lav_PANNER_ELEVATION, node_handle : self.handle }
}
pub fn should_crossfade(&self) -> bool_property::BoolProperty {
bool_property::BoolProperty { index : libaudioverse_sys::Lav_PANNER_PROPERTIES_Lav_PANNER_SHOULD_CROSSFADE, node_handle : self.handle }
}
}