Convert the samplerate of PCM audio data using libsamplerate (AKA "Secret Rabbit Code".)
Clone or download
Latest commit ccc5687 Nov 4, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Add more fully featured example Aug 12, 2015
lib/Audio/Convert Up version Apr 26, 2016
t Skip test if no library Apr 26, 2016
.gitignore Add .precomp to .gitignore Dec 17, 2015
.travis.yml Alter travis config to use zef Aug 2, 2017
Changes Add changes Nov 4, 2017
Documentation.md Forgot these things Apr 26, 2016
LICENCE rename LICENCE as en_GB May 30, 2016
META6.json Fix licence Apr 22, 2017
README.md No panda Aug 22, 2017

README.md

Audio::Convert::Samplerate

Convert the samplerate of PCM audio data using libsamplerate (AKA "Secret Rabbit Code".)

Build Status

Description

This provides a mechanism for doing sample rate conversion of PCM audio data using libsamplerate (http://www.mega-nerd.com/libsamplerate/) the implementation of which is both fairly quick and accurate.

The interface is fairly simple, providing methods to work with native C arrays where the raw speed is important as well as perl arrays where further processing is required on the data.

The native library is designed to work only with 32 bit floating point samples so working with other sample types requires some conversion and a subsequent small loss of efficiency (although the int and short to float conversions are done in C code and so are reasonably quick.) There is no support for 64 bit int (long) or float (double) data.

The full documentation is available as POD or Markdown

Installation

You will need to have "libsamplerate" installed on your system in order to be able to use this. Most Linux distributions offer it as a package, though it is such a common dependency for multimedia applications that you may well already have it installed.

If you are on some platform that doesn't provide libsamplerate as a package then you may be able to install it from source:

http://www.mega-nerd.com/libsamplerate/download.html

I am however unlikely to be able to offer help with installing it this way.

Assuming you have a working perl6 installation you should be able to install this with zef :

# From the source directory

zef install .

# Remote installation

zef install Audio::Convert::Samplerate

Other install mechanisms may be become available in the future.

Support

Suggestions/patches are welcomed via github at

https://github.com/jonathanstowe/Audio-Convert-Samplerate/issues

Licence

Please see the LICENCE file in the distribution

© Jonathan Stowe 2015, 2016, 2017