Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run ssr-binaural: default_hrirs.wav" has sample rate 44100 instead of 48000! #68

Open
Harvie opened this issue Feb 12, 2017 · 9 comments

Comments

@Harvie
Copy link

Harvie commented Feb 12, 2017

I'm running SSR 0.4.2 on archlinux and when i execute ssr-binaural it gives me this error:

terminate called after throwing an instance of 'std::logic_error'
  what():  Error loading HRIR file: apf::load_sndfile(): "/usr/share/ssr/default_hrirs.wav" has sample rate 44100 instead of 48000!
Aborted (core dumped)
@chohner
Copy link
Contributor

chohner commented Feb 12, 2017

Try re-starting your jack server at 44100 Hz.

@Harvie
Copy link
Author

Harvie commented Feb 12, 2017

Yes, that works. But i want to use SSR with pulseaudio via pulseaudio-jack compatibility layer. And changing pulseaudio sample rate didn't helped.

@mgeier
Copy link
Member

mgeier commented Feb 13, 2017

If you want (or have) to use 48000 Hz, you can simply re-sample the bundled HRIRs.
Or you can choose any other set of HRIRs that's available in the right sampling rate.

The SSR does currently not resample any impulse responses, see also #32 and #16.

@Harvie
Copy link
Author

Harvie commented Mar 28, 2017

does it really make sense to recalculate HRIRs to higher sample rate? i mean: you will not get higher quality or something... maybe it's ok to only convert sample rate of final rendered wave just before the output to soundcard.

@JensAhrens
Copy link
Contributor

No, you do not get higher quality by upsampling, of course. People suggested upsampling so that you can readily process all your 48-kHz-files in SSR. Resampling the HRIRs is certainly less effort than resampling the output of SSR.

@mgeier
Copy link
Member

mgeier commented Mar 29, 2017

You most likely all know that already, but just for the record:

The SSR can and will re-sample "normal" audio files that are used as sources in a scene (thanks to Ecasound with libsamplerate support).
The limitation is that the HRIRs/BRIRs/WFS pre-filters have to match the JACK sampling rate (or vice versa).

@agraef
Copy link

agraef commented Feb 23, 2021

But in any case it shouldn't then just abort with an unhandled exception, should it? Here is what I get when running ssr-binaural on Manjaro with Jack running at 48 KHz:

       ___     
      /  ___   
  ___/  /  ___ 
    ___/  /    SSR (SoundScape Renderer) builduser202007080114
         /     
               
Website: <http://spatialaudio.net/ssr/>
Contact: <ssr@spatialaudio.net>

Copyright © 2016 Division of Applied Acoustics, Chalmers University of Technology
Copyright © 2014 Institut für Nachrichtentechnik, Universität Rostock
Copyright © 2012 Quality & Usability Lab, Telekom Innovation Laboratories, TU Berlin

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
terminate called after throwing an instance of 'std::logic_error'
  what():  Error loading HRIR file: apf::load_sndfile(): "/usr/share/ssr/default_hrirs.wav" has sample rate 44100 instead of 48000!
Aborted (core dumped)

@mgeier
Copy link
Member

mgeier commented Feb 23, 2021

You are absolutely right @agraef, letting the exception bubble up is very lazy.

The latest master version has some basic exception handling, though:

ssr/src/ssr_main.h

Lines 56 to 60 in 85dc4d5

catch (std::exception& e)
{
std::cerr << e.what() << std::endl;
return EXIT_FAILURE;
}

I've even added signal handling recently: #230

Unfortunately, there hasn't been a new release since ...

@agraef
Copy link

agraef commented Feb 23, 2021

@mgeier No worries, it's just something I ran into, and coming here I noticed the existing bug report. I'll try the latest master then. In fact, I'm mostly interested in the Pd externals, and as these aren't included in the Arch package, I'll have to build SSR myself anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants