[Speex-dev] Matlab Speex library
heng at cantab.net
Mon May 31 08:02:40 PDT 2010
On Sun, 2010-05-30 at 23:52 -0300, Jader Dias wrote:
> How to decode speex encoded audio in Matlab if Google doesn't find a
> library in Matlab that does that? Do you know one? Can anyone tell me
> if Matlab can use a Speex implementation in another language? Maybe
Its not such a big deal to write a mex file for Matlab. This is a shared
library, generally written in C or C++ that can be linked into Matlab.
In effect, it allows the user to write their own low level routines that
operate with Matlab datatypes and interfaces nicely with Matlab scripts.
See the Mex help at the Matlab website:
I've done quite a bit with Mex files and I've taken to separating the
mex specific code from the rest of my code. Done correctly, it allows
one to use the normal build tools (I use CMake) to produce a static
library, which one can then link using the Matlab's mex "compiler" (the
scare quotes are because its just a wrapper around some other compiler,
e.g. gcc, but with a load of functionality removed). The advantage of
this is that one can draw on the wealth of expertise that is out there
for all the problems one invariably encounters when starting to work
with a new library, without it being a Matlab or Mex specific problem.
See section 3.2.3 at http://www.itk.org/Wiki/CMake:MatlabMex for info on
this. It should be easily adaptable to other build systems.
More information about the Speex-dev