public SoundSource(FMOD.System system, FMOD.Sound sound, int posx, int posy) { FMOD.RESULT result; mPos.x = posx; mPos.y = posy; mPos.z = 0; mVel.x = 0; mVel.y = 0; mVel.z = 0; mSystem = system; result = system.playSound(FMOD.CHANNELINDEX.FREE, sound, true, ref mChannel); VirtualVoices.ERRCHECK(result); SetPosition(mPos.x, mPos.y); Random r = new Random(posx); result = mChannel.setFrequency(r.Next(22050, 44100)); VirtualVoices.ERRCHECK(result); result = mChannel.setPaused(false); VirtualVoices.ERRCHECK(result); mBrushBlue = new SolidBrush(Color.Blue); mBrushRed = new SolidBrush(Color.Red); }
public SoundSource(FMOD.System fmod, FMOD.Sound sound, string name, bool ambient) : base(name, ambient) { FMOD.RESULT result; result = fmod.playSound(FMOD.CHANNELINDEX.FREE, sound, true, ref channel); SoundManager.CheckResults(result); result = channel.setVolume(0); SoundManager.CheckResults(result); }