Skip to content

Commit

Permalink
Update codecs.h
Browse files Browse the repository at this point in the history
  • Loading branch information
pr8x authored Apr 23, 2023
1 parent 25eaddf commit c40a936
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class AudioCodec : public AudioStream, protected CodecFile
AudioCodec(void) : AudioStream(0, NULL) {initVars();}
bool pause(const bool paused);
bool isPlaying(void) {return playing > 0;}
unsigned positionMillis(void) { return (AUDIO_SAMPLE_RATE_EXACT / 1000) * samples_played;}
unsigned positionMillis(void) { return (samples_played / AUDIO_SAMPLE_RATE_EXACT) * 1000;}
unsigned lengthMillis(void) {return max(fsize() / (bitrate / 8 ) * 1000, positionMillis());} //Ignores VBR
int channels(void) {return _channels;}
int bitRate(void) {return bitrate;}
Expand Down

0 comments on commit c40a936

Please sign in to comment.