Package org.jdesktop.wonderland.modules.orb.common.messages

Examples of org.jdesktop.wonderland.modules.orb.common.messages.OrbSetVolumeMessage


private void volumeSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_volumeSliderStateChanged
    float volume = volumeConverter.getVolume(volumeSlider.getValue());

    SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();

    channelComp.send(new OrbSetVolumeMessage(orbCell.getCellID(), sc.getCallID(), volume));
}//GEN-LAST:event_volumeSliderStateChanged
View Full Code Here


      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;
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.modules.orb.common.messages.OrbSetVolumeMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.