LBXScan icon indicating copy to clipboard operation
LBXScan copied to clipboard

LBXScanNative怎么去掉相机的系统声音换成自己的声音呢?

Open 624990742 opened this issue 6 years ago • 2 comments

LBXScanNative怎么去掉相机的系统声音换成自己的声音呢?

624990742 avatar Jan 16 '19 10:01 624990742

设置isNeedScanImage属性为NO就可以去掉系统相机的声音。

624990742 avatar Jan 16 '19 10:01 624990742

是的,那是截图的时候产生的声音。识别成功之后,如果想换自己的音效,可以使用下面的方法:

NSURL *url=[[NSBundle mainBundle]URLForResource:@"scanSuccess.wav" withExtension:nil];  
SystemSoundID soundID=8787;  
AudioServicesCreateSystemSoundID((__bridge CFURLRef)url, &soundID);  
AudioServicesPlaySystemSound(soundID); 

TheLittleBoy avatar Mar 21 '19 04:03 TheLittleBoy