if (player == null) {
logger.warning("no player for " + callID);
return;
}
OrbSetVolumeMessage msg = (OrbSetVolumeMessage) message;
String softphoneCallID = msg.getSoftphoneCallID();
Player softphonePlayer = vm.getPlayer(softphoneCallID);
if (softphonePlayer == null) {
logger.warning("Can't find Player for softphone " + softphoneCallID);
return;
}
DefaultSpatializer spatializer = (DefaultSpatializer)
vm.getVoiceManagerParameters().livePlayerSpatializer.clone();
double volume = msg.getVolume();
spatializer.setAttenuator(volume);
if (volume == 1) {
softphonePlayer.removePrivateSpatializer(player);
} else {
softphonePlayer.setPrivateSpatializer(player, spatializer);
}
logger.fine("player " + player + " sp " + spatializer + " v " + volume);
return;
}
if (message instanceof OrbAttachMessage) {
OrbAttachMessage msg = (OrbAttachMessage) message;
boolean isAttached = msg.isAttached();
if (isAttached && msg.getHostCellID() == null) {
/*
* If hostCellID is null, the client is asking
* us to tell it if there is a host for this orb.
*/
sender.send(clientID, new OrbAttachMessage(
msg.getCellID(), null, false));
return;
}
logger.fine("Orb attached to " + msg.getHostCellID()
+ " is " + msg.isAttached());
if (msg.isAttached()) {
hostCellID = msg.getHostCellID();
orbStatusListenerRef.get().setHostCellID(hostCellID);
} else {
orbStatusListenerRef.get().removeCallStatusListener(msg.getHostCellID());
hostCellID = null;
}
sender.send(message);
return;