Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: NAudio 1.7 Wave Recording

$
0
0
Mark I tried recording with the NAudioDemo app using both waveIn & waveIn Event CallBacks for all 4 of my devices. In all cases, the recordings consist of complete silence. I traced the code and noticed the following. * the waveIn.DeviceNumber is always
0 (regardless of which device I choose) as set in public WaveIn(WaveCallbackInfo callbackInfo) { syncContext = SynchronizationContext.Current; if ((callbackInfo.Strategy == WaveCallbackStrategy.NewWindow || callbackInfo.Strategy == WaveCallbackStrategy.ExistingWindow)
&& syncContext == null) { throw new InvalidOperationException("Use WaveInEvent to record on a background thread"); } this.DeviceNumber = 0; * I confirmed this with a break point in the OnDataAvailable routine ... sender.DeviceNumber = 0 The demo app does not
seem to specify a DeviceNumber for waveIn recording anywhere. Also (pardon my lack of C# skills), but I tried setting the DeviceNumber, as follows in the NAudioDemo app waveIn = new WaveIn(); waveIn.DeviceNumber = comboWasapiDevices.SelectedIndex; but I ran
into the following compiler error ... Error 2 'NAudio.Wave.IWaveIn' does not contain a definition for 'DeviceNumber' and no extension method 'DeviceNumber' accepting a first argument of type 'NAudio.Wave.IWaveIn' could be found (are you missing a using directive
or an assembly reference?) D:\$MySoftware\VBasicStuff\$GuitarAmigo\$NAudio 1.7\CurrentSource\naudio_b00972f58ca5\NAudioDemo\RecordingDemo\RecordingPanel.cs 60 28 NAudioDemo It appears that IWaveIn does not provide a means for the caller to set the DeviceNumber.
Hope this helps + thanks for your assist, & for providing such a wonderful product. Regards Jim Bayne

Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>