Musepack Forums  

Go Back   Musepack Forums > Main > Tech

Reply
 
Thread Tools Search this Thread Display Modes
Old 13 August 2009, 09:00 pm   #1
Bob
Member
 
Join Date: Dec 2005
Posts: 7
Default 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??
Bob is offline   Reply With Quote
Old 26 August 2009, 09:14 pm   #2
r2d
Musepack developer
 
Join Date: Sep 2006
Location: Villeurbanne - France
Posts: 36
Default

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.
r2d is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 08:43 pm.


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