Rockbox General > Rockbox General Discussion
Which sound format uses CPU the least?
dreamlayers:
--- Quote from: r00tb33r on April 13, 2009, 05:50:55 AM ---Perfect! SAMPR_22 sounds much better. No reason for higher sampling rate since the WAD does not contain sounds of higher sampling rate than 22KHz.
--- End quote ---
You're right, on some sounds (eg. breath sounds) I can hear an improvement. However, on the 5G iPod, SAMPR_22 causes crackly underruns. So, that #ifdef block should probably be changed so that quality isn't needlessly reduced on fast targets.
Doom resamples some sounds to vary their frequency. (I think it has something to do with the current health level or amount of damage sustained at once.) Because of this, even 44.1KHz might improve quality.
Be careful with how you introduce music. It's probably easy to cause buffer underruns. I guess ideally the sound code should be changed so get_more simply returns data which has already been calculated instead of doing the calculation itself. On PP502x, the the COP might be of use here.
r00tb33r:
I think I understood what Llorean said, RockBox does not have mixing, and therefore not able to mix music playback and doom sound effects. Am I correct?
So would music playback/mixing have to be implemented in doom?
Also... Sounds like there was some work done but it got lost along the way...
http://forums.rockbox.org/index.php?topic=9632.msg74201#msg74201
Was he referring to MIDI or the normal music playback in RockBox?
Either way I'd like to hear suggestions about implementation.
dreamlayers:
Doom has a mixer which you could maybe use. Look at i_sound.c.
AlexP:
--- Quote from: r00tb33r on April 13, 2009, 11:12:54 PM ---I think I understood what Llorean said, RockBox does not have mixing, and therefore not able to mix music playback and doom sound effects. Am I correct?
--- End quote ---
No, that isn't what he was saying. Each device has a set amount of memory, which Rockbox splits into various chunks - a small chunk is reserved for plugins, and a much bigger chunk is reserved for music playback. Doom requires more memory to run than is available from the small plugin chunk, and therefore it also "steals" the large playback chunk. As Doom has now taken the large playback memory chunk, playback is no longer able to work. It is about memory usage, and not the ability to mix different audio.
r00tb33r:
--- Quote from: BigBambi on April 16, 2009, 09:06:52 AM ---
--- Quote from: r00tb33r on April 13, 2009, 11:12:54 PM ---I think I understood what Llorean said, RockBox does not have mixing, and therefore not able to mix music playback and doom sound effects. Am I correct?
--- End quote ---
No, that isn't what he was saying. Each device has a set amount of memory, which Rockbox splits into various chunks - a small chunk is reserved for plugins, and a much bigger chunk is reserved for music playback. Doom requires more memory to run than is available from the small plugin chunk, and therefore it also "steals" the large playback chunk. As Doom has now taken the large playback memory chunk, playback is no longer able to work. It is about memory usage, and not the ability to mix different audio.
--- End quote ---
So if playback code was put into Doom, won't they be able to share it?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version