SoundManager 音频管理器 https://github.com/nicklockwood/SoundManager Purpose SoundManager is a simple class for playing sound and music in iOS or Mac apps. SoundManager是一个简单的用来播放音乐的类. Supported OS & SDK Versions Supported build target - iOS 7.0 / Mac OS 1…
####简单说,就是某个系统作为一个服务,对全局系统可见. Service Locator (服务定位) ``` //简单粗暴的代码, 使用声音系统 // Use a static class? AudioSystem::playSound(VERY_LOUD_BANG); // Or maybe a singleton? AudioSystem::instance()->playSound(VERY_LOUD_BANG); ``` 类比: 如果我换了电话号码,需要通知我所有联系人,我换了电话号…