Skip to content

Commit 2d8a49b

Browse files
committed
Update README.md
1 parent 9872f68 commit 2d8a49b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ See [AVAudioPlayer](https://developer.apple.com/library/ios/DOCUMENTATION/AVFoun
2727
* Block-based completion handlers
2828
* Integration with `NSUserDefaults` to globally toggle sound effects in your app
2929
* 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
3131
* Works with Swift! (v2.0.0 and above)
3232

3333
## Requirements
@@ -100,6 +100,13 @@ Read the fucking docs, [available here][docsLink] via [@CocoaDocs](https://twitt
100100

101101
Please follow these sweet [contribution guidelines](https://github.com/jessesquires/HowToContribute).
102102

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+
103110
## Donate
104111

105112
Support the development of this **free**, open-source library!

0 commit comments

Comments
 (0)