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