Rockbox General > Rockbox General Discussion
iRiver H320 Processor Power/Load During Equalizer Use
dmilamj:
I am pondering writing a Rockbox plugin that would allow the device to act as a sound level meter. I'm pretty sure that the CPU on the iRiver series has enough power to run at least four or five digital filters while encoding, since there are this many configurable filters on the software equalizer.
Does anyone have a good feel for how many digital filters (similar to the PK filters on the eq) one could successfully implement while simultaneously encoding to high-quality FLAC?
I know there are lots of specifics missing in that question, but I'm just hoping someone has a feel for current processor load with the existing eq, and how that might scale.
I'd love to be able to run 1/3 octave filters from say, 25 to 10kHz, plus an overall A-weighted and C-weighted filter. That would be about 30 filters. Whole octaves would be around 11 or 12 filters. Is that even close to being realistic?
Regards,
Dave
preglow:
It has more than enough CPU power to run many more filters than the EQ does, but while encoding FLAC, that's another thing. First of all, we don't have a FLAC encoder. The closest thing we have, Wavpack, which has a compression ratio around FLAC's, doesn't really leave too much CPU to any filters.
I'd say 30 filters _might_ work out fine on an Iriver, but not while encoding anything fancy like FLAC or Wavpack.
dmilamj:
Oh yeah, Wavpack rather than FLAC, I forgot about that.
Is there some place in Rockbox I can monitor the processor load while things are happening? Under debug there is "View Audio Thread" and "View OS Stacks" What do you think, can I use any of those to figure out processor load?
I suppose recording to PCM Wav or AIFF shouldn't take much CPU time at all. Is that true?
I should mention that the sound level meter would be a spectrum analyzer. People could use it to view the frequency content of all sorts of signals, even analyze music files, perhaps. Though I supposed decoding .mp3 files might take too much processor time. Perhaps it could analyze compressed files in non-real-time, while analyzing uncompressed files in real-time.
Anyone else interested in this type of functionality?
Dave
preglow:
It would be more natural to implement a spectrum analyzer with an FFT than with other filters, and on the decoding side of things, I believe we have enough CPU power left (for most codecs) to implement something like this, if implemented efficiently.
The closest you can get to observing CPU usage is currently following the boost ratio in the "View Audio Thread" screen. The closer this is to 100%, the closer you are to the CPU working full throttle all the time. If this settles on 100%, you will soon have crackles and skips in the sound.
Also, you're right in WAV and AIFF not taking much CPU time at all, and your filtering idea would be much more realistic in this scenario.
dmilamj:
Maybe more natural to use an FFT, but I'm looking for constant percentage bandwidth data, in octaves/fractional octaves.
Thanks for your comments. I will start writing code now for a whole octave filter plugin and see where that leads.
Can I call recording routines from a plugin? I'll go start reading the documentation now, after I've asked the question....
Navigation
[0] Message Index
[#] Next page
Go to full version