It's possible to get a sunaudiodev.error (errno == EINVAL), although
I'm not exactly sure why, this at least won't crash the application.
import sys
import os
import string
+import errno
import sunaudiodev
from SUNAUDIODEV import *
else:
usage(1, msg='Invalid option: ' + arg)
# now set the values
- device.setinfo(info)
+ try:
+ device.setinfo(info)
+ except sunaudiodev.error, (code, msg):
+ if code == errno.EINVAL:
+ pass
+ raise
device.close()