Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re[2]: LOW_WATER and high bitrates
From: Uwe Freese (mail_at_uwe-freese.de)
Date: 2002-07-31


Hello Eric,

Eric Linenberg wrote on Wednesday, July 31, 2002, 6:10:00 PM:

EL> I think a good solution to this problem would be to have dynamic
EL> watermarks. After learning what bitrate the song is at. Dynamically
EL> adjust the watermark to reflect this. VBR file could be a bit of a
EL> problem though.

Are we reading the data from disk and sending it to the mp3
decoder without noticing mp3 frames or are we aware of the mp3frames? (I
think the first one.)
How can I find the beginning of an mp3-frame (and find the header)?

If that is possible, I think we should update the bitrate-field of the
id3tag-struct by making it the average of the ones that were found by
now, like:

double bitrate_sum = 0.0;
double frames_read = 0.0;

void DEI3(void) {

   // reading data from disk

   // get bitrate of actually read frame
   
   bitrate_sum += bitrate_this_frame;
   frames_read += 1.0;
   mp3entry.bitrate = (int)(bitrate_sum / frames_read);

}

(double to prevent overflow)

The playing time should also be updated while playing the song.

I'd prefer this instead of reading in the whole file before playing it
(it takes too long). And I think it'll give a really good average value
very quickly.

Bye, Uwe.



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa