summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJeffrey Goode <jeffg7@gmail.com>2011-05-09 21:52:06 +0000
committerJeffrey Goode <jeffg7@gmail.com>2011-05-09 21:52:06 +0000
commit8cb4b36ee3513e9c26e16e3d9cf8a788e1809602 (patch)
tree28b6570f48400da36b58460d9be1a49ec7ddac4b /apps
parent5a8f5b833093961096c7787ed46a18b4d69b554c (diff)
downloadrockbox-8cb4b36ee3513e9c26e16e3d9cf8a788e1809602.zip
rockbox-8cb4b36ee3513e9c26e16e3d9cf8a788e1809602.tar.gz
rockbox-8cb4b36ee3513e9c26e16e3d9cf8a788e1809602.tar.bz2
rockbox-8cb4b36ee3513e9c26e16e3d9cf8a788e1809602.tar.xz
Fix whitespace and some comment typos
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29850 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/pcmbuf.c28
-rw-r--r--apps/playback.c42
2 files changed, 35 insertions, 35 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c
index c7baad0..7201d39 100644
--- a/apps/pcmbuf.c
+++ b/apps/pcmbuf.c
@@ -206,7 +206,7 @@ static void commit_chunk(bool flush_next_time)
{
if (!pcmbuffer_fillpos)
return;
-
+
/* Never use the last buffer descriptor */
while (write_chunk == write_end_chunk) {
/* If this happens, something is being stupid */
@@ -217,9 +217,9 @@ static void commit_chunk(bool flush_next_time)
/* Let approximately one chunk of data playback */
sleep(HZ * PCMBUF_TARGET_CHUNK / BYTERATE);
}
-
+
/* commit the chunk */
-
+
register size_t size = pcmbuffer_fillpos;
/* Grab the next description to write, and change the write pointer */
register struct chunkdesc *pcmbuf_current = write_chunk;
@@ -229,7 +229,7 @@ static void commit_chunk(bool flush_next_time)
pcmbuf_current->size = size;
pcmbuf_current->end_of_track = false;
pcmbuf_current->link = NULL;
-
+
if (read_chunk != NULL)
{
if (flush_pcmbuf)
@@ -263,7 +263,7 @@ static void commit_chunk(bool flush_next_time)
* and the next chunk to be committed will be the next to be played.
* This is used to empty the PCM buffer for a track change. */
flush_pcmbuf = flush_next_time;
-
+
/* This is now the last buffer to read */
read_end_chunk = pcmbuf_current;
@@ -423,7 +423,7 @@ void pcmbuf_write_complete(int count)
if (crossfade_active)
write_to_crossfade(length);
else
-#endif
+#endif
{
pcmbuffer_fillpos += length;
COMMIT_IF_NEEDED;
@@ -553,7 +553,7 @@ bool pcmbuf_start_track_change(bool auto_skip)
}
}
#endif
-
+
if (!auto_skip || crossfade)
/* manual skip or crossfade */
{
@@ -640,7 +640,7 @@ static void pcmbuf_pcm_callback(unsigned char** start, size_t* size)
/* if during a track transition, update the elapsed time in ms */
if (track_transition)
audio_pcmbuf_position_callback(last_chunksize * 1000 / BYTERATE);
-
+
/* if last chunk in the track, stop updates and notify audio thread */
if (pcmbuf_current->end_of_track)
{
@@ -662,7 +662,7 @@ static void pcmbuf_pcm_callback(unsigned char** start, size_t* size)
crossfade_chunk = read_chunk;
#endif
}
-
+
{
/* Commit last samples at end of playlist */
if (pcmbuffer_fillpos && !read_chunk)
@@ -904,7 +904,7 @@ static void crossfade_start(void)
crossfade_mix_fade(factor, block_rem, NULL,
&fade_out_sample, &fade_out_chunk);
}
-
+
/* zero out the rest of the buffer */
crossfade_mix_fade(0, crossfade_rem, NULL,
&fade_out_sample, &fade_out_chunk);
@@ -997,7 +997,7 @@ static void pcmbuf_finish_crossfade_enable(void)
{
/* Copy the pending setting over now */
crossfade_enabled = crossfade_enable_request;
-
+
pcmbuf_watermark = (crossfade_enabled && pcmbuf_size) ?
/* If crossfading, try to keep the buffer full other than 1 second */
(pcmbuf_size - BYTERATE) :
@@ -1021,11 +1021,11 @@ bool pcmbuf_is_same_size(void)
/* if pcmbuffer is NULL, then not set up yet even once so always */
bool same_size = pcmbuffer ?
(get_next_required_pcmbuf_size() == pcmbuf_size) : true;
-
+
/* no buffer change needed, so finish crossfade setup now */
if (same_size)
pcmbuf_finish_crossfade_enable();
-
+
return same_size;
}
#endif /* HAVE_CROSSFADE */
@@ -1232,7 +1232,7 @@ void pcmbuf_beep(unsigned int frequency, size_t duration, int amplitude)
if (!bufstart || !pcm_is_playing())
return;
- /* Give 5ms clearance. */
+ /* Give 5ms clearance. */
bufstart += BYTERATE / 200;
#ifdef HAVE_PCM_DMA_ADDRESS
diff --git a/apps/playback.c b/apps/playback.c
index 3ff8d17..a808a62 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -132,7 +132,7 @@ static struct audio_scratch_memory
} * audio_scratch_memory = NULL;
/* These are used to store the current, next and optionally the peek-ahead
- * mp3entry's - this guarentees that the pointer returned by audio_current/
+ * mp3entry's - this guarantees that the pointer returned by audio_current/
* next_track will be valid for the full duration of the currently playing
* track */
enum audio_id3_types
@@ -153,7 +153,7 @@ enum audio_id3_types
static struct mp3entry static_id3_entries[ID3_TYPE_NUM_STATIC]; /* (A,O) */
/* Peeking functions can yield and mess us up */
-static struct mutex id3_mutex SHAREDBSS_ATTR; /* (A,0)*/
+static struct mutex id3_mutex SHAREDBSS_ATTR; /* (A,O)*/
/** For Scrobbler support **/
@@ -199,7 +199,7 @@ struct track_info
{
/* In per-track allocated order: */
int id3_hid; /* Metadata handle ID */
- int cuesheet_hid; /* Parsed cueesheet handle ID */
+ int cuesheet_hid; /* Parsed cuesheet handle ID */
#ifdef HAVE_ALBUMART
int aa_hid[MAX_MULTIPLE_AA];/* Album art handle IDs */
#endif
@@ -315,7 +315,7 @@ static struct
} track_change = { 0, 0 };
/** Codec status **/
-/* Did the codec notify us it finished while we were paused or while still
+/* Did the codec notify us it finished while we were paused or while still
in an automatic transition?
If paused, it is necessary to defer a codec-initiated skip until resuming
@@ -780,7 +780,7 @@ static void audio_reset_buffer(void)
#if defined(ROCKBOX_HAS_LOGF) && defined(LOGF_ENABLE)
/* Make sure everything adds up - yes, some info is a bit redundant but
- aids viewing and the sumation of certain variables should add up to
+ aids viewing and the summation of certain variables should add up to
the location of others. */
{
size_t pcmbufsize;
@@ -839,7 +839,7 @@ static void audio_update_filebuf_watermark(int seconds)
#endif
/* Watermark is a function of the bitrate of the last track in the buffer */
- struct mp3entry *id3 = NULL;
+ struct mp3entry *id3 = NULL;
struct track_info *info = track_list_last(0);
if (info)
@@ -854,7 +854,7 @@ static void audio_update_filebuf_watermark(int seconds)
else
{
/* Bitrate has no meaning to buffering margin for atomic audio -
- rebuffer when it's the only track left unless it's the only
+ rebuffer when it's the only track left unless it's the only
track that fits, in which case we should avoid constant buffer
low events */
if (track_list_count() > 1)
@@ -1475,7 +1475,7 @@ static bool audio_load_albumart(struct track_info *info,
#ifdef HAVE_CODEC_BUFFERING
/* Load a codec for the file onto the buffer - assumes we're working from the
currently loading track - not called for the current track */
-static bool audio_buffer_codec(struct track_info *track_info,
+static bool audio_buffer_codec(struct track_info *track_info,
struct mp3entry *track_id3)
{
/* 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)
if (track_list_empty())
return;
-
+
switch (event)
{
case BUFFER_EVENT_BUFFER_LOW:
@@ -2243,7 +2243,7 @@ static void audio_on_codec_complete(int status)
if (trackstat == LOAD_TRACK_ERR_NO_MORE)
{
- /* Failed to find anything afterall - do playlist switchover
+ /* Failed to find anything after all - do playlist switchover
instead */
skip_pending = TRACK_SKIP_AUTO_NEW_PLAYLIST;
end_of_playlist = playlist_next(1) < 0;
@@ -2683,7 +2683,7 @@ static void audio_on_ff_rewind(long time)
!audio_init_codec(cur_info, ci_id3))
{
/* We should have still been able to get it - skip it and move
- onto the next one - like it or not this track is borken */
+ onto the next one - like it or not this track is broken */
break;
}
@@ -2753,7 +2753,7 @@ static void audio_on_audio_flush(void)
id3_write_locked(UNBUFFERED_ID3, NULL);
audio_update_and_announce_next_track(NULL);
- /* Ignore return since it's about the next track, not this one */
+ /* Ignore return since it's about the next track, not this one */
audio_fill_file_buffer();
if (skip_pending == TRACK_SKIP_NONE)
@@ -2961,7 +2961,7 @@ static void audio_thread(void)
case Q_AUDIO_HANDLE_FINISHED:
/* some other type is buffered */
LOGFQUEUE("audio < Q_AUDIO_HANDLE_FINISHED");
- audio_on_handle_finished(ev.data);
+ audio_on_handle_finished(ev.data);
break;
/** Miscellaneous messages **/
@@ -3429,10 +3429,10 @@ unsigned char * audio_get_buffer(bool talk_buf, size_t *buffer_size)
/* Ok to use everything from audiobuf to audiobufend - voice is loaded,
the talk buffer is not needed because voice isn't being used, or
could be AUDIOBUF_STATE_TRASHED already. If state is
- AUDIOBUF_STATE_VOICED_ONLY, no problem as long as memory isn't written
- without the caller knowing what's going on. Changing certain settings
- may move it to a worse condition but the memory in use by something
- else will remain undisturbed.
+ AUDIOBUF_STATE_VOICED_ONLY, no problem as long as memory isn't
+ written without the caller knowing what's going on. Changing certain
+ settings may move it to a worse condition but the memory in use by
+ something else will remain undisturbed.
*/
if (buffer_state != AUDIOBUF_STATE_TRASHED)
{
@@ -3597,7 +3597,7 @@ void audio_remove_encoder(void)
}
#endif /* HAVE_RECORDING */
-/* Is an automatic skip in progress? If called outside transistion callbacks,
+/* Is an automatic skip in progress? If called outside transition callbacks,
indicates the last skip type at the time it was processed and isn't very
meaningful. */
bool audio_automatic_skip(void)
@@ -3612,7 +3612,7 @@ int audio_get_file_pos(void)
return 0;
}
-/* Return the elasped time of the track previous to the current */
+/* Return the elapsed time of the track previous to the current */
unsigned long audio_prev_elapsed(void)
{
return prev_track_elapsed;
@@ -3715,7 +3715,7 @@ void audio_init(void)
pcm_init();
codec_init_codec_api();
-
+
make_codec_thread();
/* This thread does buffer, so match its priority */
@@ -3732,7 +3732,7 @@ void audio_init(void)
voice_thread_init();
#endif
- /* audio_reset_buffer must to know the size of voice buffer so init
+ /* audio_reset_buffer must know the size of voice buffer so init
talk first */
talk_init();