Activity for The SoX Resampler library

  • Rudi Heitbaum Rudi Heitbaum created merge request #6 on Code

    Allow build with cmake 4.0.0

  • dofu dofu posted a comment on discussion General Discussion

    Now this patch is being intensively used by Python-SoXR and seems like working fine. I'm maintaing libsoxr in my personal repository. https://github.com/dofuuz/soxr/

  • Jin Jin posted a comment on discussion General Discussion

    Hi robs, i got problems compiling on cubox-i (https://wiki.gentoo.org/wiki/Cubox-i, https://archlinuxarm.org/platforms/armv7/freescale/cubox-i). Compiling on gentoo with emerge (test gets disabled...) succeeded, but i get "illegal instruction (core dumped)" when using the lib. Investigated with gdb: 0xb5a28ef0 in pffft_real_finalize $ layout asm 0xb5a28ef0 <pffft_real_finalize+360> vfnma.f32 s6, s15, s8 Compiling manually, the test fail (Tests: 1 - 4: Failed, 9-10: Exception: Illegal). I can fix...

  • Reinier Balt Reinier Balt posted a comment on discussion General Discussion

    Hi, I’m working on using soxr_output with float64S (separated channels, https://github.com/lrbalt/libsoxr-rs/issues/7). I’m getting a signal: 11, SIGSEGV: invalid memory reference. I supply a pointer to an array of pointers, like in 4-split-channels.c example. But if I look at the code here: https://github.com/chirlu/soxr/blob/master/src/soxr.c#L716 the pointer to out is changed as if out is a pointer to a buffer, not a pointer to an array of pointers to a buffer. If you look at the call to soxr_output_no_callback...

  • dofu dofu posted a comment on discussion General Discussion

    In system that 'unsigned long' is 32-bit(i.e. Windows, 32-bit Linux), dithering is not working as expected. In those systems, dithering has pattern of every 16 samples. Later 8 samples are always ±0. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1...

  • Peter Hebert Peter Hebert modified a comment on discussion General Discussion

    How many frames does soxr output if, given ilen input frames, olen = ilen*orate/irate is not an integer? I'm working on an application where I'm streaming data in and out on stdio (like examples 2 and 3), and need to output a WAV header before soxr's output -- which requires knowing the exact number of output frames in advance, since I can't seek on stdout to patch up the header later. (This is assuming constant-rate files, of course.)

  • Peter Hebert Peter Hebert posted a comment on discussion General Discussion

    How many frames does soxr output if, given ilen input frames, olen = ilen*orate/irate is not an integer? I'm working on an application where I'm streaming data in and out on stdio (like examples 2 and 3), and need to output a WAV header before soxr's output -- which requires knowing the exact number of output frames in advance, since I can't seek on stdout to patch up the header later.

  • Glenn Newell Glenn Newell posted a comment on discussion General Discussion

    Well for those that come after... I believe this occurs because the resampler sees the buffer edges as discontinuities in the audio data. E.g. the first sample in the buffer is seen as having an infinite rise time from the "previous" sample, which causes and overshoot and high frequency ringing in the upsampled audio. So, I fixed the problem by making the buffer 100 samples larger than needed, and filling the first 50 buffer locations with a copy of the first sample, and the last 50 locations with...

  • Glenn Newell Glenn Newell posted a comment on discussion General Discussion

    I'm getting a little "glitch" or "pop" at the start of each buffer when upsampling and streaming, using code similar to example 2. https://drive.google.com/file/d/1DhNIO6c50qhG-cEYvRGFjrpojy9iJsx3/view?usp=sharing https://drive.google.com/file/d/12GyS9hpyTjeTK5wmc9x7drNds4avFSTH/view?usp=sharing How can I avoid this? void sox_upsample(float * input_sample_buff, float * upsample_buff,sf_count_t insize) { size_t ilen = (size_t)(insize / 2); // insize is the interleaved stereo count of samples read...

  • Ste Ste posted a comment on discussion General Discussion

    Hi! Great library, awesome work! Wonder if I can get some feedback on whether I am license compliant? I am looking to include this excellent library in a Android Unity plugin which would be sold commercially (on the Unity asset store) and then used by other developers to create Android applications that may then be sold on the Google Play Store, etc. I am compiling the SoXR source unmodified to an SO shared library This is then used by another library, which also creates a shared SO library and java...

  • klslz klslz posted a comment on discussion General Discussion

    I just built and installed libsoxr form latest sources. Somehow libsoxr 0.1.3. gets installed as libsoxr.so.0.1.2 I was expecting libsoxr.so.0.1.3 My Arch Linux package actually does the same. I guess the revision info needs to be stepped up. Thx

  • klslz klslz posted a comment on discussion General Discussion

    How do I know that ARM Neon support gets enabled during build? There don't seem to be any OPTS that can turn NEON on or off like SIMD/SSE etc. There's no inidication that it gets enabled. Is there a difference between ARM NEON 32/64 ? E.g. SIMD does differentiate. THX

  • Misty De Meo Misty De Meo created merge request #5

    Ensure ARM code checks for __arm64__, not just __arm__

  • Alexandre Janniaux Alexandre Janniaux created merge request #4

    Enable NEON on aarch64

  • Rosen Penev Rosen Penev posted a comment on merge request #3

    No idea what you mean.

  • John Paul Adrian Glaubitz John Paul Adrian Glaubitz posted a comment on merge request #3

    While being at the pkg-config stuff, I noticed that building with "-DBUILD_EXAMPLES=1" results in a broken soxr.pc file. Is this intentional or can this be fixed as well?

  • Fabrice Fontaine Fabrice Fontaine posted a comment on merge request #2

    This patch has been replaced by a better solution: https://git.buildroot.net/buildroot/tree/package/libsoxr/0001-Add-Libs.private-for-static-linking.patch. I'll update the merge request.

  • Rosen Penev Rosen Penev created merge request #3

    Fixup pkgconfig file for consistency

  • Rosen Penev Rosen Penev posted a comment on merge request #2

    I think you're missing -l in the front?

  • robs robs posted a comment on discussion General Discussion

    Hello, but this is not the right list for your question. Please use https://sourceforge.net/projects/sox/lists/sox-users

  • Praytush Praytush posted a comment on discussion General Discussion

    Hello all, I am comparing the original(noisy) sound file with noise reduced file (noise profiling followed by reducing the noise) using the sox wrapper in python. However, I am unable to do so because the length of the noise reduced audio is lesser than the original (noisy) file. I am not sure why is the length of the file getting trimmed and I would like to know if there is any way I could stop this from happening.

  • robs robs posted a comment on discussion General Discussion

    Hello there, I'm not aware of such a wrapper, but I wonder if using python’s popen facility to pipe data through libsoxr’s example # 3 (a stand-alone process with most of libsoxr options available on the command line) might work here?

  • tommytao tommytao posted a comment on discussion General Discussion

    Or python wrapper of libsoxr ? Thanks in advance

  • Philippe Philippe posted a comment on discussion General Discussion

    Hi Robs - Thanks very much for taking the time to answer. I've tried these parameters but it's still a bit too much CPU when I want to resample from 96 to 44.1, so I'add a very basic fixed point interpolation and/or simple filter for higher rates when I cannot use soxr Thanks again

  • robs robs posted a comment on discussion General Discussion

    Hello Philippe, I suggest the following: 1. Disable all the WITH_xxx build options, except for WITH_CR32. 2. Use SOXR_NO_DITHER in soxr_io_spec. 3. Try using the MQ recipe for soxr_quality_spec (which can in fact be more efficient than LQ in some circumstances). 3. Try overriding passband_end to 0.8 and stopband_begin to 1.2 in soxr_quality_spec (or even .75, 1.25). That's as much as I can think of at the moment (though I did experiment with IIR filters at one time but it didn't yield any improvement)—hope...

  • Philippe Philippe posted a comment on discussion General Discussion

    Hi - First, thanks for soxr, I've used it in many projects. I'm now using it on the esp32 processor. It cross-compile and works fine, but the esp32 is not the most power system (although it has a 32 bits FPU) and it does a lot of other things in my application. I'm trying to find the lowest CPU footprint (not memory, but cycles) and I'm not sure I've got everything right. I'm using16 bits, LQ which I think means only float (not double are used) but when I'm changing rolloff and phase to minimum or...

  • robs robs posted a comment on discussion General Discussion

    Aliasing is selected by setting the stopband_begin parameter (see soxr.h) to a value >1. With the default passband_end setting of 0.913, setting stopband_begin 1.087 gives a half-band response i.e. aliasing above the passband. Whereas setting it to 1.05 should mimic the SoX "allow aliasing" setting (which allows aliasing only above the 3dB point).

  • robs robs posted a comment on discussion General Discussion

    Maybe. Though still not sure why it works for me and not for you. Perhaps due to different versions. I can try again with ubuntu 19.04 once it comes out in a couple of weeks time.

  • Ha-gong Saak Ha-gong Saak posted a comment on discussion General Discussion

    What parameters need to be set if I want to enable aliasing like in SoX ?

  • Con Kolivas Con Kolivas posted a comment on discussion General Discussion

    I did a little bit more poking around to see what the cut off was before this problem kicks in and the steepest I can set the filter is 1 - .02 / lsx_to_3dB(rej). As soon as I set it to 1 - .01 or steeper it starts having this problem. My guess is pulseaudio is trying to adapt to the predicted extra latency somehow and failing, but I'm no expert on pulse.

  • Con Kolivas Con Kolivas modified a comment on discussion General Discussion

    I've attached a screenshot of running that script. As you can see, there is basically zero time in the frequency spectrum graph. The resultant file is only 80 bytes long compared to the original 3175280 bytes.

  • Con Kolivas Con Kolivas posted a comment on discussion General Discussion

    I've attached a screenshot of running that script. As you can see, there is basically zero time in the frequency graph.

  • robs robs posted a comment on discussion General Discussion

    I tested on Ubuntu 18.10 with your daemon settings sbove and SOXR_STEEP_FILTER forced on in the soxr code and audio played normally. I then used the following script to capture some resampled output; the resulting spectrogram shows that all is as expected: steep filter is being applied and no distortion occurring. Please can you try the same script and report the result? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20#!/bin/sh set -e sink_name=capture rate=96000 format=s24 pactl load-module module-null-sink...

  • Con Kolivas Con Kolivas modified a comment on discussion General Discussion

    And in pulseaudio source to try and add the steep filter, src/pulsecore/resampler/soxr.c line 152 add: quality_recipe |= SOXR_STEEP_FILTER; or of course you could just hard wire the SOXR_STEEP_FILTER on in soxr code.

  • Con Kolivas Con Kolivas posted a comment on discussion General Discussion

    And in pulseaudio source to try and add the steep filter, src/pulsecore/resampler/soxr.c line 152 add: quality_recipe |= SOXR_STEEP_FILTER;

  • Con Kolivas Con Kolivas posted a comment on discussion General Discussion

    /etc/pulse/daemon.conf : default-sample-format = s24le resample-method = soxr-vhq default-sample-rate = 96000 alternate-sample-rate = 88200

  • robs robs posted a comment on discussion General Discussion

    Please can you provide details of your pulseaudio config files (and alsa if appropriate).

  • robs robs posted a comment on discussion General Discussion

    Hello again, I'll try to look into this sometime in the next week.

  • Con Kolivas Con Kolivas modified a comment on discussion General Discussion

    Sorry to bring this up again, but I've tried modifying pulseaudio with sox-vhq to quality_recipe |= SOXR_STEEP_FILTER without any other changes and I just get scrambled playback (100x speed) when using sox-vhq. Is this a pulse issue?

  • Con Kolivas Con Kolivas modified a comment on discussion General Discussion

    Sorry to bring this up again, but I've tried modifying pulseaudio with sox-vhq to quality_recipe |= SOXR_STEEP_FILTER without any other changes and I just get scrambled playback (10x speed) when using sox-vhq. Is this a pulse issue?

  • Con Kolivas Con Kolivas posted a comment on discussion General Discussion

    Sorry to bring this up again, but I've tried modifying pulseaudio with sox-vhq to quality_recipe |= SOXR_STEEP_FILTER and I just get scrambled playback (10x speed). Is this a pulse issue?

  • Con Kolivas Con Kolivas modified a comment on discussion General Discussion

    Okay, must be me misusing it then since I'm trying to use it with pulseaudio resampling by just adding the SOXR_STEEP_FILTER flag to soxr_quality_spec() and something goes wrong and playback is scrambled at 10x speed. I don't have an issue when using just sox by itself. Thanks for your time.

  • Con Kolivas Con Kolivas modified a comment on discussion General Discussion

    I don't understand the sox syntax enough to know, but I can't really see the steep command line there, but okay, must be me misusing it then since I'm trying to use it with pulseaudio resampling by just adding the SOXR_STEEP_FILTER flag to soxr_quality_spec() and something goes wrong and playback is scrambled at 10x speed. Thanks for your time.

  • Con Kolivas Con Kolivas posted a comment on discussion General Discussion

    Okay, must be me misusing it then since I'm trying to use it with pulseaudio resampling by just adding the SOXR_STEEP_FILTER flag to soxr_quality_spec() and something goes wrong and playback is scrambled at 10x speed. Thanks for your time.

  • robs robs posted a comment on discussion General Discussion

    In the example I gave, sox is being used only to generate, then analyze the audio. The resampling is being done by libsoxr, using one of the example programs provided with libsoxr.

  • Con Kolivas Con Kolivas posted a comment on discussion General Discussion

    Not with sox directly; sox works fine, but with libsoxr only.

  • robs robs posted a comment on discussion General Discussion

    I don't think that resampling is what you need in this case. Try perhaps using the tempo effect from the sox library, or using the soundtouch library (which is similar).

  • robs robs posted a comment on discussion General Discussion

    I'm not seeing any problem with this here. For example, using one of the soxr examples, with and without steep filter: sox -r96k -n 0.f32 synth 8 sin 0:48k gain -1 ./3-options-input-fn 1 2 1 0 0 4 < 0.f32 >1.f32 ./3-options-input-fn 1 2 1 0 0 44 < 0.f32 >2.f32 sox -M -r192k -c1 "[12].f32" -n spectrogram -z 150 -hwk -o steep.png All looks fine in the resultant spectrogram.

  • Con Kolivas Con Kolivas posted a comment on discussion General Discussion

    I've tried to enable steep mode while upsampling (2x) with SOXR_STEEP_FILTER but the music subsequently plays back at many times its normal speed. A bit of fiddling shows that once the passband_end is >98% bandwidth it starts doing this.

  • Christof Schulze Christof Schulze posted a comment on discussion General Discussion

    it was late yesterday. This is how I run soxr: https://github.com/christf/snapcastc/blob/firstdraft/src/alsaplayer.c#L34

  • Christof Schulze Christof Schulze posted a comment on discussion General Discussion

    Hello everyone, I am writing a piece of software that is playing audio synchronously over the network - similar to what snapcast is doing. To achieve synchronous output libsoxr is used to resample the data. So far I am using soxr_oneshot() and resampling is working, however there is a noticable change in pitch when it is applied. Small chunks of audio data are tagged with a time stamp at which they are to be played back and delivered from a server to all clients using UDP. On the client chunks can...

  • Fabrice Fontaine Fabrice Fontaine created merge request #2

    soxr.pc.in: add avutil libraries

  • tomb18 tomb18 posted a comment on discussion General Discussion

    Thank you.

  • robs robs posted a comment on discussion General Discussion

    Hello Tom, yes, this library can efficiently resample doubles at these rates. Please see the provided examples for the functions used. Note that if the signal is streamed in blocks, then there is a latency, i.e. a number of samples delay, between input and output.

  • tomb18 tomb18 posted a comment on discussion General Discussion

    Hi, Can this library resample a signal that is delivered as 16384 doubles at a sample rate of 250kHz to 192kHz? If so, which function would be used? Will the result be an array of size 16384? Currently, I have experince myself downsampling 1.92MHz to 192kHz by doing a lowpass filter followed by keepint on sample out of 10. This is then sent to an FFT for plotting and to a sound ouput module to output the sound at 192kHz. However this sample rate conversion requires upsampling by 96 and then downsampling...

  • PhobosK PhobosK posted a comment on discussion General Discussion

    Hi, Sorry for writing a bug report here, but you have disabled the SF ticketing system... There is a problem with the project() command used in the CMAKE files, especially when CMAKE > 3.0 is used project() CMP0048 policy The second usage of the project() command if the -DBUILD_EXAMPLES=ON is used, removes any previous variable settings, thus at the end of the compilation libsoxr remains without a version (actually with version string "..") on the pkg-config level. This way the configure scripts...

  • The SoX Resampler library The SoX Resampler library released /soxr-0.1.3-Source.tar.xz

  • robs robs modified a wiki page

    Home

  • robs robs committed [5e1f69]

    fix non-portable use of preprocessor 'defined'

  • robs robs committed [9f816d]

    minor fixes

  • robs robs committed [ac53e0]

    minor clean-ups

  • robs robs committed [b246ad]

    fix incorrect include-dir variable names

  • robs robs committed [568aed]

    eliminate runtime casts (and associated warnings in debian) in soxr-lsr wrapper

  • robs robs committed [945b59]

    update NEWS, versions

  • Ruurd Adema Ruurd Adema posted a comment on discussion General Discussion

    Thanks!

  • robs robs posted a comment on discussion General Discussion

    Hello again, The only effect of specifying a higher max. IO ratio than you actually end up using is that some memory allocated at soxr_create() time for processing the higher IO ratios will remain unused—but this shouldn't usually be much of a problem. HTH, Rob.

  • Ruurd Adema Ruurd Adema posted a comment on discussion General Discussion

    Hi Rob, Things are going very well with libsoxr and variable rate conversion! Hope you don't mind me asking another question. Are there any effects of choosing a specific max IO ratio (other than setting is too low)? Is there any relationship between speed and/or quality and the max IO ratio? For example: assume frequency ranges between (and including) 44.1 KHz & 192 KHz, would it be sufficient to set the max IO ratio using those max/min values (or a ratio of 1000 to 1), even if the actual ratio...

  • robs robs posted a comment on discussion General Discussion

    Glad to hear that you're making progress! 1st question: Yes, that's right. 2nd question: I don't think that ther has to be any particular relationship between these values (and there are no specific limits), but where the rate is changing continuously (such as in the supplied example # 5), it may be convenient to make them them the same.

  • Ruurd Adema Ruurd Adema posted a comment on discussion General Discussion

    Hi Rob, Thank you for your response! The thing you described about the maximum I/O ratio was indeed partly cause of the distortion (the other being an out of bound write of 1 byte in another part of my code). Am I correct that when using variable rate conversion the ratio values used in soxr_create have no relation to the actual sample rates other than defining the maximum I/O? (tests suggest this is indeed the case, but I want to make sure I'm correct) What are the limits of the skew value when...

  • robs robs posted a comment on discussion General Discussion

    Yes, it is possible to use the variable rate conversion when both input rate and output rates are the same. I've just run this simple test here, using one of the supplied examples, and all seems to work as expected: ./3-options-input-fn 48000 48000 2 0 0 4 20 < input.f32 > output.f32 Note that with variable-rate conversion, the sample-rates given in soxr_create determine the maximum I/O ratio that will be used. So if, for example, input_sample_rate & output_sample_rate are both given as 48kHz in...

  • Ruurd Adema Ruurd Adema modified a comment on discussion General Discussion

    Thank you for this wonderfull library! Is it possible to use the variable rate conversion when both input rate and output rates are the same? I intend to use libsoxr as drift compensation mechanism between 2 clock domains. When I convert from 96KHz to 48KHz it works well, but when I convert from 48KHz to 48KHz it produces audible clicks in the audio. I setup the resampler like this: soxr_in_spec = soxr_quality_spec(SOXR_HQ, SOXR_VR); soxr = soxr_create( input_sample_rate, // (48KHz or 96KHz) output_sample_rate,...

  • Ruurd Adema Ruurd Adema modified a comment on discussion General Discussion

    Thank you for this wonderfull library! Is it possible to use the variable rate conversion when both input rate and output rate are the same? I intend to use libsoxr as drift compensation mechanism between 2 clock domains. When I convert from 96KHz to 48KHz it works well, but when I convert from 48KHz to 48KHz it produces audible clicks in the audio. I setup the resampler like this: soxr_in_spec = soxr_quality_spec(SOXR_HQ, SOXR_VR); soxr = soxr_create( input_sample_rate, // (48KHz or 96KHz) output_sample_rate,...

  • Ruurd Adema Ruurd Adema posted a comment on discussion General Discussion

    Thank you for this wonderfull library! Is it possible to use the variable rate mechanism when both input rate and output rate are the same? I intend to use libsoxr as drift compensation mechanism between 2 clock domains. When I convert from 96KHz to 48KHz it works well, but when I convert from 48KHz to 48KHz it produces audible clicks in the audio. I setup the resampler like this: soxr_in_spec = soxr_quality_spec(SOXR_HQ, SOXR_VR); soxr = soxr_create( input_sample_rate, // (48KHz or 96KHz) output_sample_rate,...

  • Alex Wang Alex Wang posted a comment on discussion General Discussion

    Alright, that definitely clears things up. Thanks for the help! -Alex

  • robs robs posted a comment on discussion General Discussion

    Hello Alex, apologies for the confusion! PFFFT is the best library from a performance...

  • Alex Wang Alex Wang posted a comment on discussion General Discussion

    Hello robs, I'm a bit confused about how to choose between the various options dealing...

  • Sreekutty Sreekutty posted a comment on discussion General Discussion

    How can we measure the group delay for soxr? Are we using any techniques to reduce...

  • Sreekutty Sreekutty posted a comment on discussion General Discussion

    how can we measure group delay for soxr? Are we using any technique to nullify the...

  • karthikeyan karthikeyan modified a comment on discussion General Discussion

    using any one of the application in soxr will i be able to find the group delay of...

  • karthikeyan karthikeyan modified a comment on discussion General Discussion

    using one of the application in soxr will i be able to find the group delay of the...

  • karthikeyan karthikeyan posted a comment on discussion General Discussion

    using one of the application in soxr will i be able to find the group delay of the...

  • robs robs posted a comment on discussion General Discussion

    Hello Alexander, I don't think that there is a problem as you describe, since I would...

  • Alexander Hryzak Alexander Hryzak posted a comment on discussion General Discussion

    Maybe I found a bug in _soxr_deinterleave (or did something wrong): #define DEINTERLEAVE_FROM(T,flag)...

  • robs robs posted a comment on discussion General Discussion

    I'm afraid that I can't see why it works on 12 and not on 11. Perhaps you could try...

  • Zenitur Zenitur posted a comment on discussion General Discussion

    I have a repository with Qt5 for SLE 11 and 12. I have been added qmmp into that....

  • robs robs committed [5fa7ee]

    clean-up; set version as 0.1.3b1

  • robs robs committed [711010]

    clean-up

  • robs robs committed [e47d65]

    clean-up

  • robs robs committed [384936]

    fix prev.

  • robs robs committed [52888c]

    reorg/SIMD

  • robs robs committed [61cf15]

    make explicit avcodec dependency on avutil; avf...

  • robs robs committed [bb7972]

    clean-up

  • robs robs committed [71da01]

    fix incorrect interpretation of given o/i ratio...

  • robs robs committed [31fc8a]

    improve clang support

  • robs robs committed [b5c95f]

    doc update; make an lsr-test conditional as app...

  • robs robs committed [60ce8d]

    portability/cross-compiling improvements/clean-...

  • robs robs committed [e923db]

    tests: use dolph window if available, kaiser ot...

  • robs robs committed [897bbf]

    simplify by using #cmakedefine01; introduce HAV...

  • robs robs committed [c82642]

    use latest pffft

  • robs robs committed [4aa773]

    fix warning

1 >
MongoDB Logo MongoDB