summaryrefslogtreecommitdiff
path: root/drivers/mpc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mpc')
-rw-r--r--drivers/mpc/audio_stream_mpc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mpc/audio_stream_mpc.cpp b/drivers/mpc/audio_stream_mpc.cpp
index e1f9aacf5f..cd8125c9af 100644
--- a/drivers/mpc/audio_stream_mpc.cpp
+++ b/drivers/mpc/audio_stream_mpc.cpp
@@ -8,6 +8,7 @@ Error AudioStreamMPC::_open_file() {
f=NULL;
}
Error err;
+ //printf("mpc open file %ls\n", file.c_str());
f=FileAccess::open(file,FileAccess::READ,&err);
if (err) {
@@ -16,9 +17,10 @@ Error AudioStreamMPC::_open_file() {
return err;
}
- f->seek_end(0);
- streamlen=f->get_pos();
- f->seek(0);
+ //printf("file size is %i\n", f->get_len());
+ //f->seek_end(0);
+ streamlen=f->get_len();
+ //f->seek(0);
if (streamlen<=0) {
memdelete(f);
f=NULL;
@@ -275,7 +277,7 @@ void AudioStreamMPC::stop() {
}
bool AudioStreamMPC::is_playing() const {
- return active;
+ return active || (get_total() - get_todo() -1 > 0);
}
void AudioStreamMPC::set_paused(bool p_paused) {