Musepack Forums

Musepack Forums (https://forum.musepack.net/index.php)
-   Tech (https://forum.musepack.net/forumdisplay.php?f=7)
-   -   slow seeking problem (https://forum.musepack.net/showthread.php?t=604)

Bob 13 August 2009 09:00 pm

slow seeking problem
 
I'm trying to use:
mpc_demux_seek_second()
to seek. After calling it, my read loop with
mpc_demux_decode()
returns 0 samples repeatedly and finally starts reading data again after a fairly long delay. The result is that seeking works but it seems much slower than in sv7 where mpc_decoder_decode() never returned with 0 samples read. Am I missing something here??

r2d 26 August 2009 09:14 pm

The default packet size for sv8 is 64 frames (so 1 key frame and 63 'non-key' frames). Seeking jumps to the first key frame of a packet and mark the number of samples that must be skipped. So until all the to-be-skipped samples are not decoded, mpc_demux_decode() returns no sample.

The old behavior (sv7) was to start decoding from the *beginning* of the stream, without skipping any sample. It was just that the function did not returned after every frame, but when seeking was finished.

The current behavior may be improved by adding the mpc_demux_decode() calls returning 0 samples in mpc_demux_seek_sample().

Anyway, sv8 seeking is clearly faster than the old sv7 seeking.


All times are GMT. The time now is 05:33 am.

Powered by vBulletin® Version 3.8.11 Beta 2
Copyright ©2000 - 2019, vBulletin Solutions Inc.