On 01/09/2012 04:00 PM, Rui Nuno Capela wrote:
Thanks a bunch. :) Attached is another suggested patch against the
current trunk (r2660) to make qtractor send an MMC locate after jumping
back to the beginning of a loop. It's not perfect, but I'm posting it
anyway in case someone may find it useful.
As you can see I handled this in the timer callback of the main form
which isn't 100% accurate, but I never found it to be off by more than 1
frame, which I guess is good enough for my purposes. There are surely
better ways to do this, but I wasn't able to figure that out without
investing much more time reading the source code. Ideally, this should
be handled on the spot somewhere in the MIDI engine. I tried to add it
directly in qtractorMidiOutputThread::process(), but the read-ahead gets
in the way there, so I couldn't find a proper way to make that work. (Is
there a way in qtractor to schedule a callback exactly at the *real*
time when the play head reaches a given position? Then this would be easy.)
There are a few other situations where an MMC locate is still missing,
specifically after ending a rewind or fast-forward, but I have no idea
how to fix this without diving into the qtractor sources much more than
I did. :(
Cheers,
Albert
--
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email: Dr.Graef@t-online.de, ag@muwiinfa.geschichte.uni-mainz.de
WWW: http://www.musikinformatik.uni-mainz.de/ag
LINUX® is a registered trademark of Linus Torvalds in the USA and other countries.
Linuxaudio.org logo copyright Thorsten Wilms © 2006.
Hosting provided by the Virginia Tech Department of Music and DISIS.