Cannot crossfade mp3
#1
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 ?
Arctic MC001 + Openelec
Image
Reply
#2
Is alsa setup to use dmix? Otherwise only one application can access the sound device at any given time.
Reply
#3
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
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
#4
I don't know. I'm not familiar with the libraries of alsa.
Reply
#5
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 !
Arctic MC001 + Openelec
Image
Reply
#6
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...
Arctic MC001 + Openelec
Image
Reply
#7
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
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
#8
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.
Reply
#9
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
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
#10
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...
Reply
#11
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
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
#12
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.
Reply

Logout Mark Read Team Forum Stats Members Help
Cannot crossfade mp30