If it really needs a static limit of 50 pointers, might make sense to make it
80 now, because that's about maximum length of one CD, so it works with full
album mix CDs.
It could be made dynamic of course.
*hile*
On 12. Feb2012, at 0:49 , Akash Shetye wrote:
> Hey Thomas,
>
> That was really helpful. It now safely works for all sampling rate. Though
> not spot on at 1:00:00 because of some approximations in rendering the
> waveform. Nonetheless I can safely say the patch makes no assumptions, except
> that tracks must be under 50 :D minutes. Thanks again for the useful reply. I
> have uploaded the patch in the bug discussion.
>
> Thank you,
> Akash. Shetye.
>
>
> On Thu, Feb 9, 2012 at 7:00 PM, thomas vincent <[email protected]> wrote:
> Hi there,
>
> I thinks this is great to dig into mixxx code to contribute, go ahead !
>
> To find the relationship between actual timing (here 1:00:00) and
> sample position you have to involve the "sampling rate".
> For example in the most common case of a sampling rate of 44100 Hz
> (means sample per second) of a stereo song (left and rigth channel)
> your have :
>
> numberOfChannel x samplingRate x oneMinuteInSeconde =
> numberOfSampleInOneMinute
> 2 × 44100 × 60 = 5292000
>
> Witch is roughly what you "found".
> I hoping it makes sense ... :)
>
> vrince
>
>
> 2012/2/9 Akash Shetye <[email protected]>:
> > 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
> >
>
>
> ------------------------------------------------------------------------------
> 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
------------------------------------------------------------------------------
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