diff options
| author | Steve Bavin <pondlife@pondlife.me> | 2007-10-02 07:47:43 +0000 |
|---|---|---|
| committer | Steve Bavin <pondlife@pondlife.me> | 2007-10-02 07:47:43 +0000 |
| commit | 4d34457cd0a1958ff271bb2d87bfdba1432b678e (patch) | |
| tree | 74619bcbf25da3d5503e7d010776f92f75f5bbc7 /apps | |
| parent | 227181deb0be5de2ddcf0d28f057f4175dc051b9 (diff) | |
| download | rockbox-4d34457cd0a1958ff271bb2d87bfdba1432b678e.zip rockbox-4d34457cd0a1958ff271bb2d87bfdba1432b678e.tar.gz rockbox-4d34457cd0a1958ff271bb2d87bfdba1432b678e.tar.bz2 rockbox-4d34457cd0a1958ff271bb2d87bfdba1432b678e.tar.xz | |
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
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/playback.c | 17 | ||||
| -rw-r--r-- | apps/playback.h | 17 | ||||
| -rw-r--r-- | apps/plugins/test_codec.c | 7 |
3 files changed, 23 insertions, 18 deletions
diff --git a/apps/playback.c b/apps/playback.c index c58c5a6..b80c683 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -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) */ diff --git a/apps/playback.h b/apps/playback.h index ac3adc4..43cdd59 100644 --- a/apps/playback.h +++ b/apps/playback.h @@ -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)); diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c index 4e67109..01166cc 100644 --- a/apps/plugins/test_codec.c +++ b/apps/plugins/test_codec.c @@ -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; |