Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: RE: detecting radio status in status bar

RE: detecting radio status in status bar

From: Anton Oleynikov <len0x_at_mail.ru>
Date: 2005-11-06

> > 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
more global
   variables introduced like "radio_playing" (which is a bad idea). In the
first case
   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
me relevant
   part is in the current_playmode() of status.c).

So of course something can be done about those issues, but my first proposed
solution
would just to add a method to actually change values of "playing" and
"pause"
without introducing any of new stuff and therefore guarantee that no
modifications
is required anywhere else. I've done and tested this for iRiver already.

Best wishes,
Anton.
Received on Sun Nov 6 12:54:21 2005


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa