Fixed mp3 bitrate calculation.
This commit is contained in:
parent
1503c2868f
commit
5434fe510b
2 changed files with 2 additions and 3 deletions
|
@ -23,7 +23,7 @@
|
||||||
unsigned char _inputBuffer[INPUT_BUFFER_SIZE+MAD_BUFFER_GUARD];
|
unsigned char _inputBuffer[INPUT_BUFFER_SIZE+MAD_BUFFER_GUARD];
|
||||||
unsigned char *_outputBuffer;
|
unsigned char *_outputBuffer;
|
||||||
int _outputFrames;
|
int _outputFrames;
|
||||||
int _fileSize;
|
long _fileSize;
|
||||||
|
|
||||||
id<CogSource> _source;
|
id<CogSource> _source;
|
||||||
|
|
||||||
|
|
|
@ -271,8 +271,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Need to make sure this is correct
|
bitrate = ((_fileSize - id3_length)/128) * (sampleRate/totalFrames);
|
||||||
bitrate = (_fileSize - id3_length) / ((sampleRate/1000.0)/totalFrames);
|
|
||||||
|
|
||||||
mad_frame_finish (&frame);
|
mad_frame_finish (&frame);
|
||||||
mad_stream_finish (&stream);
|
mad_stream_finish (&stream);
|
||||||
|
|
Loading…
Reference in a new issue