We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25eaddf commit c40a936Copy full SHA for c40a936
codecs.h
@@ -136,7 +136,7 @@ class AudioCodec : public AudioStream, protected CodecFile
136
AudioCodec(void) : AudioStream(0, NULL) {initVars();}
137
bool pause(const bool paused);
138
bool isPlaying(void) {return playing > 0;}
139
- unsigned positionMillis(void) { return (AUDIO_SAMPLE_RATE_EXACT / 1000) * samples_played;}
+ unsigned positionMillis(void) { return (samples_played / AUDIO_SAMPLE_RATE_EXACT) * 1000;}
140
unsigned lengthMillis(void) {return max(fsize() / (bitrate / 8 ) * 1000, positionMillis());} //Ignores VBR
141
int channels(void) {return _channels;}
142
int bitRate(void) {return bitrate;}
0 commit comments