obj c 学习:对plist的修改及权限获取

本文主要探讨Objective-C中如何获取和修改.plist文件的权限,以及使用shell脚本进行plist修改的方法。同时提到defaults write命令可能改变编码格式和文件权限的问题,指出其适用场景。
摘要由CSDN通过智能技术生成
修改plist:

NSString * infoplistPath=@"~/Info.plist";
        infoplistPath = [infoplistPath stringByExpandingTildeInPath];
        NSMutableDictionary *stations = nil;
        
        
        stations = [[NSMutableDictionary alloc] initWithContentsOfFile:infoplistPath];
        
        
        id obj= [ stations objectForKey:@"IOKitPersonalities" ];
        
        
        [obj removeObjectForKey:@"FT2XXB"];
        
        //If the dictionary was modified, save the new settings.
        [stations setObject:obj forKey:@"IOKitPersonalities"];
        
        BOOL bResulte = [stations writeToFile:infoplistPath atomically: NO];
        NSLog(bResulte? @&
解决爆音问题,麦克有声音了。 黑苹果必备。 -------------- 问题:驱动未能工作(经常当系统中出现不止一块声卡或者显卡带HDMI模块时会发生该状况) -解决方案:使用上文的内核崩溃的解决方案2,如果你想同时驱动声卡(包括HDMI)请为其在IOKitPersonalities中添加相应的条目 问题:爆音(杂音等,一般在声音稍大时出现削峰噪声-Nez注) -解决方案1: 在 Applications - Utilities - Audio MIDI Setup 修改输出格式 图如下 -解决方案2: 检查 VoodooHDA prefpane下是否已经启用 SSE2 你也能在 Info.plist 启用 Vectorize <key>Vectorize</key> <true/> 问题: 音量(滑块)无法调节音量 -解决方案: 在info.plist中启用 VoodooHDAEnableVolumeChangeFix <key>VoodooHDAEnableVolumeChangeFix</key> <true/> 问题:声音太低啦!= =! -解决方案: 在info.plist中启用VoodooHDAEnableHalfVolumeFix <key>VoodooHDAEnableHalfVolumeFix</key> <true/> 问题: 音频反馈 (Larsen 效果),声音在输入(Mic)和输出(Speaker扬声器) 循环 -解决方案: 如果mic不工作 ,则禁音iGain 并 增加Imax或者Mic音量 <key>iGain</key> <string>0</string> 他同样能在PrefPane中设置。在某些情况下你需要禁音Moniter而不是iGain 关于音频反馈的资料 Audio feedback (also known as the Larsen effect after the Danish scientist, Søren Absalon Larsen, who first discovered its principles) is a special kind of positive feedback which occurs when a sound loop exists between an audio input (for example, a microphone or guitar pickup) and an audio output (for example, a loudspeaker). In this example, a signal received by the microphone is amplified and passed out of the loudspeaker. The sound from the loudspeaker can then be received by the microphone again, amplified further, and then passed out through the loudspeaker again. This is a good example of positive feedback. The frequency of the resulting sound is determined by resonance frequencies in the microphone, amplifier, and loudspeaker, the acoustics of the room, the directional pick-up and emission patterns of the microphone and loudspeaker, and the distance between them. 是一种特殊的正反馈发生时,一个健全的循环之间存在一个音频输入(例如,一个麦克风或吉他皮卡)和音频输出(例如,一个扬声器)。在这个例子中,由麦克风接收信号放大,通过扬声器。从扬声器的声音,然後再由麦克风接收,进一步放大,然後再次通过扬声器。这是一个很好的例子正反馈 频率所产生的声音是由共振频率,麦克风,放大器和扬声器,房间的声学特性,定向回升和排放的麦克风和扬声器模式,以及它们之间的距离。 问题:声音延迟。(比如如果你调节音量大小,你将会在1-2秒后才听到biu~biu~的音量修改提示音) -解决方案1:在 /Library/Preferences/Audio 下删除 com.apple.audio.DeviceSettings.plist 和 com.apple.audio.SystemSettings.plist 然后重新启动 -解决方案2: 使用 SoundFlower软件 (自行搜索)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值