dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: RE: detecting radio status in status bar

RE: detecting radio status in status bar

From: Anton Oleynikov <>
Date: Sun, 6 Nov 2005 11:53:32 -0000

> > 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
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.

Best wishes,
Received on 2005-11-06

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy