Actually, the problem lies below: it return paInvalidChannelCount; I remove codes( #if 0 #endif block), then it's ok to set sound device. static PaError IsOutputChannelCountSupported( PaWinMmeDeviceInfo* deviceInfo, int channelCount ) { PaError result = paNoError; #if 0 if( channelCount > 0 && deviceInfo->deviceOutputChannelCountIsKnown && channelCount > deviceInfo->inheritedDeviceInfo.maxOutputChannels ){ result = paInvalidChannelCount; } #endif return result; } ---------- ?????? ---------- ????"hlzhangxt at 163.com" ?????2008-04-12 18:42:49 ????pjsip <pjsip at lists.pjsip.org> ??? Fw:can not run the function pjsua_set_snd_dev Actually , can not set the playback-dev, what's wrong with it? ---------- ?????? ---------- ????"hlzhangxt <hlzhangxt at 163.com>" ?????2008-04-12 18:37:03 ????pjsip <pjsip at lists.pjsip.org> ??? can not run the function pjsua_set_snd_dev every time, I deloy the funciton pjsua_set_snd_dev, it always fails. the error message is : invalid channel number. So I can not select sound device, only use -1 . who can solve this problem ? ???????????9??5550???010-61598313 ???????????9??5550???010-61598313 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080412/97e50216/attachment-0001.html