I want to use a large sound effect as music background on a screen i am coding.
I want to use this sound as a background music in fact because i have no more CPU time to decompress a steam neither MP3 nor ADX.
The screen could not be speed up because the code make a lot of interesting and complex things.
So i came to sfxmgr in Kos !
First Dan potter says :
But reading the source code i found :
This file contains declarations for doing simple sound effects. This code is
only usable for simple WAV files containing either 16-bit samples (stereo or
mono) or Yamaha ADPCM (4-bits, stereo or mono). Also, all sounds played in
this manner must be at most 65534 samples in length, as this does not handle
buffer chaining or anything else complex. For more interesting stuff, you
should probably look at the sound stream stuff instead.
Code: Select all
int snd_sfx_play_chn(int chn, sfxhnd_t idx, int vol, int pan) {
int size;
snd_effect_t * t = (snd_effect_t *)idx;
AICA_CMDSTR_CHANNEL(tmp, cmd, chan);
size = t->len;
if(size >= 65535) size = 65534;
-------------------
Is a sound FX must be 65535 bytes maximum length or 65535 samples length (it's quite different) ?
Second question :
-------------------
Is it possible to modify this length constraint value by modify KOS (even just to create my own KOS version) ?
Third question :
-----------------
Is it possible to modify the volume of a FX when is playing by modify KOS (even just to create my own KOS version) ?
Thanks for your help and merry Christmas !