diff options
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/apps/playback.c b/apps/playback.c index 3ff8d17214..a808a62a0e 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -132,7 +132,7 @@ static struct audio_scratch_memory | |||
132 | } * audio_scratch_memory = NULL; | 132 | } * audio_scratch_memory = NULL; |
133 | 133 | ||
134 | /* These are used to store the current, next and optionally the peek-ahead | 134 | /* These are used to store the current, next and optionally the peek-ahead |
135 | * mp3entry's - this guarentees that the pointer returned by audio_current/ | 135 | * mp3entry's - this guarantees that the pointer returned by audio_current/ |
136 | * next_track will be valid for the full duration of the currently playing | 136 | * next_track will be valid for the full duration of the currently playing |
137 | * track */ | 137 | * track */ |
138 | enum audio_id3_types | 138 | enum audio_id3_types |
@@ -153,7 +153,7 @@ enum audio_id3_types | |||
153 | static struct mp3entry static_id3_entries[ID3_TYPE_NUM_STATIC]; /* (A,O) */ | 153 | static struct mp3entry static_id3_entries[ID3_TYPE_NUM_STATIC]; /* (A,O) */ |
154 | 154 | ||
155 | /* Peeking functions can yield and mess us up */ | 155 | /* Peeking functions can yield and mess us up */ |
156 | static struct mutex id3_mutex SHAREDBSS_ATTR; /* (A,0)*/ | 156 | static struct mutex id3_mutex SHAREDBSS_ATTR; /* (A,O)*/ |
157 | 157 | ||
158 | 158 | ||
159 | /** For Scrobbler support **/ | 159 | /** For Scrobbler support **/ |
@@ -199,7 +199,7 @@ struct track_info | |||
199 | { | 199 | { |
200 | /* In per-track allocated order: */ | 200 | /* In per-track allocated order: */ |
201 | int id3_hid; /* Metadata handle ID */ | 201 | int id3_hid; /* Metadata handle ID */ |
202 | int cuesheet_hid; /* Parsed cueesheet handle ID */ | 202 | int cuesheet_hid; /* Parsed cuesheet handle ID */ |
203 | #ifdef HAVE_ALBUMART | 203 | #ifdef HAVE_ALBUMART |
204 | int aa_hid[MAX_MULTIPLE_AA];/* Album art handle IDs */ | 204 | int aa_hid[MAX_MULTIPLE_AA];/* Album art handle IDs */ |
205 | #endif | 205 | #endif |
@@ -315,7 +315,7 @@ static struct | |||
315 | } track_change = { 0, 0 }; | 315 | } track_change = { 0, 0 }; |
316 | 316 | ||
317 | /** Codec status **/ | 317 | /** Codec status **/ |
318 | /* Did the codec notify us it finished while we were paused or while still | 318 | /* Did the codec notify us it finished while we were paused or while still |
319 | in an automatic transition? | 319 | in an automatic transition? |
320 | 320 | ||
321 | If paused, it is necessary to defer a codec-initiated skip until resuming | 321 | If paused, it is necessary to defer a codec-initiated skip until resuming |
@@ -780,7 +780,7 @@ static void audio_reset_buffer(void) | |||
780 | 780 | ||
781 | #if defined(ROCKBOX_HAS_LOGF) && defined(LOGF_ENABLE) | 781 | #if defined(ROCKBOX_HAS_LOGF) && defined(LOGF_ENABLE) |
782 | /* Make sure everything adds up - yes, some info is a bit redundant but | 782 | /* Make sure everything adds up - yes, some info is a bit redundant but |
783 | aids viewing and the sumation of certain variables should add up to | 783 | aids viewing and the summation of certain variables should add up to |
784 | the location of others. */ | 784 | the location of others. */ |
785 | { | 785 | { |
786 | size_t pcmbufsize; | 786 | size_t pcmbufsize; |
@@ -839,7 +839,7 @@ static void audio_update_filebuf_watermark(int seconds) | |||
839 | #endif | 839 | #endif |
840 | 840 | ||
841 | /* Watermark is a function of the bitrate of the last track in the buffer */ | 841 | /* Watermark is a function of the bitrate of the last track in the buffer */ |
842 | struct mp3entry *id3 = NULL; | 842 | struct mp3entry *id3 = NULL; |
843 | struct track_info *info = track_list_last(0); | 843 | struct track_info *info = track_list_last(0); |
844 | 844 | ||
845 | if (info) | 845 | if (info) |
@@ -854,7 +854,7 @@ static void audio_update_filebuf_watermark(int seconds) | |||
854 | else | 854 | else |
855 | { | 855 | { |
856 | /* Bitrate has no meaning to buffering margin for atomic audio - | 856 | /* Bitrate has no meaning to buffering margin for atomic audio - |
857 | rebuffer when it's the only track left unless it's the only | 857 | rebuffer when it's the only track left unless it's the only |
858 | track that fits, in which case we should avoid constant buffer | 858 | track that fits, in which case we should avoid constant buffer |
859 | low events */ | 859 | low events */ |
860 | if (track_list_count() > 1) | 860 | if (track_list_count() > 1) |
@@ -1475,7 +1475,7 @@ static bool audio_load_albumart(struct track_info *info, | |||
1475 | #ifdef HAVE_CODEC_BUFFERING | 1475 | #ifdef HAVE_CODEC_BUFFERING |
1476 | /* Load a codec for the file onto the buffer - assumes we're working from the | 1476 | /* Load a codec for the file onto the buffer - assumes we're working from the |
1477 | currently loading track - not called for the current track */ | 1477 | currently loading track - not called for the current track */ |
1478 | static bool audio_buffer_codec(struct track_info *track_info, | 1478 | static bool audio_buffer_codec(struct track_info *track_info, |
1479 | struct mp3entry *track_id3) | 1479 | struct mp3entry *track_id3) |
1480 | { | 1480 | { |
1481 | /* This will not be the current track -> it cannot be the first and the | 1481 | /* This will not be the current track -> it cannot be the first and the |
@@ -1899,7 +1899,7 @@ static void audio_on_buffering(int event) | |||
1899 | 1899 | ||
1900 | if (track_list_empty()) | 1900 | if (track_list_empty()) |
1901 | return; | 1901 | return; |
1902 | 1902 | ||
1903 | switch (event) | 1903 | switch (event) |
1904 | { | 1904 | { |
1905 | case BUFFER_EVENT_BUFFER_LOW: | 1905 | case BUFFER_EVENT_BUFFER_LOW: |
@@ -2243,7 +2243,7 @@ static void audio_on_codec_complete(int status) | |||
2243 | 2243 | ||
2244 | if (trackstat == LOAD_TRACK_ERR_NO_MORE) | 2244 | if (trackstat == LOAD_TRACK_ERR_NO_MORE) |
2245 | { | 2245 | { |
2246 | /* Failed to find anything afterall - do playlist switchover | 2246 | /* Failed to find anything after all - do playlist switchover |
2247 | instead */ | 2247 | instead */ |
2248 | skip_pending = TRACK_SKIP_AUTO_NEW_PLAYLIST; | 2248 | skip_pending = TRACK_SKIP_AUTO_NEW_PLAYLIST; |
2249 | end_of_playlist = playlist_next(1) < 0; | 2249 | end_of_playlist = playlist_next(1) < 0; |
@@ -2683,7 +2683,7 @@ static void audio_on_ff_rewind(long time) | |||
2683 | !audio_init_codec(cur_info, ci_id3)) | 2683 | !audio_init_codec(cur_info, ci_id3)) |
2684 | { | 2684 | { |
2685 | /* We should have still been able to get it - skip it and move | 2685 | /* We should have still been able to get it - skip it and move |
2686 | onto the next one - like it or not this track is borken */ | 2686 | onto the next one - like it or not this track is broken */ |
2687 | break; | 2687 | break; |
2688 | } | 2688 | } |
2689 | 2689 | ||
@@ -2753,7 +2753,7 @@ static void audio_on_audio_flush(void) | |||
2753 | id3_write_locked(UNBUFFERED_ID3, NULL); | 2753 | id3_write_locked(UNBUFFERED_ID3, NULL); |
2754 | audio_update_and_announce_next_track(NULL); | 2754 | audio_update_and_announce_next_track(NULL); |
2755 | 2755 | ||
2756 | /* Ignore return since it's about the next track, not this one */ | 2756 | /* Ignore return since it's about the next track, not this one */ |
2757 | audio_fill_file_buffer(); | 2757 | audio_fill_file_buffer(); |
2758 | 2758 | ||
2759 | if (skip_pending == TRACK_SKIP_NONE) | 2759 | if (skip_pending == TRACK_SKIP_NONE) |
@@ -2961,7 +2961,7 @@ static void audio_thread(void) | |||
2961 | case Q_AUDIO_HANDLE_FINISHED: | 2961 | case Q_AUDIO_HANDLE_FINISHED: |
2962 | /* some other type is buffered */ | 2962 | /* some other type is buffered */ |
2963 | LOGFQUEUE("audio < Q_AUDIO_HANDLE_FINISHED"); | 2963 | LOGFQUEUE("audio < Q_AUDIO_HANDLE_FINISHED"); |
2964 | audio_on_handle_finished(ev.data); | 2964 | audio_on_handle_finished(ev.data); |
2965 | break; | 2965 | break; |
2966 | 2966 | ||
2967 | /** Miscellaneous messages **/ | 2967 | /** Miscellaneous messages **/ |
@@ -3429,10 +3429,10 @@ unsigned char * audio_get_buffer(bool talk_buf, size_t *buffer_size) | |||
3429 | /* Ok to use everything from audiobuf to audiobufend - voice is loaded, | 3429 | /* Ok to use everything from audiobuf to audiobufend - voice is loaded, |
3430 | the talk buffer is not needed because voice isn't being used, or | 3430 | the talk buffer is not needed because voice isn't being used, or |
3431 | could be AUDIOBUF_STATE_TRASHED already. If state is | 3431 | could be AUDIOBUF_STATE_TRASHED already. If state is |
3432 | AUDIOBUF_STATE_VOICED_ONLY, no problem as long as memory isn't written | 3432 | AUDIOBUF_STATE_VOICED_ONLY, no problem as long as memory isn't |
3433 | without the caller knowing what's going on. Changing certain settings | 3433 | written without the caller knowing what's going on. Changing certain |
3434 | may move it to a worse condition but the memory in use by something | 3434 | settings may move it to a worse condition but the memory in use by |
3435 | else will remain undisturbed. | 3435 | something else will remain undisturbed. |
3436 | */ | 3436 | */ |
3437 | if (buffer_state != AUDIOBUF_STATE_TRASHED) | 3437 | if (buffer_state != AUDIOBUF_STATE_TRASHED) |
3438 | { | 3438 | { |
@@ -3597,7 +3597,7 @@ void audio_remove_encoder(void) | |||
3597 | } | 3597 | } |
3598 | #endif /* HAVE_RECORDING */ | 3598 | #endif /* HAVE_RECORDING */ |
3599 | 3599 | ||
3600 | /* Is an automatic skip in progress? If called outside transistion callbacks, | 3600 | /* Is an automatic skip in progress? If called outside transition callbacks, |
3601 | indicates the last skip type at the time it was processed and isn't very | 3601 | indicates the last skip type at the time it was processed and isn't very |
3602 | meaningful. */ | 3602 | meaningful. */ |
3603 | bool audio_automatic_skip(void) | 3603 | bool audio_automatic_skip(void) |
@@ -3612,7 +3612,7 @@ int audio_get_file_pos(void) | |||
3612 | return 0; | 3612 | return 0; |
3613 | } | 3613 | } |
3614 | 3614 | ||
3615 | /* Return the elasped time of the track previous to the current */ | 3615 | /* Return the elapsed time of the track previous to the current */ |
3616 | unsigned long audio_prev_elapsed(void) | 3616 | unsigned long audio_prev_elapsed(void) |
3617 | { | 3617 | { |
3618 | return prev_track_elapsed; | 3618 | return prev_track_elapsed; |
@@ -3715,7 +3715,7 @@ void audio_init(void) | |||
3715 | pcm_init(); | 3715 | pcm_init(); |
3716 | 3716 | ||
3717 | codec_init_codec_api(); | 3717 | codec_init_codec_api(); |
3718 | 3718 | ||
3719 | make_codec_thread(); | 3719 | make_codec_thread(); |
3720 | 3720 | ||
3721 | /* This thread does buffer, so match its priority */ | 3721 | /* This thread does buffer, so match its priority */ |
@@ -3732,7 +3732,7 @@ void audio_init(void) | |||
3732 | voice_thread_init(); | 3732 | voice_thread_init(); |
3733 | #endif | 3733 | #endif |
3734 | 3734 | ||
3735 | /* audio_reset_buffer must to know the size of voice buffer so init | 3735 | /* audio_reset_buffer must know the size of voice buffer so init |
3736 | talk first */ | 3736 | talk first */ |
3737 | talk_init(); | 3737 | talk_init(); |
3738 | 3738 | ||