Rockbox mail archive
Subject: RE: detecting radio status in status bar
RE: detecting radio status in status bar
> > As audio_status() doesn't return anything when radio is
> > playing I tried to
> > add set_audio_status() function to playback.c, so
> > that it can be called from radio code.
> In the current code, we have separate status functions for radio and
> other audio playback. I guess you are planning to integrate
> the two by adding more bits to the status word?
There are several options. Adding different status values would be a good
idea if it wasn't for:
- internally status values are stored in just global variables like
"playing" and "pause"
and not just one status word. So either it has to be converted to one or
variables introduced like "radio_playing" (which is a bad idea). In the
a lot of rewriting in playback.c required.
- all the code that uses audio_status() is not aware of new status values.
So if we want
to takes advantage of that we need to explicitly code it every time (for
part is in the current_playmode() of status.c).
So of course something can be done about those issues, but my first proposed
would just to add a method to actually change values of "playing" and
without introducing any of new stuff and therefore guarantee that no
is required anywhere else. I've done and tested this for iRiver already.
Received on Sun Nov 6 12:54:21 2005
Page was last modified "Jan 10 2012" The Rockbox Crew