Menu

Hang on soxr_create()

farski
2014-04-17
2014-04-17
  • farski

    farski - 2014-04-17

    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?

     
  • robs

    robs - 2014-04-17

    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.

     
  • farski

    farski - 2014-04-17

    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 set

    Appreciate any help

     

    Last edit: farski 2014-04-17
  • farski

    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.

     
  • robs

    robs - 2014-04-17

    Ah, good to hear.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.