Choppy CD Playback on Alsaplayer when using Firefox

Using applications, configuring, problems
Post Reply
Message
Author
bdika
Posts: 44
Joined: Sun 20 May 2007, 23:57
Location: London, Canada

Choppy CD Playback on Alsaplayer when using Firefox

#1 Post by bdika »

I am using fat free Puppy Linux and the Alsaplayer media player.

I seem to have a very odd problem. The audio CD and mp3 playback is fine. However, when I'm playing back an audio CD and I use my Firefox web browser, the playback skips every time I access a different web page or reload a web page. This doesn't happen with mp3 playback but only when playing an audio CD.

I have tried increasing the buffer_size in my .asoundrc file and tried turning on dma for the CD/DVD drive, neither of which helped. I also tried setting the Alsaplayer f and g command line options with various amounts, also with no results.

This doesn't happen with other media players (so I know my drive is OK), but these other players are not satisfactory for other reasons (choppy playback at other times, freezing, etc.). Alsaplayer seems to be the one that does the best job with audio CDs, except when using my web browser.

Any help would be much appreciated.

Thanks.

bdika

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#2 Post by disciple »

The important thing with playing audio cds is to make sure you are using the audio output from the cd drive, so the sound goes straight from the drive to the soundcard. I have no idea whether alsaplayer even does this, but a lot of players are set up by default for the drive to send data to the processor, which then has to process it, and send it to the soundcard. e.g. with the xmms package I installed I had to disable the libcdparanoia plugin, so that it used libcdaudio instead, and now it plays CD's much better than it plays anything else. Xfreecd can only play CD's this way, so you can be sure it will work, but it freezes if you start it without a CD in the drive.

Out of curiosity, why do you say alsaplayer plays cds better than anything else?

bdika
Posts: 44
Joined: Sun 20 May 2007, 23:57
Location: London, Canada

#3 Post by bdika »

Hi disciple:

Thanks for the reply.
Out of curiosity, why do you say alsaplayer plays cds better than anything else?
I tried gxine but it seems to be very unstable. I didn't get any sound from xmms. Mplayer plays fine but the gui doesn't show the song information (eg name of song, playing time etc). Alsaplayer seemed to have none of these problems, but had the problem with the Firefox browser, which I was hoping to solve.

bdika

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#4 Post by disciple »

I didn't get any sound from xmms.
Ah - maybe if it seemed to be playing, but had no sound, xmms is actually the only player using the audio output of the cd drive, but you don't have an audio cable from that drive to the sound card, or it is unplugged or something. Presumably you didn't have the volume turned down - either in alsa or in the drive...

Sorry, I don't really have any other ideas, as I suspect alsaplayer just needs a little more CPU power than it can get with Firefox running.

Maybe try Audacious?

bdika
Posts: 44
Joined: Sun 20 May 2007, 23:57
Location: London, Canada

#5 Post by bdika »

Hi disciple:

I think you are right about the cpu. The task bar in Puppy shows usage at 100% when I start firefox or refresh a page. Also I noticed the same choppiness when using VLC player.

I've got a 64 bit dual core cpu with 3.5gig of ram. I don't see why this should be happening.

A have a couple of questions that I can't figure out.

Why doesn't it happen with gxine in Puppy (although gxine is prone to crashing when I use it)? Why doesn't it happen in (K)Ubuntu? Is there a configuration option that I can set in firefox to keep it from maxing out the cpu when it loads or refreshes?

Any help would be appreciated.

Thanks

bdika

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#6 Post by disciple »

Why doesn't it happen in (K)Ubuntu? Is there a configuration option that I can set in firefox to keep it from maxing out the cpu when it loads or refreshes?
Not that I'm aware of, but you should be able to increase the "priority" of the player, or decrease the priority of firefox, which might help, although I've never had much success with these. It does seem silly that you are having problems with such a flash computer.

If Gxine doesn't have the same problem, then maybe it is set up for the CD drive itself to play the CD, and send the sound straight to the sound card. If you just ignore Firefox and stuff for a moment, you might like to compare the CPU usage with Gxine playing, and with alsaplayer playing. It should be noticeably less if this is what's happening. If it is, then you just need to find another player that can play CDs the same way, that doesn't crash. Have you tried xfreecd? Or the gplaycd tray applet?
You could try audacious, or XMMS again - these should be very reliable, and I think there must be some simple reason why you didn't have sound with XMMS. You just have to realise that these can play CDs either way, depending on which plugins are enabled.
I don't think Mplayer is capable of telling the CD drive to play a CD, rather than doing all the work itself, but if you look around in the settings, it might be possible to get VLC to.

BTW, do you have one or two CD drives?

bdika
Posts: 44
Joined: Sun 20 May 2007, 23:57
Location: London, Canada

#7 Post by bdika »

Hi disciple:

Maybe I will try another player again as you've mentioned.
BTW, do you have one or two CD drives?
I have one combo CD/DVD read write drive.

Something I noticed when I was trying to troubleshoot Firefox was that there is no choppiness when I reduce the browser window to about one-half the size of my monitor. In this smaller sized window I can refresh Firefox tabs and change tabs without any choppiness in the music. I tried this with Alsaplayer and VLC with the same successful result. When I maximize Firefox to cover my entire monitor, then the choppiness in the music playback returns when I refresh a tab or switch tabs. I have the latest Compiz pet installed in my Fatfree Puppy.

I have a GeForce 8500 GT card with 512 MB of ram on it. My monitor is a 22 inch Samsung widescreen (1680 x 1050).

In the GLX section of my NVidia settings gui it says:

Code: Select all

Direct Rendering:          No
and when I enter glxgears in a terminal I get

Code: Select all

sh-3.00# glxgears
sh: glxgears: command not found
sh-3.00# 
I think there may be something wrong with my X installation?

What do you think?

I'll keep investigating.

Thanks.

bdika

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#8 Post by disciple »

Yeah, I don't really know anything about Compiz.
I have a really low power machine compared to you, and there seems to be something about my hardware setup that means I get choppy playback with any kind of audio file if I drag windows around or scroll or anything. But audio cd's are fine if they're not being played by the CPU. Even on an old PC with less than 200MHz and very little ram, they will play fine... so I think that is definitely the way to go. Unless you think you really need to put it through an equalizer, or need visualisations, but otherwise what is the point in getting your computer doing a whole lot of work that it doesn't need to do? Keep the speed for other things I say...

Post Reply