summaryrefslogtreecommitdiff
path: root/csid.cpp
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2009-08-16 21:43:45 +0200
committerGravatar waker <wakeroid@gmail.com>2009-08-16 21:43:45 +0200
commit090ea2c0ad39873550092bde1608ffc9ce31d296 (patch)
tree517a10cfdbbf666c05bbe97f9e08344e42bd9668 /csid.cpp
parent7a72b074f0f5108ff56a7ec770a58cc0bfca908b (diff)
fixed flac/cue playback
Diffstat (limited to 'csid.cpp')
-rw-r--r--csid.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/csid.cpp b/csid.cpp
index 9de38a14..ed5abb50 100644
--- a/csid.cpp
+++ b/csid.cpp
@@ -276,7 +276,7 @@ csid_init (struct playItem_s *it) {
sidplay->load (tune);
csid.info.bitsPerSample = 16;
csid.info.samplesPerSecond = p_get_rate ();
- csid.info.position = 0;
+ csid.info.readposition = 0;
int maxsids = sidplay->info ().maxsids;
for (int k = 0; k < maxsids; k++) {
@@ -303,23 +303,23 @@ csid_free (void) {
extern "C" int
csid_read (char *bytes, int size) {
- if (csid.info.position > playlist_current.duration) {
+ if (csid.info.readposition > playlist_current.duration) {
return 0;
}
int rd = sidplay->play (bytes, size/csid.info.channels);
-// csid.info.position += size/csid.info.channels/2 / (float)csid.info.samplesPerSecond;
+ csid.info.readposition += size/csid.info.channels/2 / (float)csid.info.samplesPerSecond;
return rd * csid.info.channels;
}
extern "C" int
csid_seek (float time) {
float t = time;
- if (t < csid.info.position) {
+ if (t < csid.info.readposition) {
// reinit
sidplay->load (tune);
}
else {
- t -= csid.info.position;
+ t -= csid.info.readposition;
}
resid->filter (false);
int samples = t * csid.info.samplesPerSecond;
@@ -335,7 +335,7 @@ csid_seek (float time) {
samples -= done;
}
resid->filter (true);
- csid.info.position = time;
+ csid.info.readposition = time;
return 0;
}