Hey,
Thank you Albert for that one or I would have still been going in circles.
College has been keeping me busy off late.I have managed to get the patch
working fine and it looks great. But I still have these questions.
It seems that the track is converted into frames and these frames then are
processed, so there seems to be no way for me (so far) to know at which
frame number will the minute 1:00:00 lie on.
However by some simple qDebugs I have figured out that it lies on the
position apprx 5292846. Its isn't exactly at 1:00:00 but it gives a
tolerable performance deviating in the worst cases by 00:59:30-88. Even if
it seems to work exactly like we intend it to, I do not want to base the
patch entirely on an approximate observation. Can anyone tell me about a
way to actually relate the 1:00:00th moment in a track with its position.
Well it is also true that the markers will be approximate representation
and will never be used as exact references by any DJ.
The code done so far works good and is optimized to save long calculations.
Following is the code that find out the minute markers. Its done in setData
of WOverview, so it is calculated only once for each song. m_minuteArray
is a float array of size 50 and stores the paint.drawLine(fPos, 0, fPos,
height()); ----- fPos values directly instead of calculating them in
paint() again and again.
long oneMinute = 5292846;
for(int i = 0; i < 50; i++){
if(oneMinute < m_liSampleDuration && oneMinute >= 5292846){ //
Addition may cross long limit, such must be detected too
m_minuteArray[i] = float(oneMinute) *
(width()-2)/m_liSampleDuration;
oneMinute = (long)(oneMinute + 5292846);
}
else{
m_minuteArray[i] = 0;
}
}
If you are reading this, thank you for your time ;)
Akash. Shetye
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel