Forgot to copy the list... On Sat, Sep 11, 2010 at 1:31 PM, Albert Santoni <albe...@mixxx.org> wrote: > The EngineBuffer changes look OK to me, I think I understand what you did. > > This stuff in EBSL looks wrong to me though: > > === modified file 'mixxx/src/engine/enginebufferscalelinear.cpp' > --- old/mixxx/src/engine/enginebufferscalelinear.cpp 2010-06-17 07:20:57 > +0000 > +++ new/mixxx/src/engine/enginebufferscalelinear.cpp 2010-08-25 03:18:32 > +0000 > > > // Multiply by 2 because it is predicting mono rates, while we > want a stereo > // number of samples. > unscaled_samples_needed *= 2; > - > + if ( ! even(unscaled_samples_needed)) > + unscaled_samples_needed++; > + > + samples *= 2; > + > + if (m_dBaseRate >= 0) > + new_playpos += samples; > + else if (m_dBaseRate < 0) > + new_playpos -= samples; > + > + > Q_ASSERT(unscaled_samples_needed >= 0); > Q_ASSERT(unscaled_samples_needed != 0); > > @@ -164,11 +176,11 @@ > long prev_sample = 0; > bool last_read_failed = false; > > - // Use new_playpos to count the new samples we touch. > - new_playpos = 0; > > int i = 0; > int screwups = 0; > + > + > while(i < buf_size) > { > prev_sample = current_sample; > @@ -199,10 +211,6 @@ > buffer_size = m_pReadAheadManager > ->getNextSamples(m_dBaseRate,buffer_int, > > samples_to_read); > - if (m_dBaseRate > 0) > - new_playpos += buffer_size; > - else if (m_dBaseRate < 0) > - new_playpos -= buffer_size; > > > ====================== > > You can't factor those if statements that update new_playpos out of > the loop because we don't know how many samples we're actually going > to get out or RAMAN. If I understand the code correctly, you've moved > it out of the loop and then assumed we're going to get "samples" > number of samples out of RAMAN. The simulation loop to get the > estimate of the number of samples is fine, but we can't assume that > we're going to get that number of samples in case RAMAN messes up. In > that case, the new_playpos will be totally wrong... > > Albert >
------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel