Skip to content

Commit c40a936

Browse files
authored
Update codecs.h
1 parent 25eaddf commit c40a936

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codecs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class AudioCodec : public AudioStream, protected CodecFile
136136
AudioCodec(void) : AudioStream(0, NULL) {initVars();}
137137
bool pause(const bool paused);
138138
bool isPlaying(void) {return playing > 0;}
139-
unsigned positionMillis(void) { return (AUDIO_SAMPLE_RATE_EXACT / 1000) * samples_played;}
139+
unsigned positionMillis(void) { return (samples_played / AUDIO_SAMPLE_RATE_EXACT) * 1000;}
140140
unsigned lengthMillis(void) {return max(fsize() / (bitrate / 8 ) * 1000, positionMillis());} //Ignores VBR
141141
int channels(void) {return _channels;}
142142
int bitRate(void) {return bitrate;}

0 commit comments

Comments
 (0)