diff options
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 c58c5a6bf2..b80c68384f 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -222,6 +222,23 @@ static int buffer_state = BUFFER_STATE_TRASHED; /* Buffer state */ | |||
222 | #define FILEBUFUSED RINGBUF_SUB(buf_widx, buf_ridx) | 222 | #define FILEBUFUSED RINGBUF_SUB(buf_widx, buf_ridx) |
223 | 223 | ||
224 | /* Track info structure about songs in the file buffer (A/C-) */ | 224 | /* Track info structure about songs in the file buffer (A/C-) */ |
225 | struct track_info { | ||
226 | struct mp3entry id3; /* TAG metadata */ | ||
227 | char *codecbuf; /* Pointer to codec buffer */ | ||
228 | size_t codecsize; /* Codec length in bytes */ | ||
229 | bool has_codec; /* Does this track have a codec on the buffer */ | ||
230 | |||
231 | size_t buf_idx; /* Pointer to the track's buffer */ | ||
232 | size_t filerem; /* Remaining bytes of file NOT in buffer */ | ||
233 | size_t filesize; /* File total length */ | ||
234 | size_t start_pos; /* Position to first bytes of file in buffer */ | ||
235 | volatile size_t available; /* Available bytes to read from buffer */ | ||
236 | |||
237 | bool taginfo_ready; /* Is metadata read */ | ||
238 | |||
239 | bool event_sent; /* Was this track's buffered event sent */ | ||
240 | }; | ||
241 | |||
225 | static struct track_info tracks[MAX_TRACK]; | 242 | static struct track_info tracks[MAX_TRACK]; |
226 | static volatile int track_ridx = 0; /* Track being decoded (A/C-) */ | 243 | static volatile int track_ridx = 0; /* Track being decoded (A/C-) */ |
227 | static int track_widx = 0; /* Track being buffered (A) */ | 244 | static int track_widx = 0; /* Track being buffered (A) */ |
diff --git a/apps/playback.h b/apps/playback.h index ac3adc4d3e..43cdd5972f 100644 --- a/apps/playback.h +++ b/apps/playback.h | |||
@@ -39,23 +39,6 @@ | |||
39 | 39 | ||
40 | #define MAX_TRACK_MASK (MAX_TRACK-1) | 40 | #define MAX_TRACK_MASK (MAX_TRACK-1) |
41 | 41 | ||
42 | struct track_info { | ||
43 | struct mp3entry id3; /* TAG metadata */ | ||
44 | char *codecbuf; /* Pointer to codec buffer */ | ||
45 | size_t codecsize; /* Codec length in bytes */ | ||
46 | bool has_codec; /* Does this track have a codec on the buffer */ | ||
47 | |||
48 | size_t buf_idx; /* Pointer to the track's buffer */ | ||
49 | size_t filerem; /* Remaining bytes of file NOT in buffer */ | ||
50 | size_t filesize; /* File total length */ | ||
51 | size_t start_pos; /* Position to first bytes of file in buffer */ | ||
52 | volatile size_t available; /* Available bytes to read from buffer */ | ||
53 | |||
54 | bool taginfo_ready; /* Is metadata read */ | ||
55 | |||
56 | bool event_sent; /* Was this track's buffered event sent */ | ||
57 | }; | ||
58 | |||
59 | /* Functions */ | 42 | /* Functions */ |
60 | const char * get_codec_filename(int cod_spec); | 43 | const char * get_codec_filename(int cod_spec); |
61 | void audio_set_track_changed_event(void (*handler)(struct mp3entry *id3)); | 44 | 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 4e671094c8..01166cc025 100644 --- a/apps/plugins/test_codec.c +++ b/apps/plugins/test_codec.c | |||
@@ -94,7 +94,12 @@ static char str[MAX_PATH]; | |||
94 | /* Our local implementation of the codec API */ | 94 | /* Our local implementation of the codec API */ |
95 | static struct codec_api ci; | 95 | static struct codec_api ci; |
96 | 96 | ||
97 | static struct track_info track; | 97 | struct test_track_info { |
98 | struct mp3entry id3; /* TAG metadata */ | ||
99 | size_t filesize; /* File total length */ | ||
100 | }; | ||
101 | |||
102 | static struct test_track_info track; | ||
98 | static bool taginfo_ready = true; | 103 | static bool taginfo_ready = true; |
99 | 104 | ||
100 | static volatile unsigned int elapsed; | 105 | static volatile unsigned int elapsed; |