Beispiel #1
0
 /// <summary>
 /// Returns a new instance of the <see cref="DirectSoundNotify"/> class for the specified <paramref name="directSoundBuffer"/>.
 /// </summary>
 /// <param name="directSoundBuffer">The <see cref="DirectSoundBuffer"/> to create a <see cref="DirectSoundNotify"/> instance for.</param>
 /// <returns>A new instance of the <see cref="DirectSoundNotify"/> class for the specified <paramref name="directSoundBuffer"/></returns>
 /// <exception cref="ArgumentNullException"><paramref name="directSoundBuffer"/> is null.</exception>
 public static DirectSoundNotify FromBuffer(DirectSoundBuffer directSoundBuffer)
 {
     if (directSoundBuffer == null)
     {
         throw new ArgumentNullException("directSoundBuffer");
     }
     return(directSoundBuffer.QueryInterface <DirectSoundNotify>());
 }
Beispiel #2
0
 /// <summary>
 /// Returns a new instance of the <see cref="DirectSoundNotify"/> class for the specified <paramref name="directSoundBuffer"/>.
 /// </summary>
 /// <param name="directSoundBuffer">The <see cref="DirectSoundBuffer"/> to create a <see cref="DirectSoundNotify"/> instance for.</param>
 /// <returns>A new instance of the <see cref="DirectSoundNotify"/> class for the specified <paramref name="directSoundBuffer"/></returns>
 /// <exception cref="ArgumentNullException"><paramref name="directSoundBuffer"/> is null.</exception>
 public static DirectSoundNotify FromBuffer(DirectSoundBuffer directSoundBuffer)
 {
     if (directSoundBuffer == null)
         throw new ArgumentNullException("directSoundBuffer");
     return directSoundBuffer.QueryInterface<DirectSoundNotify>();
 }