diff options
author | Dave Chapman <dave@dchapman.com> | 2005-06-10 18:12:36 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2005-06-10 18:12:36 +0000 |
commit | d28b94bc3d5e07f9dbc9c7c7827b80e28b4c67a2 (patch) | |
tree | cf1605b0948c5fd0b59fcc10d186c688caa0505c /apps/playback.c | |
parent | 3c2c2f59f4578c41d591f0e8e88a07103cee499b (diff) |
Correctly calculate bitrate for WAV files - bitrate is bits/second, not bytes/second
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6655 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c index 4cefed20c2..15c57f58e3 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -719,7 +719,7 @@ bool audio_load_track(int offset, bool start_play, int peek_offset) /* Calculate track length (in ms) and estimate the bitrate (in kbit/s) */ tracks[track_widx].id3.length=(totalsamples/tracks[track_widx].id3.frequency)*1000; - tracks[track_widx].id3.bitrate=(tracks[track_widx].id3.frequency*bytespersample)/1024; + tracks[track_widx].id3.bitrate=(tracks[track_widx].id3.frequency*bytespersample)/(1024/8); lseek(fd, 0, SEEK_SET); strncpy(tracks[track_widx].id3.path,trackname,sizeof(tracks[track_widx].id3.path)); |