public ISoundGroupGlue CreateSoundGroup(String name)
 {
     FMOD.SoundGroup soundGroup = new FMOD.SoundGroup();
     FMODManager.ERRCHECK(system.createSoundGroup(name, ref soundGroup));
     FMODManager.ERRCHECK(soundGroup.setMaxAudibleBehavior(FMOD.SOUNDGROUP_BEHAVIOR.BEHAVIOR_MUTE));
     return(new FMODSoundGroup(soundGroup));
 }
Esempio n. 2
0
        public void Set3DAttributes(Vector3 position, Vector3 velocity)
        {
            var pos = FMODManager.Vector3ToFMODVector(position);
            var vel = FMODManager.Vector3ToFMODVector(velocity);

            FMODManager.ERRCHECK(channel.set3DAttributes(ref pos, ref vel));
        }
 public void Set3DListenerAttributes(Vector3 position, Vector3 velocity, Vector3 forward, Vector3 up)
 {
     FMOD.VECTOR position_ = FMODManager.Vector3ToFMODVector(position);
     FMOD.VECTOR vel_      = FMODManager.Vector3ToFMODVector(velocity);
     FMOD.VECTOR forward_  = FMODManager.Vector3ToFMODVector(forward);
     FMOD.VECTOR up_       = FMODManager.Vector3ToFMODVector(up);
     FMODManager.ERRCHECK(system.set3DListenerAttributes(0, ref position_, ref vel_, ref forward_, ref up_));
 }
Esempio n. 4
0
 public FMODChannel(FMOD.Channel channel, bool looping)
 {
     this.channel = channel;
     FMODManager.Instance.SetChannelMapping(channel.getRaw().ToInt32(), this);
     FMODManager.ERRCHECK(channel.setCallback(ChannelCallback));
     if (looping)
     {
         channel.setMode(FMOD.MODE.LOOP_NORMAL);
     }
 }
        public void GetDefaults(out float frequency, out float volume, out float pan, out int priority)
        {
            float freq = 0f, vol = 0f, pn = 0f;
            int   prio = 0;

            FMODManager.ERRCHECK(Sound.getDefaults(ref freq, ref vol, ref pn, ref prio));
            frequency = freq;
            volume    = vol;
            pan       = pn;
            priority  = prio;
        }
        public IChannelGlue PlaySound(ISoundGlue sound, bool paused, bool looping)
        {
            FMOD.Channel channel = null;
            var          result  = system.playSound(FMOD.CHANNELINDEX.FREE, (FMOD.Sound)sound.InnerSoundObject, paused, ref channel);

            if (result == FMOD.RESULT.ERR_NOTREADY)
            {
                return(null);
            }

            FMODManager.ERRCHECK(result);
            var fmodChannel = new FMODChannel(channel, looping);

            return(fmodChannel);
        }
 public void SetSoundGroup(ISoundGroupGlue soundGroup)
 {
     FMODManager.ERRCHECK(Sound.setSoundGroup((FMOD.SoundGroup)soundGroup.InnerSoundGroupObject));
 }
 public void SetDefaults(float frequency, float volume, float pan, int priority)
 {
     FMODManager.ERRCHECK(Sound.setDefaults(frequency, volume, pan, priority));
 }
Esempio n. 9
0
 public void StopLooping()
 {
     FMODManager.ERRCHECK(channel.setMode(FMOD.MODE.LOOP_OFF));
 }
Esempio n. 10
0
 public void Stop()
 {
     FMODManager.ERRCHECK(channel.stop());
 }
Esempio n. 11
0
 public void SetMaxAudible(int maxAudible)
 {
     FMODManager.ERRCHECK(SoundGroup.setMaxAudible(maxAudible));
 }