menu
バージョン
2017.1.9.6501
2024.1.4.8780
2023.1.12.8706
2022.1.18.8567
2021.1.14.8108
2019.2.15.7667
2019.1.11.7296
2018.1.11.6987
2017.2.10.6745
2017.1.9.6501
2016.2.6.6153
2015.1.9.5624
2024.1.4.8780
2023.1.12.8706
2022.1.18.8567
2021.1.14.8108
2019.2.15.7667
2019.1.11.7296
2018.1.11.6987
2017.2.10.6745
2017.1.9.6501
2016.2.6.6153
2015.1.9.5624
Wwiseでは、セカンダリ出力には、通常のTVオーディオ出力ではないいずれの物理的オーディオエンドポイントを指定します。最も一般的なセカンダリアウトプットとして、ゲームコントローラのスピーカーなどがあります。Secondary Output機能では、 主要なスピーカー/TVミックスに影響を与えることなく、これら出力のそれぞれに別のミックスを定義することができます。この同じ Wwise の一連の機能は、スピーカー/TVの代わりの出力ターゲットコントローラを除き、いずれ特定の制限なしに、通常のミックスとしてセカンダリ出力に適用されます。
オーサリングサイドでは、セカンダリバス階層にルートされるサウンドは、次に示す2つの方法のうち1つを使って、セカンダリ出力に送られます:
複数のコントローラとTVで同時に、同じソースを使用して、同じサウンドを再生することは可能です。 デザイン側では、ゲームを何人のプレイヤーがプレイしているかの知識はありません。これが、複数出力が可能であっても、マスターセカンダリーバスが一つしかない理由です。このバス階層は、ゲーム側から登録されている各出力へのルーティングのテンプレートとして使用されます。よって各出力は、再生されるサウンド、ゲームオブジェクトでアクティブなRTPC ならびにSwitch値によって、異なるミックスやエフェクトが適用されている可能性があります。以下のセクションの 例 で、このような場合を見てみます。
TVやゲームコントローラなど、多くのデバイスで同じオーディオを出力する場合、デバイスの間でのレイテンシに気づくことがあるでしょう。これは、オーディオ信号パスにおける、ハードウェアの違いのため、避けることはできません。コントローラ側では、この信号は無線のチャンネルを通過しなければならず、これが有線のコントローラと異なるディレイを与える可能性があります。TVでは、一度信号がコンソールを出ると、受信機および/またはTVを通過し、これのプロセッサーがある程度のディレイを追加します。AVの設定によって発生するディレイが各システムで異なるため、スピーカー/TVならびにゲームコントローラへ同時にルートされるサウンドを同期させるのは不可能です。サウンドをデザインする場合、この制限を考慮する必要があります。
ゲーム内でデバイスを表すために、通常のリスナー/ゲームオブジェクトの概念が使用されています。詳細については 概念:リスナー を参照して下さい。AK::SoundEngine::AddSecondaryOutput
を利用して出力デバイスとリスナーを関連付けることは、プログラマーの責任になります。プログラマーはまた、各エミッタ―ゲームオブジェクトに関連付けられているのが、どのリスナーゲームオブジェクトなのかも、AK::SoundEngine::SetListeners
や、Ak::SoundEngine::SetDefaultListeners
で選択する必要があります。サウンドがTVにも行く場合には、TVへリスナーを追加することを忘れないでください 。
info
|
Note: ゲームコントローラー (またはいずれの他の種類のオーディオ出力) がシステムから接続、接続解除される時はいつでも、ゲームコードが AddSecondaryOutput ならびに RemoveSecondaryOutput の呼び出しを行います。Wwiseは、どのデバイスとどのリスナーを、および概念的にはどのプレイヤーを関連付けるのか、自動的に知ることはできません。 |
これらの例はPS4のために書かれています。各プラットフォームでパラメータが大変異なるので、AKSoundEngine::AddSecondaryOutput 関数の説明を確認してください。
UserIDsを得るためのコード (PS4 のみ):
SceUserServiceLoginUserIdList list; sceUserServiceGetLoginUserIdList(&list);
1つのゲームコントローラ出力でのサウンド:
// Add a secondary output connected to the headphones endpoint for player 0, associated with listener #1 AddSecondaryOutput(list.userId[0] /*Player ID (first player)*/, AkSink_PAD, listenerArray1, 1); // Setup listeners RegisterGameObj(MY_LISTENER1); RegisterGameObj(MY_LISTENER2); AkGameObjectID [] listenerArray1[] = {MY_LISTENER1} AkGameObjectID [] listenerArray2[] = {MY_LISTENER2} AkGameObjectID [] listenerArrayBoth = {MY_LISTENER1, MY_LISTENER2} // Set up a game object to emit sound to listener 1. RegisterGameObj(MY_GAME_OBJECT, MY_LISTENER1, 1); // Play an Event. This sound must be routed to the Master Secondary Bus (or any sub bus) PostEvent("Play_Pow", MY_GAME_OBJECT);
2つの異なるコントローラでの同じサウンド:
// Add a secondary output connected to the headphones output for player 0, associated with listener #1 AddSecondaryOutput(list.userId[0] /*Player ID (first player)*/, AkSink_PAD, listenerArray1, 1); AddSecondaryOutput(list.userId[1] /*Player ID (second player)*/, AkSink_PAD, listenerArray2, 1); // Set a game object to emit sound to the listener 1(player 0) and 2 (player 1) SetActiveListeners(EXISTING_GAME_OBJECT, listenerArrayBoth, 2); // Play an Event. This sound must be routed to the Master Secondary Bus (or any sub bus) PostEvent("Play_Pow", EXISTING_GAME_OBJECT);
2つの異なるコントローラでの、異なるサウンド:
// Add a secondary output connected to the headphones output for player 0, associated with listener #1 AddSecondaryOutput(list.userId[0] /*Player ID (first player)*/, AkSink_PAD, listenerArray1, 1); AddSecondaryOutput(list.userId[1] /*Player ID (second player)*/, AkSink_PAD, listenerArray2, 1); // Set a game object to emit sound to the proper listeners RegisterGameObj(MY_GAME_OBJECT1, listenerArray1, 1); RegisterGameObj(MY_GAME_OBJECT2, listenerArray2, 1); // Play an Event. These sounds must be routed to the Master Secondary Bus (or any sub bus) PostEvent("Play_Pow", MY_GAME_OBJECT1); PostEvent("Play_Pif", MY_GAME_OBJECT2);
1つのゲームコントローラとTVでの同じサウンド:
// Add a secondary output connected to the headphones output for player 0, associated with listener #1 AddSecondaryOutput(list.userId[0] /*Player ID (first player)*/, AkSink_PAD, listenerArray1, 1); // Set a game object to emit sound to the listener 0 (TV) and 1 (controller for player 0) AkGameObjectID [] listenerArrayWithDefault = {MY_MAIN_LISTENER, MY_LISTENER1}; // MY_MAIN_LISTENER is the listener you normally use, defined by AK::SoundEngine::SetDefaultListeners. RegisterGameObj(MY_GAME_OBJECT, listenerArrayWithDefault, 2); // Play an Event. This sound must be routed to the Master Secondary Bus (or any sub bus) plus have a send to an auxiliary bus in the main hierarchy. PostEvent("Play_Pow", MY_GAME_OBJECT);
以下は、WindowsでSecondaryOutputを追加した例で、ヘッドフォンで再生されます:
// Will search for a device that has "Headphones" in its name. uDeviceID = AK::GetDeviceIDFromName("Headphones"); // Add a secondary output connected to the device found previously, associated with listener1 AddSecondaryOutput(uDeviceID, AkSink_Secondary, listenerArray1, 1); // Register a game object associated only with listener1. RegisterGameObj(MY_GAME_OBJECT, listenerArray1, 1); // Play an Event. This sound must be routed to the Master Secondary Bus (or any sub bus) plus have a send to an Auxiliary Bus in the main hierarchy. PostEvent("Play_Pow", MY_GAME_OBJECT);