I have almost finished writing a large jukebox app which has
the ability to play both audio(mp3) and video(flv) content.
The audio plays fine and allows me to continue using the
app(browsing and clicking, etc) without any affect on the playing
audio. However, when I have a video playing I am unable to use the
app as before, instead there is constant intermission in the
playing video content.
I have looked at my Windows Task Manager while the app is
runnin and found that the CPU usage is running at around 85% when
the app is idle but it then shoots up to 100% whenever there is
audio or video playing?
I am runnimg Windows XP SP2 and my machine has a 3.20GHz
Intel Celeron CPU with 2.5 GB of RAM which I thought would be more
than enough to handle my app??
Can you please tell me what is my best course of action to
rectify this issue?
If your application is really idle, CPU usage should be near
zero. Usage of 85% indicates--assuming this 85% is allocated
specifically to your application--it's actually doing a lot of
work. Could be streams that you haven't actually stopped, or timers
that are still running, etc.
I managed to get the cpu usage down below 20% (when idle) by
removing my timers and tidying up some of my event listeners but my
problem still occurs with the playing video?? Is there a way to
stop this stuttering upon UI interaction?