forked from len0rd/rockbox
New mpeg_status() function replaces mpeg_is_playing()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2379 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1a07eef167
commit
f077710b86
5 changed files with 22 additions and 8 deletions
|
|
@ -851,7 +851,7 @@ bool dirbrowse(char *root)
|
|||
break;
|
||||
|
||||
case BUTTON_ON:
|
||||
if (mpeg_is_playing())
|
||||
if (mpeg_status() & MPEG_STATUS_PLAY)
|
||||
{
|
||||
lcd_stop_scroll();
|
||||
if (wps_show() == SYS_USB_CONNECTED)
|
||||
|
|
|
|||
|
|
@ -576,7 +576,7 @@ void wps_display(struct mp3entry* id3)
|
|||
{
|
||||
lcd_clear_display();
|
||||
|
||||
if (!id3 && !mpeg_is_playing())
|
||||
if (!id3 && !(mpeg_status() & MPEG_STATUS_PLAY))
|
||||
{
|
||||
#ifdef HAVE_LCD_CHARCELLS
|
||||
lcd_puts(0, 0, str(LANG_END_PLAYLIST_PLAYER));
|
||||
|
|
|
|||
|
|
@ -355,7 +355,8 @@ static bool ffwd_rew(int button)
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( mpeg_is_playing() && id3 && id3->length )
|
||||
if ( (mpeg_status() & MPEG_STATUS_PLAY) &&
|
||||
id3 && id3->length )
|
||||
{
|
||||
if (!paused)
|
||||
mpeg_pause();
|
||||
|
|
@ -907,7 +908,7 @@ int wps_show(void)
|
|||
|
||||
ff_rewind = false;
|
||||
|
||||
if(mpeg_is_playing())
|
||||
if(mpeg_status() & MPEG_STATUS_PLAY)
|
||||
{
|
||||
id3 = mpeg_current_track();
|
||||
if (id3) {
|
||||
|
|
|
|||
|
|
@ -1528,9 +1528,17 @@ void mpeg_flush_and_reload_tracks(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
bool mpeg_is_playing(void)
|
||||
int mpeg_status(void)
|
||||
{
|
||||
return is_playing;
|
||||
int ret = 0;
|
||||
|
||||
if(is_playing)
|
||||
ret |= MPEG_STATUS_PLAY;
|
||||
|
||||
if(paused)
|
||||
ret |= MPEG_STATUS_PAUSE;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef SIMULATOR
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
|
||||
void mpeg_init(int volume, int bass, int treble, int balance, int loudness, int bass_boost, int avc);
|
||||
void mpeg_init(int volume, int bass, int treble, int balance,
|
||||
int loudness, int bass_boost, int avc);
|
||||
void mpeg_play(int offset);
|
||||
void mpeg_stop(void);
|
||||
void mpeg_pause(void);
|
||||
|
|
@ -30,7 +31,6 @@ void mpeg_next(void);
|
|||
void mpeg_prev(void);
|
||||
void mpeg_ff_rewind(int change);
|
||||
void mpeg_flush_and_reload_tracks(void);
|
||||
bool mpeg_is_playing(void);
|
||||
void mpeg_sound_set(int setting, int value);
|
||||
int mpeg_sound_min(int setting);
|
||||
int mpeg_sound_max(int setting);
|
||||
|
|
@ -41,6 +41,7 @@ char *mpeg_sound_unit(int setting);
|
|||
int mpeg_sound_numdecimals(int setting);
|
||||
struct mp3entry* mpeg_current_track(void);
|
||||
bool mpeg_has_changed_track(void);
|
||||
int mpeg_status(void);
|
||||
#ifdef HAVE_MAS3587F
|
||||
void mpeg_set_pitch(int percent);
|
||||
#endif
|
||||
|
|
@ -60,4 +61,8 @@ void mpeg_set_pitch(int percent);
|
|||
#define MPEG_SOUND_MONO_LEFT 2
|
||||
#define MPEG_SOUND_MONO_RIGHT 3
|
||||
|
||||
#define MPEG_STATUS_PLAY 1
|
||||
#define MPEG_STATUS_PAUSE 2
|
||||
#define MPEG_STATUS_RECORD 4
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue