Legacy Voice API

Overview

Before Voice Core, native voice chat used PhotonVoice-cpp on top of LoadBalancing-cpp. Voice Core is built on that same library.

The PhotonVoice-cpp binaries ship in the Realtime Core SDK, but its headers do not.

Legacy Headers Download

The Photon Realtime Headers download carries the PhotonVoice-cpp headers, along with those of Common-cpp, Photon-cpp and LoadBalancing-cpp. It is meant to sit beside the SDK package, and both are on SDK Download.

Updating Existing Projects

An existing project replaces the old SDK's libraries with the binaries from the Realtime Core SDK and takes its headers from the legacy headers download. The code itself stays as it is.

Add <headers package>/Realtime to the include path. The #include lines stay unchanged. Add RealtimeCore/lib/<platform>/<arch>/ to the library path and link PhotonVoice-cpp, LoadBalancing-cpp, Photon-cpp, Common-cpp and opus_egpv, plus the system libraries listed in the headers package's README.

Choosing One API

An application uses either the legacy API or Voice Core, never both. Both claim the same event codes and would compete for them.

New projects use Voice Core. Existing projects can keep the legacy API and migrate later.

A migration maps the legacy concepts as follows:

Legacy API Voice Core
LoadBalancingTransport and ExitGames::Voice::VoiceClient RealtimeCore::Voice::VoiceClient
LocalVoiceAudio<float> LocalVoice
Remote voice callbacks OnRemoteVoiceAdded and the voice's PlaybackBuffer
IAudioOut and AudioOutDelayControl PlaybackBuffer

Additional Resources

Last updated on

Back to top