gives bogus values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libreplaygain (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Here's an example file: http://
When I run the "mp3gain" cli tool on it, I get this:
Recommended "Track" dB change: -0.730000
Recommended "Track" mp3 gain change: 0
Max PCM sample at current gain: 7739.570901
Max mp3 global gain field: 150
Min mp3 global gain field: 128
Seems reasonable.
But when I use my own program to feed data into libreplaygain I get bogus results. I looked into this further and created a simple test case that fails.
Here's the test file, converted to 44100 Hz, mono, 64-bit float raw file:
http://
Here's some C code relying on libreplaygain to parse the file:
#include <stdio.h>
#include <replaygain/
int main (int argc, char **argv)
{
FILE *file = fopen(argv[1], "rb");
double buf[50000];
size_t bytes_read = fread(buf, 1, 400000, file);
gain_
gain_
fclose(file);
printf(
printf("track gain: %f\n", gain_get_title());
}
When I run this, I see:
analyzed 47232 samples
track gain: 0.000000
Am I missing something? Is there anywhere that a working replaygain example exists, perhaps a bit simpler than the source to mp3gain?
In my opinion this module should be pulled in favor of https:/ /github. com/jiixyj/ libebur128