python 不支持宏定义
最近用python脚本写oss编程
部分代码:
import fcntl
····
····
····
my_volume=16000
ioctl(my_mixer, ossaudiodev.MIXER_WRITE(SOUND_MIXER_MIC), my_volume)
执行脚本时却出现错误:
File "dsp.py", line 39, in set_audio_rec_volume
if fcntl.ioctl(my_mixer, MIXER_WRITE(SOUND_MIXER_MIC), my_volume) == -1:
AttributeError: 'module' object has no attribute 'MIXER_WRITE'
难道还要把宏定义迭代出来吗?请高手指点
万分感谢!!!