Ejemplo n.º 1
0
 //   `AudioFormatSubMessage: {type: "raw", encoding: "pcm_s16le", sample_rate: 44100}`
 /// <summary>
 ///
 /// </summary>
 /// <param name="audioFormatType"></param>
 /// <param name="encoding"></param>
 /// <param name="sampleRate">in Hz</param>
 public AudioFormatSubMessage(AudioFormatType audioFormatType, AudioFormatEncoding encoding, int sampleRate)
 {
     type = audioFormatType.ToApiString();
     if (audioFormatType == AudioFormatType.File)
     {
         this.encoding = null;
         sample_rate   = 0;
         return;
     }
     this.encoding = encoding.ToApiString();
     sample_rate   = sampleRate;
 }
Ejemplo n.º 2
0
 //   `AudioFormatSubMessage: {type: "raw", encoding: "pcm_s16le", sample_rate: 44100}`
 /// <summary>
 ///
 /// </summary>
 /// <param name="audioFormatType"></param>
 /// <param name="encoding"></param>
 /// <param name="sampleRate">in Hz</param>
 public AudioFormatSubMessage(AudioFormatType audioFormatType, AudioFormatEncoding encoding, int sampleRate)
 {
     type          = audioFormatType.ToApiString();
     this.encoding = encoding.ToApiString();
     sample_rate   = sampleRate;
 }