mfc@sdZddlmZeddd[ddgZdefdYZd dd YZd dd YZd ZddZ e dkre ndS(sGClasses for manipulating audio devices (currently only for Sun and SGI)i(twarnpy3ks2the audiodev module has been removed in Python 3.0t stackleveliterrortAudioDevcBseZRS((t__name__t __module__(((s /usr/lib64/python2.7/audiodev.pyRstPlay_Audio_sgicBseZdZd ZZZdZdZdZ dZ dZ dZ dZ dZd Zd Zd Zd ZRS(icCsddl}d|jfd|jfd|jfd|jfd|jfd|jfd|jfg|_d |j fd |j fd |j fg|_ d |j fd |jfd |jfg|_d |_dS( NiiiDi}i"Vi>i+i@iiii(tALt RATE_48000t RATE_44100t RATE_32000t RATE_22050t RATE_16000t RATE_11025t RATE_8000t frameratelisttMONOtSTEREOtQUADROt nchannelslisttSAMPLE_8t SAMPLE_16t SAMPLE_24t sampwidthlistt classinited(tselfR((s /usr/lib64/python2.7/audiodev.pyt initclasss           cCsddl}ddl}|js.|jng|_|jdg|_|j|_d|_ d|_ d|_ d|_ d|_dS(Nii(talRRRt oldparamst OUTPUT_RATEtparamst newconfigtconfigtinited_outratet inited_widthtinited_nchannelstNonet convertertport(RRR((s /usr/lib64/python2.7/audiodev.pyt__init__+s        cCs]|jr|jn|jrYddl}ddl}|j|j|jg|_ndS(Ni(R&tstopRRRt setparamstDEFAULT_DEVICE(RRR((s /usr/lib64/python2.7/audiodev.pyt__del__9s    cCsP|js dSddl}x&|jjdkrA|jdqW|jdS(Niig?(R&ttimet getfilledtsleepR((RR,((s /usr/lib64/python2.7/audiodev.pytwaitAs   cCsi|jr"|jjd|_n|jreddl}ddl}|j|j|jg|_ndS(Ni(R&t closeportR$RRRR)R*(RRR((s /usr/lib64/python2.7/audiodev.pyR(Is    cCsMxF|jD]2\}}||kr ||jds I