I've been working on integrating WWise into an Android Java app via JNI, following the Integration Demo Sample project. My current initialization function is as follows:
// Memory Manager
AkMemSettings memSettings;
memSettings.uMaxNumPools = 20;
AK::MemoryMgr::Init(&memSettings); // AK_Success
// Stream Manager
AkStreamMgrSettings stmSettings;
AK::StreamMgr::GetDefaultSettings(stmSettings);
AK::StreamMgr::Create(stmSettings);
// Streaming device (pLowLevelIO points to a CAkFilePackageLowLevelIOBlocking object)
AkDeviceSettings deviceSettings;
AK::StreamMgr::GetDefaultDeviceSettings(deviceSettings);
pLowLevelIO->Init(deviceSettings); // AK_Success
pLowLevelIO->SetBasePath( "soundbanks" );
// Sound Engine
AK::SoundEngine::Init(NULL, NULL); // AK_Success
// Music Engine
AkMusicSettings musicSettings;
AK::MusicEngine::GetDefaultInitSettings(musicSettings);
AK::MusicEngine::Init(&musicSettings);
// Communication device
AkCommSettings commSettings;
AK::Comm::GetDefaultInitSettings(commSettings);
AK::Comm::Init(commSettings); // AK_Fail
According to the documentation, AK::Comm::Init returns:
AK_Success when everything went well
AK_InvalidParameter if one of the given settings is invalid
AK_InsufficientMemory when given poolsize is too small
AK_Fail for other errors <--------
Does anybody have any clue of why AK::Comm::Init returns AK_Fail?
Help is much appreciated!
Thanks.
EDIT AK::Comm::Init prints this error:
I/AKDEBUG: AK::Comm -> DiscoveryChannel::Init() -> m_socket.Bind() failed, requested port == 24024 (AkCommSettings::ports.uDiscoveryBroadcast)