示例#1
0
 public void Dispose()
 {
     if (handle != null)
     {
         handle.CloseDown();
         System.Runtime.InteropServices.Marshal.ReleaseComObject(handle);
     }
     handle = null;
 }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="owner">owner window object</param>
        public Performance(IWin32Window owner)
        {
            handle      = DirectAudio.dx.DirectMusicPerformanceCreate();
            this.handle = handle;

            DMUS_AUDIOPARAMS param   = new DMUS_AUDIOPARAMS();
            DirectSound8     nullDs8 = null;

            // TODO: learn more about this initialization process
            handle.InitAudio(owner.Handle.ToInt32(),
                             CONST_DMUS_AUDIO.DMUS_AUDIOF_ALL,
                             ref param,
                             ref nullDs8,
                             CONST_DMUSIC_STANDARD_AUDIO_PATH.DMUS_APATH_DYNAMIC_STEREO, 16);
        }