I'm switching an app over from SoX to soxr, which I just found so I've only been looking at the API for a couple hours. I'm trying to do a very resampling operation, essential sample #2, but with files rather than stdio. The problem is that as soon as I get to soxr_create(), the program hangs. CPU spikes and the app suddenly eats up like 5+ GB of memory.
Any idea what might cause that?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi farski, I've not heard of a similar problem before so I'm afraid nothing springs to mind as an obvious cause. Have you tried changing sample #2 to use files to see if it behaves the same way? If still no luck and you can condense the problem down to a simple file or two, send it to me and I can have a look at it for you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Other than using sndfile a bit to pull out the input channels and sample rate, and calling fopen() on the input and output files, this is pretty much just a straight copy-paste of example 2
Sorry, I figured it out. I was using sndfile to read the info about the output file (which didn't actually exist) rather than my input file, so all the options I was passing into soxr_create() were completely bogus. Huge sample rates, etc.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm switching an app over from SoX to soxr, which I just found so I've only been looking at the API for a couple hours. I'm trying to do a very resampling operation, essential sample #2, but with files rather than stdio. The problem is that as soon as I get to soxr_create(), the program hangs. CPU spikes and the app suddenly eats up like 5+ GB of memory.
Any idea what might cause that?
Hi farski, I've not heard of a similar problem before so I'm afraid nothing springs to mind as an obvious cause. Have you tried changing sample #2 to use files to see if it behaves the same way? If still no luck and you can condense the problem down to a simple file or two, send it to me and I can have a look at it for you.
Other than using sndfile a bit to pull out the input channels and sample rate, and calling fopen() on the input and output files, this is pretty much just a straight copy-paste of example 2
https://gist.github.com/farski/a62167642669a836a2ba
edit: Actually probably worth noting that I'm using a copy of soxr that I compiled from source with
BUILD_SHARED_LIBS:BOOL=OFF
setAppreciate any help
Last edit: farski 2014-04-17
Sorry, I figured it out. I was using sndfile to read the info about the output file (which didn't actually exist) rather than my input file, so all the options I was passing into soxr_create() were completely bogus. Huge sample rates, etc.
Ah, good to hear.