I'm trying to iterate all my Playbackdevices on my PC, using the Naudio library.
The code is really straight forward:
for (int i = 0; i < WaveOut.DeviceCount; i++)
{
WaveOutCapabilities WOC = WaveOut.GetCapabilities(i);
MessageBox.Show(WOC.ProductName);
}
Though, I'm having a problem where a const int
within the struct basically is cutting off the ProductName-string if it has more than 32 characters, which is quite annoying.
So I'm wondering how I could change this 32-character-length to a bigger one, which would fit every ProductName. The only thing I could think of would be to override the whole struct (or just the number 32, to a bigger one), but it cannot be done. How would I go about changing this value?
You can see the struct here (it's the private const int MaxProductNameLength = 32;
that needs to be changed)
I've never have to done anything like this before, and I'm wondering whether it even is possible.