Exemplo n.º 1
0
		protected virtual void Dispose(bool disposing)
		{
			if (!disposed)
			{
				if (disposing)
				{
					if (drivers != null)
					{
						drivers.Dispose();
						drivers = null;
					}
					
					if (recordDrivers != null)
					{
						recordDrivers.Dispose();
						recordDrivers = null;
					}
					
					if (masterChannelGroup != null)
					{
						masterChannelGroup.Dispose();
						masterChannelGroup = null;
					}
					
					if (dspHead != null)
					{
						dspHead.Dispose();
						dspHead = null;
					}
				}
				
				if (handle != IntPtr.Zero)
				{
					NativeMethods.FMOD_System_Release(handle);
					handle = IntPtr.Zero;
				}
			}
			disposed = true;
		}
Exemplo n.º 2
0
		public ChannelGroup CreateChannelGroup(string name)
		{
			currentResult = Result.Ok;
			IntPtr channelGroupHandle = new IntPtr();
			ChannelGroup channelGroup = null;

			try
			{
				currentResult = NativeMethods.FMOD_System_CreateChannelGroup(handle, name, ref channelGroupHandle);
			}
			catch (System.Runtime.InteropServices.ExternalException)
			{
				currentResult = Result.InvalidParameterError;
			}
			
			if (currentResult == Result.Ok)
			{			
				channelGroup = new ChannelGroup();
				channelGroup.Handle = channelGroupHandle;				
			}

			return channelGroup;
		}