Exemplo n.º 1
0
 public Int16AudioSampleGenerator(AudioBuffer <short> audioBuffer) : base(audioBuffer)
 {
 }
Exemplo n.º 2
0
		/// <summary>Determines whether the specified audio buffer is an acceptable buffer.</summary>
		/// <param name="audioBuffer">The proposed audio buffer.</param>
		/// <remarks>
		/// This method will consider <c>null</c> as a valid buffer, even though it is not a buffer.
		/// The following methods will be called to help determine if the buffer is acceptable:
		/// <list type="bullet">
		/// <item><description><see cref="IsSampleTypeSupported"/></description></item>
		/// </list>
		/// </remarks>
		/// <returns><c>true</c> if the specified audio buffer is acceptable; otherwise, <c>false</c>.</returns>
		public bool IsAcceptableBuffer(AudioBuffer audioBuffer)
		{
			if (audioBuffer == null) return true;

			return IsSampleTypeSupported(audioBuffer.SampleType) && IsFrequencySupported(44100);
		}
Exemplo n.º 3
0
 partial void InitializeAudio()
 {
     audioRenderingEnabled = true;
     audioBuffer           = new AudioBuffer <short>(new short[2 * 2 * 44100 / 60]);
     audioSampleGenerator  = new Int16AudioSampleGenerator(audioBuffer as AudioBuffer <short>);
 }