|
Rockbox mail archiveSubject: Re: Re[2]: LOW_WATER and high bitratesRe: Re[2]: LOW_WATER and high bitrates
From: Paul Suade <paul.suade_at_laposte.net>
Date: Sat, 24 Aug 2002 20:30:06 +0200 back from vacation... ----- Original Message ----- From: "Nielsen Linus (ext)" <Linus.Nielsen_at_elema.siemens.se> To: <rockbox_at_cool.haxx.se> Sent: Thursday, August 01, 2002 7:40 AM Subject: RE: Re[2]: LOW_WATER and high bitrates > > 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.) > > Definitely the first one. > > > How can I find the beginning of an mp3-frame (and find the header)? > > You will have to search the bitstream for a frame sync word. > > > 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) use 'long long' instead of 'double'. > > First of all, it would take the CPU a lot of time to search that data and > find the frame sync words. Secondly, we don't have floating point support. > This CPU has no floating point unit. I don't think that is feasible. > SH1 has no floating point unit and using an fp emulation library would slow very much. Received on 2002-08-24 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |