Resampling audio only affects Music
#1
I have an annoying problem with my setup, and it's related to audio sample rates.

My music is always 44100Hz, and most of my movies are in 48000Hz.
Appearantly, when XBMC plays, the soundcard is unable to resample the audio itself. If I play music with 44100Hz in XBMC and the soundcard is supposed to resample the audio to 48000, 96000 or anything other than 44100 (44100 is not supported by the card ...), the sound simply plays faster, while not being resampled. This goes for videos too.

Now, there's a possibility to use the internal resampler of XBMC, which works, although with noticable quality loss (possible to adjust the quality libsamplerate works on?). If I etc. set the samplerate of my sound card at 96000Hz, and the resample rate internally in XBMC at 96000Hz, the music plays fine, however, the videos are not affected by this, and play pretty much double speed. It is not affected by the resample tag in advancedsettings. Should I file a bug report on this?

A semi-good solution is to set the resample rate to 48000Hz. The music takes a noticable hit to the quality being resampled to 48000Hz, while most of my videos can play at native speed.

Any way to adjust the quality of the resampling done by XBMC when playing music? If there's any compilation option or a small patch or something, that's fine too. Also, is there any way to resample internally the audio played by videos?

And ye:

Card: Audigy 2 SE
Alsa-lib: 1.0.20
OS: Arch Linux i686
Reply
#2
Themaister Wrote:I have an annoying problem with my setup, and it's related to audio sample rates.

My music is always 44100Hz, and most of my movies are in 48000Hz.
Appearantly, when XBMC plays, the soundcard is unable to resample the audio itself. If I play music with 44100Hz in XBMC and the soundcard is supposed to resample the audio to 48000, 96000 or anything other than 44100 (44100 is not supported by the card ...), the sound simply plays faster, while not being resampled. This goes for videos too.

Now, there's a possibility to use the internal resampler of XBMC, which works, although with noticable quality loss (possible to adjust the quality libsamplerate works on?). If I etc. set the samplerate of my sound card at 96000Hz, and the resample rate internally in XBMC at 96000Hz, the music plays fine, however, the videos are not affected by this, and play pretty much double speed. It is not affected by the resample tag in advancedsettings. Should I file a bug report on this?

A semi-good solution is to set the resample rate to 48000Hz. The music takes a noticable hit to the quality being resampled to 48000Hz, while most of my videos can play at native speed.

Any way to adjust the quality of the resampling done by XBMC when playing music? If there's any compilation option or a small patch or something, that's fine too. Also, is there any way to resample internally the audio played by videos?

And ye:

Card: Audigy 2 SE
Alsa-lib: 1.0.20
OS: Arch Linux i686

Current code (if you used advancedsettings.xml) it won't use libsamplerate but another code, not sure were it comes from Smile

moving to libsamplerate here to allow choosing the resample is a planned addition, just not done yet.

You can ofc. set resampling through alsa via asoundrc which uses libsamplerate.

Cheers,
Tobias
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#3
No, that's the thing. By changing samplerate in .asoundrc, it doesn't resample the audio, it simply speeds up or slows down the audio depending on the sample rate XBMC outputs and the samplerate defined in .asoundrc. This is only the case with XBMC. For all other apps, libsamplerate works as advertised :p
Reply

Logout Mark Read Team Forum Stats Members Help
Resampling audio only affects Music0