public IAviAudioStream CreateAudioStream(AviWriter writer)
 {
     // Create encoding or simple stream based on settings
     if (EncodeAudio)
     {
         // LAME DLL path is set in App.OnStartup()
         return writer.AddMp3AudioStream(WaveFormat.Channels, WaveFormat.SampleRate, AudioBitRate);
     }
     else return writer.AddAudioStream(WaveFormat.Channels, WaveFormat.SampleRate, WaveFormat.BitsPerSample);
 }
Beispiel #2
0
 private IAviAudioStream CreateAudioStream(WaveFormat waveFormat, bool encode, int bitRate)
 {
     // Create encoding or simple stream based on settings
     if (encode)
     {
         // LAME DLL path is set in App.OnStartup()
         return(writer.AddMp3AudioStream(waveFormat.Channels, waveFormat.SampleRate, bitRate));
     }
     else
     {
         return(writer.AddAudioStream(
                    channelCount: waveFormat.Channels,
                    samplesPerSecond: waveFormat.SampleRate,
                    bitsPerSample: waveFormat.BitsPerSample));
     }
 }
Beispiel #3
0
 public IAviAudioStream CreateAudioStream(AviWriter writer)
 {
     // Create encoding or simple stream based on settings
     if (IsLoopback) return writer.AddAudioStream(WaveFormat.Channels, WaveFormat.SampleRate, WaveFormat.BitsPerSample, AudioFormats.Float);
     else if (EncodeAudio)
     {
         // LAME DLL path is set in App.OnStartup()
         return writer.AddMp3AudioStream(WaveFormat.Channels, WaveFormat.SampleRate, AudioBitRate);
     }
     else return writer.AddAudioStream(WaveFormat.Channels, WaveFormat.SampleRate, WaveFormat.BitsPerSample);
 }