menu
 
버전
2018.1.11.6987

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


menu_open
Wwise SDK 2018.1.11
C++ - WAMP

This page explains an example on how to use the Wwise Authoring API in C++. It also contains the library code supporting the WAMP protocol used by Wwise, which you can use in your own C++ project.

Building on Windows

The Visual Studio solution is located in "samples/WwiseAuthoringApi/cpp/SampleClient". You must install the Wwise SDK to access it.

Simply open SampleClientWindows_vc120.sln, SampleClientWindows_vc140.sln or SampleClientWindows_vc150.sln and build the solution.

info Note: This example requires Visual Studio 2013 (or more recent).

Building on OS X

You can build all targets with: "samples/WwiseAuthoringApi/cpp/SampleClient/mac_build.sh"

Using the sample

This sample runs on the command line. By default, when no parameter is provided, it runs the getInfo RPC call to Wwise Authoring and displays basic information.

More extended examples are available, which you can run by using the associated command line parameter:

  • TestWampClient: Example demonstrating basic operations such as connect, call and subscribe, using the AkJson class.
  • TestWampClientJsonString: Mostly the same as TestWampClient, but using std::string for JSON instead of the AkJson class.
  • PerfTest: Basic performance test which repeatedly makes the same call and displays the average execution time per call, as well as the total time.
  • TestErrors: Generates and handles different kinds of errors and shows how to use the logging feature.
  • TestMonitoring: This example demonstrate how to monitor the current status of Wwise. It detects when Wwise starts, exits, loads or closes a project, and which project is loaded at any given time.

C++ client and WAMP library

This sample contains the AkAutobahn library, which is a modified versions of the WAMP_POCO library (itself based on Autobahn|Cpp), civetweb library and the Client class. AkAutobahn is provided as part of the Wwise SDK. The class Client provides a simple interface to our API, internally using the "session" class to connect to Wwise Authoring using the WAMP protocol. Feel free to use the Client as-is or modify it to better suit your needs.

Out of convenience, the Client class uses blocking calls (by calling std::future::get). Therefore, the caller thread gets blocked until Wwise Authoring provides a result. A timeout parameter is available to block for only a specific amount of time. The "session" class returns std::future for thread synchronization, which means that you could implement your own asynchronous version of the Client class if it better suits your needs.

The Client class does not support being called from within a callback. In other words, you should not call a method of Client when Client is already calling you.

Logging

Logging is optional, but it often helps the debugging process. You can call Logger::Get()->SetLoggerFunction(logFunction) to provide your own logging function.


이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요