Kodi Community Forum

Full Version: Cannot crossfade mp3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

When I enable "crossfade" and set to 10 seconds for example I get a "cannot initialize audio device" when the player tries to crossfade and it skips to the next track. I have no other sound issues. Anyone ?
Is alsa setup to use dmix? Otherwise only one application can access the sound device at any given time.
Maxim Wrote:Is alsa setup to use dmix? Otherwise only one application can access the sound device at any given time.

You know if this is possible to detect from alsalibs?

Cheers,
Tobias
I don't know. I'm not familiar with the libraries of alsa.
Maxim Wrote:Is alsa setup to use dmix? Otherwise only one application can access the sound device at any given time.
Eh, dunno Smile How do i check this ? thnx for the reply !
Maxim Wrote:Is alsa setup to use dmix? Otherwise only one application can access the sound device at any given time.

Just found this: "NOTE: For ALSA 1.0.9rc2 and higher you don't need to setup dmix. Dmix is enabled as default for soundcards which don't support hw mixing."

Seems to me thay dmix is not the problem...
I would say, try to play 2 files with 2 aplay simultaneusly, if that works then it must be something we do wrong.

Cheers,
Tobias
I have the same issue as piotr - crossfading gives me exactly the same error. Even though I have Alsa 1.0.19 installed (under mythbuntu 8.10 with an early March PPA of xbmc), dmix wasn't enabled for my onboard sound it seems (using an Asus M3N78-EM, outputting via spdif, can't remember the sound chipset offhand though).

My solution was to create an .asoundrc file with contents as per the following link: http://alsa.opensrc.org/index.php/Dmix#G...er_to_work - the only change I made was to change the rate under the pcm.dmixer entry to 48000 instead of 44100, although I believe 48000 Hz is the default so you may just be able to delete that line...

Hope that helps you piotr...

Oh, and by the way Topfs2, I tried playing two mp3's with aplay, and got an error when trying to play the second... When I was first trying to track down the cause, I looked at an xbmc debug log and it made reference to trying to do something using pulseaudio at the point of error, even though I don't have pulse installed at all. I don't think it's relevant since my issue was alsa/dmix related, but if you'd like a look at that debug log, let me know...

Cheers,
Adam.
ads_german Wrote:...
Oh, and by the way Topfs2, I tried playing two mp3's with aplay, and got an error when trying to play the second... When I was first trying to track down the cause, I looked at an xbmc debug log and it made reference to trying to do something using pulseaudio at the point of error, even though I don't have pulse installed at all. I don't think it's relevant since my issue was alsa/dmix related, but if you'd like a look at that debug log, let me know...

Cheers,
Adam.

Sure I can take a look at it but if aplay failed on second item then it´s most probably that your ALSA is not setup correctly as it can´t mix the streams.

We are redoing the audio system quite much and one of the outcomes of this redesing is software mixining but it won´t be ready until 9.10 at eariliest.

Cheers,
Tobias
I can't find where I saved that old debug log - I'll create another log when i get a chance (without dmix enabled) then post a link for you.

It's definitely some weird alsa issue though - crossfading works fine once an .asoundrc that enables dmix is created...
ads_german Wrote:I can't find where I saved that old debug log - I'll create another log when i get a chance (without dmix enabled) then post a link for you.

It's definitely some weird alsa issue though - crossfading works fine once an .asoundrc that enables dmix is created...

Oh so XBMC works with dmix enabled I must have read your post abit to quickly :S However that is to be expected because without dmix alsa only allows one stream (crossfade generates 2 streams).

afaik ALSA don´t use any hw mixing.

So if it works with dmix then don´t bother with the log Smile
yeah, that's correct - crossfading works fine with the .asoundrc to enable dmix.

Supposedly alsa since 1.0.9rc2 has dmix enabled via software (by default) for any soundcards that don't handle it via hardware, but for some reason, it wasn't working for me...

I suspect either my alsa upgrade didn't work 100% correct, or my motherboard has some weird onboard sound that alsa doesn't play nice with.

Either way, it's not an xbmc issue in my case, and i suspect piotr may have the same problem... I won't bother with the log then.

Cheers,
Adam.