You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ See [AVAudioPlayer](https://developer.apple.com/library/ios/DOCUMENTATION/AVFoun
27
27
* Block-based completion handlers
28
28
* Integration with `NSUserDefaults` to globally toggle sound effects in your app
29
29
* Sweet and efficient memory management
30
-
* Caches sounds (`SystemSoundID`objects) and purges on memory warning
30
+
* Caches sounds (`SystemSoundID`instances) and purges on memory warning
31
31
* Works with Swift! (v2.0.0 and above)
32
32
33
33
## Requirements
@@ -100,6 +100,13 @@ Read the fucking docs, [available here][docsLink] via [@CocoaDocs](https://twitt
100
100
101
101
Please follow these sweet [contribution guidelines](https://github.com/jessesquires/HowToContribute).
102
102
103
+
## Design
104
+
105
+
Why is this a [Singleton](http://en.wikipedia.org/wiki/Singleton_pattern)? Singletons are [garbage](https://twitter.com/jesse_squires/status/532800746656239616). I agree! But here's why this is a valid use case:
106
+
107
+
1. This library manages the use of audio resources. Semantically, you only have 1 sound asset per sound effect. This is akin to `[NSFileManager defaultManager]`. You only have file system from which to read data.
108
+
2. The singleton allows the caching of `SystemSoundID` instances.
109
+
103
110
## Donate
104
111
105
112
Support the development of this **free**, open-source library!
0 commit comments