Order of the Butterfly
Posts: 415 from 2003/7/26
From: Wroclaw/Poland
I am adding some technical modifications in my latest useless production (demo "Morphever"). One of these changes is playing music. I have some doubts, questions. Maybe someone could help me...
I use Reggae to play music.
The first question is about sound file format.
Music in the demo is in WAVE format (huge file size). I have already tried to use MP3 but during playing, animation is not perfect fluent. Screen is redrawed 60 frames per second, CPU usage always is below 100% (40-70%). But I see some micro-pauses in animation. Animation is not perfect like with disabled sound. If I use WAVE format, animation is fluent.
Could I do something else for achieve perfect animation with smaller audio-file? Does someone have any idea?
I play audio file from memory. Unfortunately loading the huge WAVE file (almost 40MB) in to memory on Efika (128MB) is impossible. So today I added possibility to streaming music from file. Now RAM consumption is less and Efika will be able to run the demo with music in WAVE.
From my point of view both methods work the same. Playing from disc is not slower, doesn't cause any additional breaks in the screen redrawing. During streaming from disc I have the same effect - with MP3 there are small micro-pauses, with WAVE is perfect.
And I have one additional question about priorities.
I experimented with task priorities. I would like to know what do you think about this proposal. :)
I would like to change priorities to:
If window/screen is active:
demo task priority: 4
audio channel priority: 2
If window/screen is inactive:
demo task priority: 0
audio channel priority: 0
I know that changing priorities is not recommended and this is not good practise. However if I am watching demo or playing a game (especially on fullscreen) I am focused on this and this is the most important for me. Of course as you can see I don't want to set +127... :)
I see that with proposed priorites demo works better, sound affects less to the animation. But I am not sure if I should do it.
What do you think about it, MOS-masters?
Thanks for all answers,
MDW