Triode wrote: 
> 
> Seems to me we have two options:
> 1) separate resample per track which will result in loss of filter state
> over a gapless transition
> 2) one resample for all tracks, but need to make sure we drain at end of
> a playlist.  Downside is that track start marks may not be in the right
> place and potentially this will impact sync.
> 
> Which is preferred?

This is a two minute reply. Longer one tomorrow.

I'm not happy with the idea that the number of samples out does not
equal the number of samples in * the ratio. However it is happening it
doesn't need to happen. Since using that patch I posted earlier, and
calling drain() at the end of decode and creating a new resampler every
time, I haven't seen one incorrect count. Gapless transition is gapless
as long as you increase the size of the output buffer. (Before I did
that, I did have a couple of XRUN's.) But keeping the 10sec buffer, 384k
* 8 * 10 = "-b :30000" it has been fine on my desktop. I need to test on
WB.

There are a bunch of wierd things going on inside the resample process.
Sometimes exactly the same input frame count that caused an output count
the last time, doesn't the next time. It really makes it difficult to
debug. I got to the point earlier where I had a two track playlist, both
44k1 tracks, knew how many 32 bit frames in the two tracks there were
combined. Knew how many samples out I should be getting. Was calling
drain() after the last track, but the combined number of samples out was
varying by 300-400 every time. 

In any case, I think it may not be safe to carry on using the same
resampler after setting the input to null to flush it. I didn't get to
the bottom of that before I got completely frustrated trying to debug
and went back to a new resampler process per track, with drain() called
every time a decode finishes and a new resampler created for the next
track. It works. I can find no fault with it. I think this may be one of
those times that we don't need to try and be too clever! ;)

And with regard to sync, there are enough issues there already without
creating more!


------------------------------------------------------------------------
JackOfAll's Profile: http://forums.slimdevices.com/member.php?userid=3069
View this thread: http://forums.slimdevices.com/showthread.php?t=98544

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to