On my P4/2000 (Asus P4T533-C with Soundblaster 128/PCI = Ensoniq 1371, Alsa Driver 0.9.0rc6) mpg321 produces noisy artifacts of low frequency. xmms, mpg123 and ogg123 work perfectly.
Try using "mpg321 -o oss file.mp3". In addition "mpg321 --help" shows available libao output plugins. Setting -o to alsa or alsa09 produces those noisy artifacts; maybe an alsa/oss compatibility layer problem.
Is this still an issue? Unable to reproduce. Will need more up to date information if this is still happening.
4 days till next reliable answer. Sorry. I am extremely busy at the moment.
No problem. Please also let me know if viz's suggestion makes any difference. Thanks!
Yes, the problem is still there (with system updated as much as possible). "-o oss" produces no artifacts, but alsa driver still sounds horrible.
Alright, i'll have another go at reproducing this. Thanks for the quick feedback.
Just want to check, you see this with both '-o alsa' and '-o alsa09'?
Both output device option show the same effect...
Apologies that this has taken so long for me to get to... i've recreated and fixed the distortion that you were hearing. The problem is with the alsa09 plugin of the libao library. For reasons that i don't yet understand, the plugin calls snd_pcm_hw_params_set_period_size while setting up alsa. Changing this to call snd_pcm_hw_params_set_buffer_size fixes the distortion on playback. I'll try and contact the upstream dev to get the fix commited. In the meantime i'll commit a patch to portage.
Created attachment 9710 [details] libao-0.8.3.ebuild Hacked to patch libao/plugin/alsa09/ao_alsa09.c
Created attachment 9711 [details, diff] libao-0.8.3.patch Patch to remove alsa setting.
Try the attached ebuild and patch. Copy the patch into libao/files and then re-emerge. The patch doesn't do anything clever, just removes a few param settings. It seems the defaults are more reasonable. Let me know if it fixes the problem for you - it does for me.
Commited (masked)