summaryrefslogtreecommitdiff
path: root/mp3lame.rs
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2013-09-28 15:23:14 -0500
committerDavid Barksdale <amatus@amatus.name>2013-09-28 15:23:14 -0500
commit60fbeeae8f13256504dc0a0bde4237e81af20cbd (patch)
tree3ed532712a4e96d361dc51174084ca27dba788d0 /mp3lame.rs
parent27cf80b860b7efb53480731e921307457a982e7f (diff)
Initializing lame parameters.
Diffstat (limited to 'mp3lame.rs')
-rw-r--r--mp3lame.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/mp3lame.rs b/mp3lame.rs
index eb7d572..627a50f 100644
--- a/mp3lame.rs
+++ b/mp3lame.rs
@@ -64,6 +64,34 @@ impl LameContext {
pub fn new() -> LameContext {
LameContext { gfp: unsafe { lame_init() }}
}
+ #[fixed_stack_segment]
+ pub fn set_in_samplerate(&self, rate: int) {
+ unsafe { lame_set_in_samplerate(self.gfp, rate as c_int) };
+ }
+ #[fixed_stack_segment]
+ pub fn set_out_samplerate(&self, rate: int) {
+ unsafe { lame_set_out_samplerate(self.gfp, rate as c_int) };
+ }
+ #[fixed_stack_segment]
+ pub fn set_num_channels(&self, channels: int) {
+ unsafe { lame_set_num_channels(self.gfp, channels as c_int) };
+ }
+ #[fixed_stack_segment]
+ pub fn set_quality(&self, quality: int) {
+ unsafe { lame_set_quality(self.gfp, quality as c_int) };
+ }
+ #[fixed_stack_segment]
+ pub fn set_bitrate(&self, rate: int) {
+ unsafe { lame_set_brate(self.gfp, rate as c_int) };
+ }
+ #[fixed_stack_segment]
+ pub fn set_disable_reservoir(&self, disable: bool) {
+ unsafe { lame_set_disable_reservoir(self.gfp, disable as c_int) };
+ }
+ #[fixed_stack_segment]
+ pub fn init_params(&self) {
+ unsafe { lame_init_params(self.gfp) };
+ }
}
impl Drop for LameContext {