Trys to set the sounddevice according to a device with the given name or the default device if nil or no
string is passed. If it fails, it will try to select the default device. Returns the selected device. Setting the current device will make all
soundnodes invalid, which may result in a runtime error in lua when old (invalid)
soundnodes are reused.