Closed Bug 704450 Opened 13 years ago Closed 6 years ago

audio pauses whenever CPU is maxed out from non-hardware-accelerated CSS animation or other CPU-intensive graphics

Categories

(Core :: Audio/Video: Playback, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: mardeg, Unassigned)

References

Details

Attachments

(11 files, 1 obsolete file)

On Firefox 8 the webpage I'll upload here plays the audio smoothly while the CSS animation is running, whereas current trunk has pauses that last for many seconds between each time of playing less than a second of audio.
Attached audio Audio file #1
Attached audio Audio file #2
Attached file Font #2
Attached file Font #3
Attached file Testcase #1 (obsolete) —
To start the CSS animation, click on "Follow Gandalf's Journey"
Javascript is only used to start the audio 10 seconds after the animation starts.
They showed up on a local copy of the page, I adjusted the urls of them in this version.
Attachment #576124 - Attachment is obsolete: true
Seems to work fine for me (on Mac).  Can you find a regression range?
Also works for me on Linux and Windows 7.  After that, if I click "Legend" and then "Follow Gandalf's Journey" again it doesn't play the music at all.
Yeah I find it only repeats the audio after quite some delay before I do that.
This single core P4 2.22Ghz machine will be 12 years old when Microsoft stop sending XP updates :(
  Graphics
        Adapter Description: ATI RADEON 9600/X1050 Series
        Vendor ID: 1002
        Device ID: 4150
        Adapter RAM: Unknown
        Adapter Drivers: ati2dvag
        Driver Version: 8.593.100.0
        Driver Date: 2-10-2010

        WebGL Renderer
        ATI Technologies Inc. -- ATI RADEON 9600/X1050 Series -- 2.1.8545 Release

        GPU Accelerated Windows
        0/1. Blocked for your graphics driver version. 
(No newer drivers exist for this graphics card)

Because I have no hardware acceleration it might be CPU-related, as it drops down from the 90s to under 10% as the audio plays fine in Nightly while the animation isn't on screen (if I'm in another tab, etc). Firefox 8 does pause very briefly a couple times when the animation takes my CPU to 99%, but seems to handle audio much better during high CPU usage.
My bandwidth is currently shaped down to a trickle for a couple weeks so finding a regression range will take a while.
Summary: [regression] audio pauses a lot while CSS animation is going → [regression] audio pauses a lot while non-hardware-accelerated CSS animation is going
Confirming this under Windows/XP. It works find under Windows 7 for me but then my Windows 7 systems are both dual core.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Are you able to find a regression range Bill?  I can't reproduce this in my XP VM, but that may be because the host machine is fast enough not to hit this.
From IRC we could always reproduce the behaviour with fully pegged CPUs even in Firefox 8 I'm removing the [regression] since the expected behaviour when the CPU is maxed out should probably be to sacrifice gfx performance for audio which is much more noticeable/annoying.
I'll see if I can upload a more evil version that can make more people's CPUs hit their limit :)
Summary: [regression] audio pauses a lot while non-hardware-accelerated CSS animation is going → audio pauses whenever CPU is maxed out from non-hardware-accelerated CSS animation
Attached file Bizarre workaround
Ok, this adds box-shadow inset to <figure> when the animation starts, which for me makes the animation update only about 4 times per second making it look jerky, even though the box-shadow inset is hidden by the image. I think this is a known gfx bug, can't recall the number.

Now this was meant to make the audio pausing much worse, but here's the bizarre thing: the audio plays right through without a hitch!

I used javascript to add the box-shadow, so by turning off javascript I still have the original problem of smooth animation with pausing audio.
OK.  Although I have confirmed the behavior of the slowness, I am not convinced there is a bug here.

As pointed out in bug 704993 comment 1, the file is encoded with a non-standard sampling rate of 96khz forcing the Operating system to resample the stream to a format that the hardware can play.

I suspect that re-encoding the audio file specifying a sample rate standardly supported by PC sound cards will resolve the issue here.
Tested this locally and it's still pausing.
Is this the same as bug 478721? In that case we should dupe one.
Summary: audio pauses whenever CPU is maxed out from non-hardware-accelerated CSS animation → audio pauses whenever CPU is maxed out from non-hardware-accelerated CSS animation or other CPU-intensive graphics
The original ogg vorbis is also silent on the Galaxy Nexus android phone, this one should play so we can check for audio pausing on mobile Firefox (though the N900 played the 96khz audio fine on Maemo)
The above testcase plays without pauses at the default zoom level, but when zoomed in so the animation fills the whole screen on the latest nightly build of mobile Firefox on Galaxy Nexus it exhibits the same audio pauses as described in comment 0.
Sorry I forget to mention the about:support entry on Galaxy Nexus for "GPU Accelerated Windows" says
"0. Blocked for your graphics card because of unresolved driver issues."
Mardeg says this reproduces on http://www.cuttherope.ie/?html5audio=true. So we should try to fix it :-). (I wonder if cubeb will fix it.)
Sounds like the audio threads are being starved. Perhaps increasing the priority of the audio threads would help?
To test the workaround version on Galaxy Nexus.
Component: Audio/Video → Audio/Video: Playback
Mass closing do to inactivity.
Feel free to re-open if still needed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: