A simple c# fmod library #Basic tutorial
- Load mp3file and play
EasyFmod a = new EasyFmod();
a.CreateStream("test.mp3", FMOD.MODE.SOFTWARE);
a.PlaySound(FMOD.CHANNELINDEX.FREE);
or
EasyFmod a = new EasyFmod();
a.CreateSound("test.mp3", FMOD.MODE.SOFTWARE);
a.PlaySound(FMOD.CHANNELINDEX.FREE);- play,stop,pause
play
a.PlaySound(FMOD.CHANNELINDEX.FREE);stop
a.PlayStop();pause
a.Pause(!a.GetPause());- Set volume
a.SetVolume(float);- control pitch and Tempo
a.SetPich(float);
a.SetTempo(float);- Set Fmod DSP EFFECT
EasyFmodSoundEffect b = new EasyFmodSoundEffect(a, EasyFmodSoundeffect.CHORUS);
b.SetEffect();- Get/Set playposition
a.SetPlayPosition(float,TIMEUNIT)
a.GetPlayPosition(TIMEUNIT)//return uint value
a.GetPlayPositionTime(TIMEUNIT)//return play position length to timeformat string ex)05:49- Get position length
a.GetPositionLength(TIMEUNIT)//return uint value
a.GetPositionTime(TIMEUNIT)//return position length to timeformat string ex)05:49- Set reverb effect
a.SetReverbEffect(EasyFmodReverbpreset.LIVINGROOM);- Set Equalizer
EasyFmodSoundEqualizer c=new EasyFmodSoundEqualizer(32f, 1f, 0f);
c.SetEQ();- Check Fmod Version
a.GetVersion();//return fmod version uintif you want to check your library is the newest version
a.GetVersion(true);#Event
- OnCreateStream
- OnCreateSound
- OnPlay
- OnPause
- OnPositionChanged
- OnPitchChanged
- OnTempoChanged
- OnVolumeChanged