#30220 - isildur - Mon Nov 29, 2004 5:07 pm
I started using AAS and it looks like it works pretty good but does anyone know if AAS uses less cpu time than Krawal? Which one performs better?
#30250 - jd - Mon Nov 29, 2004 9:16 pm
isildur wrote: |
I started using AAS and it looks like it works pretty good but does anyone know if AAS uses less cpu time than Krawal? Which one performs better? |
I'm not exactly the most neutral judge, but I'm confident that AAS is significantly faster than Krawall. (Krawall does support S3M & XM though.)
#30259 - isildur - Mon Nov 29, 2004 10:27 pm
Well, I am using an xm file so, AAS it will be :)
#30260 - phantom-inker - Mon Nov 29, 2004 10:28 pm
isildur wrote: |
I started using AAS and it looks like it works pretty good but does anyone know if AAS uses less cpu time than Krawal? Which one performs better? |
In our project, we're using Krawall. I evaluated several sound mixers, AAS, Krawall, heck, even BLAS. AAS does perform a little faster even than the latest builds of Krawall (which are much faster than the build that comes with HAM). However, we chose Krawall in the end because it is so much more flexible. In addition to fully supporting S3M and XM --- our musicians haven't had to change a note yet, and we can use off-the-shelf S3Ms for testing --- it is also a bit more flexible in its handling of sound effects as well: Things like volume and looping and panning are all more controllable than in AAS.
For performance numbers, I loaded the Future Crew classic S3M "Starshine" into Krawall at our title screen just now. There's almost no other code running: kramWorker() mixes music, and the rest of the time the code is running a very simple loop that tests for BUTTON_START, and if it doesn't find that, it calls SWI_VSync to drop the system into low-power mode until the next frame. (Every few dozen frames, though, it does redraw the screen.)
Our SWI_VSync handler is special, though, because before it snoozes, it quickly records the current scan-line relative to the start of the frame, so that we have fairly exacting performance stats, even without the emulator telling us any numbers.
The startup code, while playing "Starshine" in the middle of the song where the main melody is dancing and all 9 channels are firing, generates the following raw performance numbers:
0A 23 1A 1A 18 17 1A 1A 1C 1B 1A 1A 18 15 18 22
19 18 18 18 14 1C 18 04 18 18 18 20 17 15 18 18
18 18 22 1A 1A 17 13 12 12 28 1A 1A 1A 1A 17 1A
...
The 0x28 hit is when the screen needs to be redrawn for the blinking 'Press Start' message. The rest of them, on average, are about 0x18 or 0x19 (which becomes more apparent if you watch the numbers for a while). The hard limit is, of course, 0xE4 = 228 lines.
Thus the music, by itself, playing a 9-channel S3M with a lot of sophisticated effects, is taking about 25 lines, or about 10.9% of the available processor time on average. It varies, of course --- you see a 0x22 in there and a 0x12 in there, so some frames require more mixing than others, but an average of about 10%-11% for a 9-channel S3M with all its effects is not bad at all.
_________________
Do you suppose if I put a signature here, anyone would read it? No? I didn't think so either.
#30279 - Krakken - Tue Nov 30, 2004 1:08 am
isildur wrote: |
Well, I am using an xm file so, AAS it will be :) |
I think you made a mistake, it's Krawall that supports XM not AAS. AAS only supports MOD and WAV files, though it's still the best. :)
I wish you would implement support for S3M & XM, jd.
#30291 - isildur - Tue Nov 30, 2004 3:22 am
I guess I read too fast... Is there a way to convert a xm file to a mod file?
#30296 - jd - Tue Nov 30, 2004 4:21 am
isildur wrote: |
I guess I read too fast... Is there a way to convert a xm file to a mod file? |
If the xm file doesn't use features that aren't supported by MOD then changing the song type in modplug and resaving should work. Unfortunately, it doesn't do as good as job of converting more complex files - for example, it doesn't convert volume channel effects into MOD effects where possible.
#30297 - Marill - Tue Nov 30, 2004 4:31 am
As for AAS, if you need stereo panning effects, you'll have to manage that on your own. I haven't used Kwrall so I don't know, do you have to manage stereo panning on you own for Kwrall?
It's not a big deal tough... the details of the sound channels (which ones use left and which ones use right) are properly documented, so it' not a hurdle at all.
#30393 - phantom-inker - Tue Nov 30, 2004 10:33 pm
isildur wrote: |
I guess I read too fast... Is there a way to convert a xm file to a mod file? |
Most significant XM files cannot be converted to mod files because the XM files take full advantage of stereo control, volume control, and, most importantly, instruments, which is a feature supported by neither S3Ms nor mods. Instruments let you control your waveforms "on the fly" instead of simply mixing stock sounds, and most XM musicians abuse the heck out of them.
Marill wrote: |
I haven't used Kwrall so I don't know, do you have to manage stereo panning on you own for Kwrall? |
Every channel in Krawall may have its panning individually programmed. For music, S3Ms and XMs natively have various set-panning commands. For sound effects, when you call kramPlayExt(), you must specify a stereo position for the new effect (-64=left to 64=right), and you can change the effect's position later (if it's still playing) using kramSetPan().
Sadly, AAS cannot do these kinds of stereo-panning operations, which is one of the reasons why we picked Krawall (the ability to use S3Ms and XMs out of the box was the real winner, though).
_________________
Do you suppose if I put a signature here, anyone would read it? No? I didn't think so either.