Esempio n. 1
0
		public RESULT getChannel(int index, ref Channel channel)
		{
			RESULT result = RESULT.OK;
			IntPtr channelraw = new IntPtr();
			Channel channelnew = null;

			try
			{
				result = FMOD_ChannelGroup_GetChannel(channelgroupraw, index, ref channelraw);
			}
			catch
			{
				result = RESULT.ERR_INVALID_PARAM;
			}
			if (result != RESULT.OK)
			{
				return result;
			}

			if (channel == null)
			{
				channelnew = new Channel();
				channelnew.setRaw(channelraw);
				channel = channelnew;
			}
			else
			{
				channel.setRaw(channelraw);
			}

			return result;
		}
Esempio n. 2
0
		public RESULT playDSP(CHANNELINDEX channelid, DSP dsp, bool paused, ref Channel channel)
		{
			RESULT result = RESULT.OK;
			IntPtr channelraw;
			Channel channelnew = null;

			if (channel != null)
			{
				channelraw = channel.getRaw();
			}
			else
			{
				channelraw = new IntPtr();
			}

			try
			{
				result = FMOD_System_PlayDSP(systemraw, channelid, dsp.getRaw(), (paused ? 1 : 0), ref channelraw);
			}
			catch
			{
				result = RESULT.ERR_INVALID_PARAM;
			}
			if (result != RESULT.OK)
			{
				return result;
			}

			if (channel == null)
			{
				channelnew = new Channel();
				channelnew.setRaw(channelraw);
				channel = channelnew;
			}
			else
			{
				channel.setRaw(channelraw);
			}

			return result;
		}