Skip to content

Commit

Permalink
Merge pull request #1 from mmmayer/MiscUpdates
Browse files Browse the repository at this point in the history
Suggested Changes by mmmayer
  • Loading branch information
twostraws committed Nov 20, 2021
2 parents 156c574 + 7db8410 commit b9ccab1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
19 changes: 10 additions & 9 deletions CODE_OF_CONDUCT.md
Expand Up @@ -2,22 +2,23 @@

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* * Demonstrating empathy and kindness toward other people
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
* Being respectful of differing opinions, viewpoints and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* The use of sexualized language or imagery, and advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
Expand All @@ -40,6 +41,6 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct/

[homepage]: https://www.contributor-covenant.org
[homepage]: https://www.contributor-covenant.org
6 changes: 1 addition & 5 deletions README.md
Expand Up @@ -83,11 +83,7 @@ struct ContentView: View {
Button {
isPlaying.toggle()
} label: {
if isPlaying {
Image(systemName: "speaker.wave.3")
} else {
Image(systemName: "speaker")
}
Image(systemName: isPlaying ? "speaker.wave.3" : "speaker")
}
.sound("example.mp3", isPlaying: $isPlaying)
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Subsonic/SubsonicController.swift
Expand Up @@ -82,12 +82,12 @@ public class SubsonicController: NSObject, AVAudioPlayerDelegate {
@discardableResult///
public func prepare(sound: String, from bundle: Bundle = .main) -> AVAudioPlayer? {
guard let url = bundle.url(forResource: sound, withExtension: nil) else {
print("Failed to find \(sound) in bundle.")
print("Failed to find \(sound) in \(bundle.bundleURL.lastPathComponent).")
return nil
}

guard let player = try? AVAudioPlayer(contentsOf: url) else {
print("Failed to load \(sound) from bundle.")
print("Failed to load \(sound) from \(bundle.bundleURL.lastPathComponent).")
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Subsonic/SubsonicPlayer.swift
Expand Up @@ -49,7 +49,7 @@ public class SubsonicPlayer: NSObject, ObservableObject, AVAudioPlayerDelegate {
/// specified in the range 0 (no volume) to 1 (maximum volume).
/// - repeatCount: How many times to repeat this sound. Specifying 0 here
/// (the default) will play the sound only once.
/// - playMode: /// Whether playback should restart from the beginning each time, or
/// - playMode: Whether playback should restart from the beginning each time, or
/// continue from the last playback point.
public init(sound: String, bundle: Bundle = .main, volume: Double = 1.0, repeatCount: SubsonicController.RepeatCount = 0, playMode: SubsonicController.PlayMode = .reset) {
audioPlayer = SubsonicController.shared.prepare(sound: sound, from: bundle)
Expand Down

0 comments on commit b9ccab1

Please sign in to comment.