Add ReplayGain support to WMA (based on tags written by Foobar2000).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15340 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
28f6ae49ec
commit
868d3ce39c
1 changed files with 14 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
#include <inttypes.h>
|
||||
|
||||
#include "id3.h"
|
||||
#include "replaygain.h"
|
||||
#include "debug.h"
|
||||
#include "rbunicode.h"
|
||||
#include "metadata_common.h"
|
||||
|
@ -441,6 +442,19 @@ static int asf_parse_header(int fd, struct mp3entry* id3,
|
|||
} else {
|
||||
lseek(fd, length, SEEK_CUR);
|
||||
}
|
||||
} else if (!strncmp("replaygain_", utf8buf, 11)) {
|
||||
char* value = id3buf;
|
||||
int buf_len = id3buf_remaining;
|
||||
int len;
|
||||
asf_utf16LEdecode(fd, length, &id3buf, &id3buf_remaining);
|
||||
len = parse_replaygain(utf8buf, value, id3,
|
||||
value, buf_len);
|
||||
|
||||
if (len == 0) {
|
||||
/* Don't need to keep the value */
|
||||
id3buf = value;
|
||||
id3buf_remaining = buf_len;
|
||||
}
|
||||
} else {
|
||||
lseek(fd, length, SEEK_CUR);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue