First time I play sound the whole program get lag
BlitzMax Forums/BlitzMax Beginners Area/First time I play sound the whole program get lag| 
 | ||
| When I do playsound first time. it kinda loads it into memory and there is a lag. how can I avoid this? is there something i can run before.. that initialize all sounds. or something or should i make to all sounds playsound on volume zero. it there a command for that? cheers | 
| 
 | ||
| yep cuesound CueSound Sound, Channel SetChannelRate Channel, freq SetChannelVolume Channel, volume SetChannelPan channel, mixpan ResumeChannel Channel You'll need to have loaded a sound and initialized a channel with it The above code will set it up as you want :) | 
| 
 | ||
| Thanks | 
| 
 | ||
| im using Xors3D so what I did is Element.Handle = xLoad3DSound(FileAndLocation) xSoundVolume(Element.Handle, 0) Local TempChannel = xPlaySound(Element.Handle) xStopChannel(TempChannel) xSoundVolume(Element.Handle, 1) seems that It does the job.. |