Wwise SDK 2022.1.15
|
Wwise SDK를 이용해 개발 오디오 앱이 쉽고 정확하게 오디오 세션을 관리하게 하기 위해서는 간단한 조치가 몇 가지 필요합니다. Wwise는 사용자들이 앱의 중요한 부분에 집중할 수 있도록 뒤에서 iOS 오디오 세션의 많은 복잡한 부분들을 처리하고 있습니다. All audio interruption and route change mechanics are already taken care of internally by Wwise and their associated callbacks are completely optional for the end user. 이 경우 사운드 엔진의 중지와 재개 또한 SDK에서 관리됩니다.
개발 앱의 오디오 세션과 여기에 사용되는 다양한 콜백의 환경 설정을 하기 위해서는 다음을 사용합니다.
struct AkInitSettings
struct AkPlatformInitSettings
struct AkPlatformInitSettings::AkAudioSessionProperties
멤버를 사용해 eCategory와 eCategoryOptions, eMode 를 원하는 오디오 세션 카테고리로 설정하고 필요에 따라 앱의 오버라이드 옵션과 모드를 설정합니다.
참고:
|
Wwise SDK 사용자 앱에 필요한 아래의 간단한 조치를 하면 iOS 오디오 세션에 온전히 호환되는 오디오 앱을 쉽게 만들 수 있습니다.
struct AkPlatformInitSettings.audioSession.eCategory
를 원하는 값으로 설정하세요.struct AkPlatformInitSettings.audioSession.eCategoryOptions
를 원하는 값으로 설정하세요 (선택 사항).struct AkPlatformInitSettings.audioCallbacks.interruptionCallback
을 사용자 지정 콜백 메소드로 설정하세요.true
로 설정된 렌더링 옵션과 함께 Wwise가 내부적으로 사운드 엔진을 중지시킵니다.AVAudioSessionRouteChangeNotification
에 대해 iOS NotificationCenter에 등록하고 이를 위한(콜백) 선택자를 제공합니다.참고: iOS Integration Demo IntegrationDemoAppDelegate.mm 소스 코드에서 위에서 설명한 모든 조치에 대한 예제를 확인하세요. |
경고: 위에 나온 모든 조치는 AK::SoundEngine::Init( &in_initSettings, &in_platformInitSettings ) 로 사운드 엔진을 초기화하기 전에 마쳐야 합니다. |
참고: 오직 오디오 세션 카테고리 AkAudioSessionCategoryPlayAndRecord 만이 앱의 백그라운드 상태에서 오디오를 재생하거나 녹음할 수 있습니다. 이 동작이 필요한 경우, 앱 정보 plist도 Xcode에서 수정해 'Required background modes(필요한 백그라운드 모드)' 키를 'App plays audio or streams audio/video using Airplay(앱이 Airply를 이용해 오디오를 재생하거나 오디오/비디오를 스트리밍함)' 값으로 추가합니다. |
To reconfigure the audio session after the sound engine has been initialized, use the AK::SoundEngine::iOS::ChangeAudioSessionProperties() API call. This is useful if, for example, your app needs microphone input temporarily and needs to switch to the Play and Record category for the duration of the recording.
참고: Changing audio session properties during runtime causes the sink to reset. Any audio playback will glitch for a fraction of a second at this time. Therefore, it is better to call this API while the app is silent. |
Refer to the iOS Integration Demo DemoAppLifecycle.cpp
source code for a demonstration of how this is done.
여기서는 다양한 오디오 세션 공유 시나리오에서 발생하는 호출 처리에 대한 이해를 돕기 위해, Wwise와 iOS 오디오 세션으로 애플리케이션간의 오디오를 어떻게 다루는 지 자세히 설명합니다.
Ambient
or PlayAndRecord
with the 'mixable' option), the Wwise SDK will mute the background music bus.AkAudioSessionCategoryAmbient
카테고리를 사용하도록 돼있는 경우:AkAudioSessionCategorySoloAmbient
카테고리를 사용하도록 돼있는 경우:AkAudioSessionCategoryPlayAndRecord
카테고리를 사용하도록 돼있는 경우:AkAudioSessionCategorySoloAmbient
category.AkAudioSessionCategoryAmbient
category. 프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.
Wwise를 시작해 보세요