Skip to main content
Topic: foo_dsp_crossfader RAM usage/Fade Duration (Read 3036 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_dsp_crossfader RAM usage/Fade Duration


First of all greets to both foobar2k/plugin developers and fellow posters.
I've been lurking for a month at hydrogenaudio and yes i've read the glitch issue
and the crossfader/no_gap conflict yet this one is more specific and hopefully
easy to reproduce:

Setup:
foobar2k 0.667 (winnt version -latest version components)
foo_mirc, foo_id3v2, foo_dsp_crossfader (0.0.6), foo_stfu, foo_infobox_simple

Active DSP(s):
foo_dsp_crossfader
(similar results with the Attenuator enabled)

Box specs:
P-III @ 733mhz, 382M RAM. Win2k Enterprise.

The following results by win2k's taskmanager and coolmon v1.0 rc2:
Code: [Select]
Fade Duration         RAM Usage
1304ms                7.196K
10033ms               13.224K
30000ms               27.024K
-----------------------------------
Ram Used without any DSP: 6,076K
note: all figures recorded while playing back mpc files.

So here comes the query. Is this something to be expected ? If not, are we going to see a new
version of the crossfader with a more sensible usage of our (mine at least) precious ram?
[/font]
"Mars is square and intensely coloured" - Johannes Kepler (1571-1630)

foo_dsp_crossfader RAM usage/Fade Duration

Reply #1
so, basically, you want it to buffer the audio, but you don't want it to use ram to do that?  Let me know how it turns out.  I'd like to buy one of those new Saleen monster cars, but I don't want to pay for it.

foo_dsp_crossfader RAM usage/Fade Duration

Reply #2
Quote
so, basically, you want it to buffer the audio, but you don't want it to use ram to do that?  Let me know how it turns out.  I'd like to buy one of those new Saleen monster cars, but I don't want to pay for it.

hmm.. great a guy comes and asks for advice and you greet him with sarcasm?

great.

foo_dsp_crossfader RAM usage/Fade Duration

Reply #3
Quote
[...]
So here comes the query. Is this something to be expected ? If not, are we going to see a new version of the crossfader with a more sensible usage of our (mine at least) precious ram?

Crossfader will always need memory, at the minimum it has to buffer as many samples as fade duration specifies. The amount of memory needed for this can be calculated with formula samplerate (in Hz) * duration (in seconds) * channels * 8 (8 is the bytes one sample in foobar needs), for example with 44.1kHz stereo files and 30 second buffer this makes 44100 * 30 * 2 * 8 = 20 MB. There also needs to be some room in the buffer to write new samples, otherwise old contents would be overwritten before knowing about track end and crossfading duration wouldn't be correct.
Too bad I don't have sources for 0.0.6 version anymore so I can't check if it did something stupid to allocate way more memory than needed.

Edit: I can't think it seems, changed 4 to 8.

foo_dsp_crossfader RAM usage/Fade Duration

Reply #4
Quote
Crossfader will always need memory, at the minimum it has to buffer as many samples as fade duration specifies. The amount of memory needed for this can be calculated with formula samplerate (in Hz) * duration (in seconds) * channels * 4 (4 is the bytes one sample in foobar needs), for example with 44.1kHz stereo files and 30 second buffer this makes 44100 * 30 * 2 * 4 = 10 MB.

Thx for yr help Case, I was oblivious to  the particulars
"Mars is square and intensely coloured" - Johannes Kepler (1571-1630)

foo_dsp_crossfader RAM usage/Fade Duration

Reply #5
Quote
hmm.. great a guy comes and asks for advice and you greet him with sarcasm?

great.

"Use a bit o' common." - Benny Hill

 

foo_dsp_crossfader RAM usage/Fade Duration

Reply #6
  whatever shorty. Benny Hill? That's too cerebral for me ...
"Mars is square and intensely coloured" - Johannes Kepler (1571-1630)

 
SimplePortal 1.0.0 RC1 © 2008-2019