Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codecs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ bool AudioCodec::pause(const bool paused)
/** from Fat16util.h 2008 by William Greiman**/
int AudioCodec::freeRam(void) {
extern int __bss_end;
extern int* __brkval;
extern char* __brkval;
int free_memory;
if (reinterpret_cast<int>(__brkval) == 0) {
// if no heap use from end of bss section
Expand Down
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