mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/uidriver/mobile: bug fix: specify a shared AVAudioSession for CHHapticEngine
Closes #1976
This commit is contained in:
parent
eabd82cda0
commit
12de3a7749
@ -17,8 +17,9 @@
|
|||||||
|
|
||||||
package mobile
|
package mobile
|
||||||
|
|
||||||
// #cgo LDFLAGS: -framework CoreHaptics
|
// #cgo LDFLAGS: -framework AVFAudio -framework CoreHaptics
|
||||||
//
|
//
|
||||||
|
// #import <AVFAudio/AVFAudio.h>
|
||||||
// #import <CoreHaptics/CoreHaptics.h>
|
// #import <CoreHaptics/CoreHaptics.h>
|
||||||
// #include <dispatch/dispatch.h>
|
// #include <dispatch/dispatch.h>
|
||||||
//
|
//
|
||||||
@ -29,7 +30,11 @@ package mobile
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// NSError* error = nil;
|
// NSError* error = nil;
|
||||||
// CHHapticEngine* engine = [[CHHapticEngine alloc] initAndReturnError:&error];
|
// // Specify the AVAudioSession's shared instance so that this won't affect
|
||||||
|
// // the result of `[[AVAudioSession sharedInstance] secondaryAudioShouldBeSilencedHint]` (#1976).
|
||||||
|
// CHHapticEngine* engine =
|
||||||
|
// [[CHHapticEngine alloc] initWithAudioSession:[AVAudioSession sharedInstance]
|
||||||
|
// error:&error];
|
||||||
// if (error) {
|
// if (error) {
|
||||||
// NSLog(@"CHHapticEngine::initAndReturnError failed: %@", error);
|
// NSLog(@"CHHapticEngine::initAndReturnError failed: %@", error);
|
||||||
// return nil;
|
// return nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user