Thanks
I noticed that, in case of a call to setDevice(""), getDevice() will return "" until the next capture starts, and the actual default device name after (even after the capture was stopped). If we don't call setDevice(""), getDevice() will always return the actual name of the default device. This feels a little inconsistent. Maybe you should retrieve the name of the default device in setDevice if the argument if an empty string, and then remove the calls to
alcGetString(captureDevice, ALC_CAPTURE_DEVICE_SPECIFIER) in start and setDevice.
Also, what happens if the default device changes (I guess it can be changed in the OS control panel -- or, if you can set your USB webcam as the default device, it can be hot-plugged/unplugged) during runtime? Does the empty string correctly map to the new default device, or does OpenAL always returns the same initial default device? Would you be able to test this use case?