[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/core MonoReader.cpp
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/core MonoReader.cpp |
Date: |
Tue, 22 May 2007 21:54:43 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/05/22 21:54:43
Modified files:
src/core : MonoReader.cpp
Log message:
* another shot at fixing sync logic
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/MonoReader.cpp?cvsroot=traverso&r1=1.12&r2=1.13
Patches:
Index: MonoReader.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/MonoReader.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- MonoReader.cpp 22 May 2007 21:15:57 -0000 1.12
+++ MonoReader.cpp 22 May 2007 21:54:43 -0000 1.13
@@ -205,7 +205,7 @@
} else {
/* if (m_wasActivated) {
m_wasActivated = 0;*/
- start_resync(start);
+
start_resync(m_clip->get_song()->get_transport_frame());
/* } else {
recover_from_buffer_underrun(start);
}*/
@@ -239,9 +239,9 @@
Q_ASSERT(m_clip);
// calculate position relative to the file!
- position -= (m_clip->get_track_start_frame() +
m_clip->get_source_start_frame());
+ long fileposition = position - (m_clip->get_track_start_frame() -
m_clip->get_source_start_frame());
- if (m_rbFileReadPos == position) {
+ if (m_rbFileReadPos == fileposition) {
// printf("ringbuffer allready at position %d\n", position);
return;
}
@@ -250,12 +250,11 @@
finish_resync();
}*/
- long fileposition = position;
// check if the clip's start position is within the range
// if not, fill the buffer from the earliest point this clip
// will come into play.
- if (fileposition < (int)m_clip->get_source_start_frame()) {
+ if (fileposition < 0) {
// printf("not seeking to %ld, but too %d\n\n",
fileposition,m_clip->get_source_start_frame());
// Song's start from 0, this makes a period start from
// 0 - 1023 for example, the nframes is 1024!