diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2005-09-10 12:28:16 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2005-09-10 12:28:16 +0000 |
| commit | ec9b202a921996945ebd42a7edba1326754d7737 (patch) | |
| tree | f88c7d9ee1ff94c3a5cefdba0d30c78b84e72d62 /firmware/export/id3.h | |
| parent | 1996dca15a495c09986cefc02086e03a53244f3a (diff) | |
| download | rockbox-ec9b202a921996945ebd42a7edba1326754d7737.zip rockbox-ec9b202a921996945ebd42a7edba1326754d7737.tar.gz rockbox-ec9b202a921996945ebd42a7edba1326754d7737.tar.bz2 rockbox-ec9b202a921996945ebd42a7edba1326754d7737.tar.xz | |
Reworked handling of MPEG audio frame & file info: * Fixed frame size calculation for layer 1 (all versions) and layer 2 (V2/V2.5). * Exact frame time (expressed as a fraction) for way more precise playtime calculation at 44100/22050/11025Hz sample frequency. * Exact playtime<->position conversion for CBR also used for resume position. * More compact code, long policy.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7505 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/id3.h')
| -rw-r--r-- | firmware/export/id3.h | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/firmware/export/id3.h b/firmware/export/id3.h index 6c65071..47a084d 100644 --- a/firmware/export/id3.h +++ b/firmware/export/id3.h @@ -61,39 +61,37 @@ struct mp3entry { unsigned char genre; unsigned int codectype; unsigned int bitrate; - unsigned int frequency; - unsigned int id3v2len; - unsigned int id3v1len; - unsigned int first_frame_offset; /* Byte offset to first real MP3 frame. - Used for skipping leading garbage to - avoid gaps between tracks. */ - unsigned int vbr_header_pos; - unsigned int filesize; /* in bytes */ - unsigned int length; /* song length */ - unsigned int elapsed; /* ms played */ - - int lead_trim; /* Number of samples to skip at the beginning */ - int tail_trim; /* Number of samples to remove from the end */ + unsigned long frequency; + unsigned long id3v2len; + unsigned long id3v1len; + unsigned long first_frame_offset; /* Byte offset to first real MP3 frame. + Used for skipping leading garbage to + avoid gaps between tracks. */ + unsigned long vbr_header_pos; + unsigned long filesize; /* without headers; in bytes */ + unsigned long length; /* song length in ms */ + unsigned long elapsed; /* ms played */ + + int lead_trim; /* Number of samples to skip at the beginning */ + int tail_trim; /* Number of samples to remove from the end */ /* Added for Vorbis */ - unsigned long samples; /* number of samples in track */ + unsigned long samples; /* number of samples in track */ /* MP3 stream specific info */ - long bpf; /* bytes per frame */ - long tpf; /* time per frame */ - long frame_count; /* number of frames in the file (if VBR) */ + unsigned long frame_count; /* number of frames in the file (if VBR) */ /* Xing VBR fields */ bool vbr; - bool has_toc; /* True if there is a VBR header in the file */ - unsigned char toc[100];/* table of contents */ + bool has_toc; /* True if there is a VBR header in the file */ + unsigned char toc[100]; /* table of contents */ /* these following two fields are used for local buffering */ char id3v2buf[300]; char id3v1buf[3][32]; /* resume related */ - int offset; /* bytes played */ + unsigned long offset; /* bytes played */ int index; /* playlist index */ /* FileEntry fields */ |