software/resampling: add wrapper

This commit is contained in:
meh
2015-06-08 15:53:21 +02:00
parent 2439e67fd0
commit 6c7db403f2
9 changed files with 325 additions and 0 deletions

View File

@ -0,0 +1,10 @@
use util::format;
use ::{decoder, Error, ChannelLayout};
use super::Context;
impl decoder::Audio {
pub fn resampler(&self, format: format::Sample, channel_layout: ChannelLayout, rate: u32) -> Result<Context, Error> {
Context::get(self.format(), self.channel_layout(), self.rate(),
format, channel_layout, rate)
}
}