[MPlayer-users] mplayer and alsa9/dmix

Corey Hickey bugfood-ml at fatooh.org
Mon Apr 21 01:29:47 CEST 2003


Florian Schmidt wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi, 
> 
> i think i found a fix for mplayer. i posted it to the dev-eng list.
> They probably will tell me to make a correct patch :)
> 
> Well, here's for you to try it out:
> 
> change the line 593 in the file libao2/ao_alsa9.c in the mplayer
> source from:
> 
> if ((err = snd_pcm_hw_params_set_period_size(alsa_handler,
> alsa_hwparams, chunk_size, 0)) < 0)
> 
> to:
> 
> if ((err = snd_pcm_hw_params_set_period_size_near(alsa_handler,
> alsa_hwparams, chunk_size, 0)) < 0)
> 
> then from the MPlayer source dir:
> 
> make -C libao2 && su c "make install"
> 
> Let me know, if it works for you.. Here, it seems to work well..
> 
> Florian Schmidt
> 

Hmm, I made your change to cvs (updated a few minutes ago). mplayer -ao
alsa9:dmix and -ao alsa9:mixed (copied from your asoundrc to mine) both
have the same problem, but don't fail setting period size like they did
before.

When I run mplayer on a 48000Hz wav file, it plays about half a second 
of audio and appears to hang. I have to use CTRL-C to quit.

If I play a video with 48000Hz mp3 sound, then mplayer also appears to
hang, but actually I can still operate mplayer - every time I seek or
unpause, it only plays half a second, then stops.

Mplayer -ao alsa9 still works just fine, so it doesn't look like
anything else got broken. Out of curiosity, what is the period_size
reported by aplay somefile.wav -v ? Mine is 4096, and 6000 when I
specify -Ddmix. I don't know if that matters.

-Corey



More information about the MPlayer-users mailing list