Thanks to Nico_P, struct track_info can now be internal to playback.c

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14947 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Steve Bavin 2007-10-02 07:47:43 +00:00
parent 227181deb0
commit 4d34457cd0
3 changed files with 23 additions and 18 deletions

View file

@ -222,6 +222,23 @@ static int buffer_state = BUFFER_STATE_TRASHED; /* Buffer state */
#define FILEBUFUSED RINGBUF_SUB(buf_widx, buf_ridx)
/* Track info structure about songs in the file buffer (A/C-) */
struct track_info {
struct mp3entry id3; /* TAG metadata */
char *codecbuf; /* Pointer to codec buffer */
size_t codecsize; /* Codec length in bytes */
bool has_codec; /* Does this track have a codec on the buffer */
size_t buf_idx; /* Pointer to the track's buffer */
size_t filerem; /* Remaining bytes of file NOT in buffer */
size_t filesize; /* File total length */
size_t start_pos; /* Position to first bytes of file in buffer */
volatile size_t available; /* Available bytes to read from buffer */
bool taginfo_ready; /* Is metadata read */
bool event_sent; /* Was this track's buffered event sent */
};
static struct track_info tracks[MAX_TRACK];
static volatile int track_ridx = 0; /* Track being decoded (A/C-) */
static int track_widx = 0; /* Track being buffered (A) */

View file

@ -39,23 +39,6 @@
#define MAX_TRACK_MASK (MAX_TRACK-1)
struct track_info {
struct mp3entry id3; /* TAG metadata */
char *codecbuf; /* Pointer to codec buffer */
size_t codecsize; /* Codec length in bytes */
bool has_codec; /* Does this track have a codec on the buffer */
size_t buf_idx; /* Pointer to the track's buffer */
size_t filerem; /* Remaining bytes of file NOT in buffer */
size_t filesize; /* File total length */
size_t start_pos; /* Position to first bytes of file in buffer */
volatile size_t available; /* Available bytes to read from buffer */
bool taginfo_ready; /* Is metadata read */
bool event_sent; /* Was this track's buffered event sent */
};
/* Functions */
const char * get_codec_filename(int cod_spec);
void audio_set_track_changed_event(void (*handler)(struct mp3entry *id3));

View file

@ -94,7 +94,12 @@ static char str[MAX_PATH];
/* Our local implementation of the codec API */
static struct codec_api ci;
static struct track_info track;
struct test_track_info {
struct mp3entry id3; /* TAG metadata */
size_t filesize; /* File total length */
};
static struct test_track_info track;
static bool taginfo_ready = true;
static volatile unsigned int elapsed;