This project has moved. For the latest updates, please go here.

"The name 'SourceList' does not exist in the current context"

Jul 4, 2013 at 10:21 AM
Having used a/this following youtube example for using Naudio, Sourcelist, suddenly didn't work after transfering the code into another VIsual Studio-solution:
     List<NAudio.Wave.WaveInCapabilities> sources = new List<NAudio.Wave.WaveInCapabilities>();
        for (int i = 0; i < NAudio.Wave.WaveIn.DeviceCount; i++)


        foreach (var source in sources)
            ListViewItem item = new ListViewItem(source.ProductName);
            item.SubItems.Add(new ListViewItem.ListViewSubItem(item, source.Channels.ToString()));
  • -
Now the error-message in the thread subject appears.

/br Thomas Due, DK
Jul 4, 2013 at 11:08 AM
that just means you have no variable or field called SourceList. SourceList isn't part of NAudio, and so you'll need to copy more of the code from the demo if you want this to work.
Jul 4, 2013 at 1:07 PM
I found the error myself (sourcelist is a renamed listView-component)
Jul 4, 2013 at 1:08 PM
Yes, Mark .... thx (again my typical bad overview-capabilities haunts me :-/ )