diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2003-04-11 23:45:38 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2003-04-11 23:45:38 +0000 |
commit | 6fc0df9ebb62e58b63c2b7e9cf823dcd4ab76bb7 (patch) | |
tree | 44dc0af9f536d8e238797bec7a76b2c4708267be /firmware/mpeg.c | |
parent | 20402c63759a03dac8eaff6e9f0d75a0850477e6 (diff) |
Now creates an empty ID3 header to not confuse MP3 editors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3539 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r-- | firmware/mpeg.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 015d6a9e2a..7e63bf21e3 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -1251,6 +1251,12 @@ static bool swap_one_chunk(void) return true; } +static const unsigned char empty_id3_header[] = +{ + 'I', 'D', '3', 0x04, 0x00, 0x00, + 0x00, 0x00, 0x1f, 0x76 /* Size is 4096 minus 10 bytes for the header */ +}; + static void mpeg_thread(void) { static int pause_tick = 0; @@ -1845,6 +1851,9 @@ static void mpeg_thread(void) mp3buf_write = 4096+417; memset(mp3buf, 0, 4096+417); + /* Insert the ID3 header */ + memcpy(mp3buf, empty_id3_header, sizeof(empty_id3_header)); + start_recording(); demand_irq_enable(true); |