-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
tvOS - Apple TV OS Feature - Updated Again! #4831
Conversation
- Handles the event it and prevents crash
Fixes the path in the openFrameworks library project.
looks good to me, @ofTheo if you want to take a look, otherwise i think we can merge it |
// need to configure set the audio category, and override to it route the audio to the speaker | ||
if([audioSession respondsToSelector:@selector(setCategory:withOptions:error:)]) { | ||
// we're on iOS 6 or greater, so use the AVFoundation API | ||
if(![audioSession setCategory:AVAudioSessionCategoryPlayAndRecord | ||
withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker | ||
withOptions:AVAudioSessionCategoryOptionMixWithOthers | ||
error:&err]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danoli3 - curious about this change. Does that mean for all iOS apps going forward they want capture exclusive audio out? ( I know this is in the input stream - but I remember there being some issues related to this way back )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the issue you had before! #2187 Seems to be related to that withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker not been in iOS 5.
In regards to what does it mean for capturing exclusive audio out... I'm not entirely sure, I think it should be fine, mix with others just allows that whole multi audio app design in iOS 9. If a developer wanted to silence that, they can with a AudioSession command regardless. So I think it should be fine.
This is the internals of the commands: tvOS prohibited so didn't have much option unless this command is really important then I could pre-processor around it if needed.
typedef NS_OPTIONS(NSUInteger, AVAudioSessionCategoryOptions)
{
/* MixWithOthers is only valid with AVAudioSessionCategoryPlayAndRecord, AVAudioSessionCategoryPlayback, and AVAudioSessionCategoryMultiRoute */
AVAudioSessionCategoryOptionMixWithOthers = 0x1,
/* DuckOthers is only valid with AVAudioSessionCategoryPlayAndRecord, AVAudioSessionCategoryPlayback, and AVAudioSessionCategoryMultiRoute */
AVAudioSessionCategoryOptionDuckOthers = 0x2,
/* AllowBluetooth is only valid with AVAudioSessionCategoryRecord and AVAudioSessionCategoryPlayAndRecord */
AVAudioSessionCategoryOptionAllowBluetooth __TVOS_PROHIBITED = 0x4,
/* DefaultToSpeaker is only valid with AVAudioSessionCategoryPlayAndRecord */
AVAudioSessionCategoryOptionDefaultToSpeaker __TVOS_PROHIBITED = 0x8,
/* InterruptSpokenAudioAndMixWithOthers is only valid with AVAudioSessionCategoryPlayAndRecord, AVAudioSessionCategoryPlayback, and AVAudioSessionCategoryMultiRoute */
AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers NS_AVAILABLE_IOS(9_0) = 0x11
} NS_AVAILABLE_IOS(6_0);
@danoli3 - apart from that one comment this looks good to me! |
@ofTheo Check my reply to your comments. Just realised it wasn't tagged. After that keen to merge this so I keep working on the iOS sector without merge issues. |
@ofTheo if we need to make that change back, after this merge I'll fix it with a default type based on target if needed. MIX seems to hit all targets though so should be a better solution. |
…ge/Feature # Conflicts: # scripts/templates/ios/Project.xcconfig # scripts/templates/ios/emptyExample.xcodeproj/project.pbxproj
Okay I'm going to merge once Travis gives clear |
tvOS - Apple TV OS Feature - Updated Again!
Split PR of changes for tvOS
Previous PR: #4477
Updated PR from #4413
Working version of openframeWorks for AppleTVOS tvOS
Requirements:
Changes:
#ifdef TARGET_OS_IOS
to ``#if TARGET_OS_IOS`#if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV)
Testing:
Changes made include modifications to ofxiOS with some pre-processor defines to not expose certain functions that are not in the tvOS SDK (such as video grabber, mapkit, orientation code etc).
Pre-Requisites (Apothecary library builds) (WORK IN PROGRESS) - BITCODE = YES.
./apothecary -t tvos update FreeImage
./apothecary -t tvos update openssl
./apothecary -t tvos update poco
./apothecary -t tvos update freetype
./apothecary -t tvos update tess2
./apothecary -t tvos update ofxAssimpModelLoader
- [x]Removed../apothecary -t tvos update ofxOpenCV
Library Changes.