Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Silk Resampler (Read 5368 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Silk Resampler

I've read a number of threads in the forums that have mentioned a GPL resampler in the Opus tools source.  Thus far the only one I was able to identify was the Silk one --> silk_resampler_init(...);silk_resampler(...); inside of resampler.c in the Silk subfolder.

Problem is, I'm having the worst time trying to figure out how to utilize it (typically for 44.1KHz CD audio) for the encoder.  The function return values are not documented, the silk_resampler_state_struct member names are cryptic at best, doesn't specify what the minimum size of the output buffer is supposed to be, and I have yet to locate where the number of output samples are stored after a call to silk_resampler(...) (the code indicates that the return value is a success/fail only signal.)  I've tried reading some of the internal code and by a cursory glance it looks like a method better suited for pulling my brains out of my right ear than it is for gleaning how to utilize the resampler. 

Is there documentation for silk_resampler somewhere that I'm just missing?  I did a Google search and all I was able to find was more of the same undocumented source code.

I will continue to kludge through the source code looking but I would very much like a short cut to the knowledge if possible.

Any help appreciated.  TIA

Silk Resampler

Reply #1
A cursory glance suggests that this code only does integer-multiple resampling.  (e.g. 48khz -> 24khz).  That might not help for your needs.  If you are looking for GPL code for resampling, libsamplerate might be your best bet.

Also, the Speex resampler is another viable option.  It's not nearly as featureful as libsamplerate, but you probably don't need all that stuff anyway.  It's BSD-licensed

Silk Resampler

Reply #2
I've read a number of threads in the forums that have mentioned a GPL resampler in the Opus tools source.  Thus far the only one I was able to identify was the Silk one --> silk_resampler_init(...);silk_resampler(...); inside of resampler.c in the Silk subfolder.


As you're saying yourself, the resampler is in "opus-tools", not the opus package. It's simply a copy of the Speex resampler with some fixes on top of it. And BTW, it's BSD-licensed, not GPL. See http://git.xiph.org/?p=opus-tools.git;a=bl...=src/resample.c