Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Alsa+dmix+mplayer=success
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
discomfitor
l33t
l33t


Joined: 21 Feb 2003
Posts: 927
Location: None

PostPosted: Fri Jan 16, 2004 3:53 am    Post subject: Alsa+dmix+mplayer=success Reply with quote

For those of you having the periodsize error with mplayer+alsa+dmix, you need to make an adjustment to the mplayer source code. In libao2/ao_alsa9.c in the mplayer source:
Code:

-if ((err = snd_pcm_hw_params_set_period_size(alsa_handler,alsa_hwparams, chunk_size, 0)) < 0)
+if ((err = snd_pcm_hw_params_set_period_size_near(alsa_handler,alsa_hwparams, chunk_size, 0)) < 0)


should be around line 620 or so. Then compile it and install. Alsa+dmix will work, but sometimes it will play too fast. This is cause by the rate getting set to 22000 or somesuch. Just manually set it to 44100 in your asoundrc, and you should be good to go. Then again, YMMV.
_________________
There is no substitute for experience.
Imperfection indicates a lack of effort.
Back to top
View user's profile Send private message
Niek
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 236
Location: Houten, The Netherlands

PostPosted: Fri Jan 16, 2004 4:12 pm    Post subject: Reply with quote

Thanks, this fixed my MPlayer problems :) Can you please file a bug on BGO, I think this patch should be included in the ebuilds.
_________________
Bezoek ook eens de Nederlandstalige Gentoo IRC channel op irc.freenode.net - #gentoo-nl
Back to top
View user's profile Send private message
raptor
Apprentice
Apprentice


Joined: 20 Sep 2002
Posts: 171

PostPosted: Fri Jan 16, 2004 7:38 pm    Post subject: me too Reply with quote

I got many times similar problems with mplayer and alsa...

yep.. if included in the .ebuilds or directly in mplayer will be good..
Back to top
View user's profile Send private message
discomfitor
l33t
l33t


Joined: 21 Feb 2003
Posts: 927
Location: None

PostPosted: Sat Jan 17, 2004 2:42 am    Post subject: Reply with quote

Filed the bug. Glad it works well.
_________________
There is no substitute for experience.
Imperfection indicates a lack of effort.
Back to top
View user's profile Send private message
Bash[DevNull]
Guru
Guru


Joined: 10 Oct 2003
Posts: 333

PostPosted: Sat Mar 13, 2004 11:00 pm    Post subject: Reply with quote

Hmm... i can't find this patch in ebuild.... Were is it????
_________________
Biomechanical Artificial Sabotage Humanoid
Back to top
View user's profile Send private message
gabor
Apprentice
Apprentice


Joined: 12 Dec 2002
Posts: 156
Location: Slovakia

PostPosted: Wed Mar 24, 2004 8:29 pm    Post subject: Reply with quote

hmm... i added the .asoundrc as described in https://forums.gentoo.org/viewtopic.php?t=122076,
and it works,
but...hmmm....

i still need to do more testing, but it seems that the video is smoother when mplayer uses the raw/normal/whateverishisname alsa device.....

could anyone else check it too? maybe it's only my eyes :))
Back to top
View user's profile Send private message
discomfitor
l33t
l33t


Joined: 21 Feb 2003
Posts: 927
Location: None

PostPosted: Thu Mar 25, 2004 2:22 am    Post subject: Reply with quote

Argh! I was looking for this post! Anyway, I posted another topic about mplayer and dmix which has a better fix. You might want to try that as well if you found this to be effective.
_________________
There is no substitute for experience.
Imperfection indicates a lack of effort.
Back to top
View user's profile Send private message
gabor
Apprentice
Apprentice


Joined: 12 Dec 2002
Posts: 156
Location: Slovakia

PostPosted: Thu Mar 25, 2004 11:04 am    Post subject: Reply with quote

darckness:

i already have mplayer from cvs, so that's not the problem. it WORKS with dmix, i mean i can watch 2 movies at the same time with sound.

the problem is that it's not that smooth as when used with the 'raw' alsa output.

i verified it, i created a script, which randomly started a video file with either 'raw' alsa or with 'dmix' alsa, and then when the video stopped, displayed me what mode he used.

i could guess for 99.9% when it was raw, and when dmix.

so there's a difference.

i admit it's not that big, but it's still there.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum