/// <summary>
		/// Create an FMOD SoundSystem
		/// </summary>
		/// <param name="initialize">Indicates whether or not the system should be initialized</param>
		/// <param name="numberOfChannels">The number of channels that this system supports</param>
		/// <returns>A SoundSystem</returns>
		public static SoundSystem CreateSoundSystem(bool initialize, int numberOfChannels)
		{
			currentResult = Result.Ok;
			IntPtr systemRaw = new IntPtr();
			SoundSystem system = null;

			currentResult = NativeMethods.FMOD_System_Create(ref systemRaw);
			if (currentResult != Result.Ok)
			{
				return null;
			}

			system = new SoundSystem();
			system.Handle = systemRaw;
			
			// *** I'm not sure why they have the extra step of systemnew ***
			//systemnew = new SoundSystem();
			//systemnew.SetRaw(systemraw);
			//system = systemnew;

			if (initialize)
			{
				system.Initialize(numberOfChannels, InitializationOptions.None, IntPtr.Zero);//(IntPtr)null);
			}

			return system;
		}
		public RecordDriverCollection(SoundSystem system, bool initialize) : base(system, initialize)
		{
			if (initialize) GetRecordDrivers();
		}
Пример #3
0
		internal Sound(SoundSystem soundSystem, string path)
		{
			this.soundSystem = soundSystem;
			this.uri = new Uri(string.Format("file://{0}{1}", path, System.IO.Path.DirectorySeparatorChar));
		}
Пример #4
0
		/// <summary>
		/// The full Sound constructor
		/// </summary>
		/// <param name="soundSystem">The sound system that this sound is associated with</param>
		/// <param name="mediaFile">The path or url of the file that the sound comes from</param>
		internal Sound(SoundSystem soundSystem, Uri uri)
		{			
			this.soundSystem = soundSystem;
			this.uri = uri;
		}