Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new <see cref="FMODChannel"/> and sets it's values to the ones specified
 /// </summary>
 /// <param name="channel">The FMOD.Channel to wrap around</param>
 /// <param name="sound">The FMOD.Sound to wrap</param>
 /// <param name="context">The SynchronizationContext to use for callbacks</param>
 /// <param name="id">the ID of this container</param>
 /// <param name="system">The <see cref="FMODSystem"/> that contains this channel</param>
 internal FMODChannel(FMODSystem system, FMOD.Channel channel, FMOD.Sound sound, Guid id)
 {
     this.system  = system;
     this.id      = id;
     this.Channel = channel;
     this.sound   = sound;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of <see cref="FMODChannel"/> and attempts to load all other values automatically
 /// <para/>
 /// The <see cref="FMODChannel.Sound"/> property is set to the one found via FMOD.Channel.getCurrentSound(ref FMOD.Sound)
 /// <para/>
 /// The <see cref="FMODChannel.Context"/> property is set to either the current context, or a new SynchronizationContext (if the current is not valid)
 /// </summary>
 /// <param name="channel"></param>
 /// <param name="id">The id of the channel</param>
 /// <param name="system">The <see cref="FMODSystem"/> that contains this channel</param>
 internal FMODChannel(FMODSystem system, FMOD.Channel channel, Guid id)
 {
     this.system  = system;
     this.id      = id;
     this.Channel = channel;
     FMOD.RESULT result = channel.getCurrentSound(ref this.sound);
     if (result != FMOD.RESULT.OK)
     {
         throw new FMODException("Unable to get current sound for Container", result);
     }
 }