[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gap-dev-discuss] Cynthiune : MP3 bundle and long delays

From: Philippe Roussel
Subject: Re: [Gap-dev-discuss] Cynthiune : MP3 bundle and long delays
Date: Tue, 22 May 2012 09:22:21 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

Le 22/05/2012 00:43, Riccardo Mottola a écrit :
> Hi,
> On 2012-05-20 20:45:23 +0200 Philippe Roussel <address@hidden> wrote:
>> Hi,
>> I got the MP3 bundle to seek very fast but I would like you guys to try
>> to understand the code because I'm missing something.
>> To suppress the long delay while seeking through a mp3, the following is
>> enough :
> Sadly, I had no time to look further at the code (and perhaps we should
> delay real rewrites after a  first maintenance release).

Yes, rewrites should wait, no question.

> You essentially resize a buffer. I tried on my iBook (linux/G3) and
> PowerBook (10.4/G4) and found out that 2 * 8192 is a pretty decent
> compromise value. I got both machines to "crackle" when putting on heavy
> load, where load is more disk IO / swapping bound than CPU bound. While
> it is pretty easy to overload the trusty ibook with its limited RAM
> (160MB) it was a bit more difficult with the PB. iTunes on the same
> machines really rarely skips. Thus there is surely place for optimization.

In your case, changing the threads priority could be enough. You could
try adding [NSSThread setThreadPriority:0.9] somewhere in ALSA.m

I will also try to mmap() the file instead of fread()ing it part by
part, it should simplify the code a lot.

> The buffer management could also explain the dirty noise that
> (sometimes) happens when seeking in a song or when skipping to the next
> song. There might be garbage under some conditions.


> I'd set the valoue from 5times to 2times, what do you think? Preferences
> could be added. But perhaps understanding the code better could improve
> it more and remove noises.

2 times seems like a good compromise right now.

I'll probably work some more on this to understand all the issues but I
don't want to hold a much needed release.
I don't think a preference would be a good thing, it should work out of
the box and the user shouldn't have to think about details like this.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]