Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AVAudioSessionMonitor #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Descartess
Copy link
Collaborator

What is the purpose of this pull request?

Adds AudioSessionMonitor

Background

#76

Checklist

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).
  • I have read the CONTRIBUTING guidelines.
  • My code follows the coding style of this project.
  • My change requires a change to the documentation.
  • I have documented all my changes.
  • I have added tests to cover my changes.
  • All new and existing tests pass.

@Descartess Descartess added the WIP label Dec 2, 2018
AVAudioSessionSilenceSecondaryAudioHintTypeKey: silenceSecondaryAudioHintType]
}
private func simulateDidInterruptAudio() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

monitor.startMonitoring()
}


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
Vertical Whitespace Violation: Limit vertical whitespace to a single empty line. Currently 2. (vertical_whitespace)


monitor.startMonitoring()
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

expectedEvent = event
expectation.fulfill()
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


NotificationCenterInjector.inject = { self.notificationCenter }
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

if options.contains(.mediaServicesWereLost) {
observe(.AVAudioSessionMediaServicesWereLost) { [unowned self] _ in
self.handler(.mediaServicesWereLost)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

self.handler(.didInterruptAudio(Info($0)))
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


override public func addNotificationObservers() {
super.addNotificationObservers()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


private let handler: (Event) -> Void
private let options: Options

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


super.init(queue: queue)
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants