Пример #1
0
		public RESULT getSoundGroup(ref SoundGroup soundgroup)
		{
			RESULT result = RESULT.OK;
			IntPtr soundgroupraw = new IntPtr();
			SoundGroup soundgroupnew = null;

			try
			{
				result = FMOD_Sound_GetSoundGroup(soundraw, ref soundgroupraw);
			}
			catch
			{
				result = RESULT.ERR_INVALID_PARAM;
			}
			if (result != RESULT.OK)
			{
				return result;
			}

			if (soundgroup == null)
			{
				soundgroupnew = new SoundGroup();
				soundgroupnew.setRaw(soundgroupraw);
				soundgroup = soundgroupnew;
			}
			else
			{
				soundgroup.setRaw(soundgroupraw);
			}

			return result;
		}
Пример #2
0
		public RESULT createSoundGroup(string name, ref SoundGroup soundgroup)
		{
			RESULT result = RESULT.OK;
			IntPtr soundgroupraw = new IntPtr();
			SoundGroup soundgroupnew = null;

			try
			{
				result = FMOD_System_CreateSoundGroup(systemraw, name, ref soundgroupraw);
			}
			catch
			{
				result = RESULT.ERR_INVALID_PARAM;
			}
			if (result != RESULT.OK)
			{
				return result;
			}

			if (soundgroup == null)
			{
				soundgroupnew = new SoundGroup();
				soundgroupnew.setRaw(soundgroupraw);
				soundgroup = soundgroupnew;
			}
			else
			{
				soundgroup.setRaw(soundgroupraw);
			}

			return result;
		}