You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public void InitRecordAndPlayback(IWaveProvider waveProvider, int recordChannels, int recordOnlySampleRate)
{
if (this.sourceStream != null)
{
throw new InvalidOperationException("Already initialised this instance of AsioOut - dispose and create a new one");
}
...
if (waveProvider != null)
{
sourceStream = waveProvider;
...
}
The problem though is that this check doesn't work well when no waveProvider was initialy provided (as for recording only application) and sourceStream is always null. Seems like a boolean flag might be a better idea.
The text was updated successfully, but these errors were encountered:
As far as I was able to understand an AsioOut instance must be initialized only once, as suggested by this helpful check:
NAudio/NAudio/Wave/WaveOutputs/AsioOut.cs
Lines 193 to 203 in 4bf547f
The problem though is that this check doesn't work well when no waveProvider was initialy provided (as for recording only application) and sourceStream is always null. Seems like a boolean flag might be a better idea.
The text was updated successfully, but these errors were encountered: