Exemplo n.º 1
0
        public frmMain()
        {
            InitializeComponent();
            _fmod = new FmodSystem();
            _fmod.Init(32, InitFlags.SoftwareHRTF);
            _fmod.SetDspBufferSize(256,2);

            _drums = new Dictionary<DrumType, Sound>();
            const SoundMode flags = SoundMode.NonBlocking | SoundMode.SoftwareProcessing;
            _drums[DrumType.Snare] = _fmod.CreateSound("data/snare.wav", flags);
            _drums[DrumType.TomMid] = _fmod.CreateSound("data/tom_mid.wav", flags);
            _drums[DrumType.TomLow] = _fmod.CreateSound("data/tom_low.wav", flags);
            _drums[DrumType.TomFloor] = _fmod.CreateSound("data/tom_floor.wav", flags);
            _drums[DrumType.Kick] = _fmod.CreateSound("data/kick.wav", flags);
            _drums[DrumType.HihatOpen] = _fmod.CreateSound("data/cym_hatopen.wav", flags);
            _drums[DrumType.HihatMid] = _fmod.CreateSound("data/cym_hatmid.wav", flags);
            _drums[DrumType.HithatClosed] = _fmod.CreateSound("data/cym_hatclosed.wav", flags);
            _drums[DrumType.CymbalCrash] = _fmod.CreateSound("data/cym_crash.wav", flags);
            _drums[DrumType.CymbalRide] = _fmod.CreateSound("data/cym_ride.wav", flags);
        }
Exemplo n.º 2
0
        public frmMain()
        {
            InitializeComponent();
            _fmod = new FmodSystem();
            _fmod.Init(32, InitFlags.SoftwareHRTF);
            _fmod.SetDspBufferSize(256, 2);

            _drums = new Dictionary <DrumType, Sound>();
            const SoundMode flags = SoundMode.NonBlocking | SoundMode.SoftwareProcessing;

            _drums[DrumType.Snare]        = _fmod.CreateSound("data/snare.wav", flags);
            _drums[DrumType.TomMid]       = _fmod.CreateSound("data/tom_mid.wav", flags);
            _drums[DrumType.TomLow]       = _fmod.CreateSound("data/tom_low.wav", flags);
            _drums[DrumType.TomFloor]     = _fmod.CreateSound("data/tom_floor.wav", flags);
            _drums[DrumType.Kick]         = _fmod.CreateSound("data/kick.wav", flags);
            _drums[DrumType.HihatOpen]    = _fmod.CreateSound("data/cym_hatopen.wav", flags);
            _drums[DrumType.HihatMid]     = _fmod.CreateSound("data/cym_hatmid.wav", flags);
            _drums[DrumType.HithatClosed] = _fmod.CreateSound("data/cym_hatclosed.wav", flags);
            _drums[DrumType.CymbalCrash]  = _fmod.CreateSound("data/cym_crash.wav", flags);
            _drums[DrumType.CymbalRide]   = _fmod.CreateSound("data/cym_ride.wav", flags);
        }