Package com.sun.mpk20.voicelib.app

Examples of com.sun.mpk20.voicelib.app.CallSetup


    }

    public void setSpatializer(boolean inConeOfSilence) {
  String callID = CallID.getCallID(cellID);

  Player player = AppContext.getManager(VoiceManager.class).getPlayer(callID);
   
  if (player == null) {
      logger.warning("no player for " + callID);
      return;
  }

  player.setPublicSpatializer(getSpatializer(inConeOfSilence));
    }
View Full Code Here


            logger.fine("GOT Volume message:  call " + softphoneCallID
          + " volume " + volume + " other callID " + otherCallID);

            VoiceManager vm = AppContext.getManager(VoiceManager.class);

            Player softphonePlayer = vm.getPlayer(softphoneCallID);

            if (softphonePlayer == null) {
                logger.warning("Can't find softphone player, callID "
        + softphoneCallID);
                return;
            }

            Player player = vm.getPlayer(otherCallID);

       if (player == null) {
                logger.warning("Can't find player for callID " + otherCallID);
          return;
            }

      if (msg.isSetVolume() == false) {
                AudioTreatmentComponentMO audioTreatmentComponentMO =
        cellMO.getComponent(AudioTreatmentComponentMO.class);

    msg.setVolume(audioTreatmentComponentMO.getVolume());
                sender.send(clientID, msg);
                logger.fine("Sending vol message " + msg.getVolume());
                return;
            }

      if (volume == 1.0) {
          softphonePlayer.removePrivateSpatializer(player);
          return;
      }

      VoiceManagerParameters parameters = vm.getVoiceManagerParameters();

            Spatializer spatializer;

      spatializer = player.getPublicSpatializer();

      if (spatializer != null) {
          spatializer = (Spatializer) spatializer.clone();
      } else {
          if (player.getSetup().isLivePlayer) {
        spatializer = (Spatializer) parameters.livePlayerSpatializer.clone();
          } else {
        spatializer = (Spatializer) parameters.stationarySpatializer.clone();
          }
      }
View Full Code Here

        public void playerInRange(Player player, Player playerInRange,
                                  boolean isInRange)
        {
            // look up the binding in the data store
            try {
                PlayerInRangeListener listener =
                        (PlayerInRangeListener) AppContext.getDataManager().getBinding(bindingName);
                listener.playerInRange(player, playerInRange, isInRange);
            } catch (ObjectNotFoundException onfe) {
                logger.log(Level.WARNING, "Object not found for binding " +
                           bindingName);
                player.removePlayerInRangeListener(this);
            } catch (NameNotBoundException nnbe) {
View Full Code Here

    relock(sender);
      }

      logger.fine("Got place call message " + externalCallID);

      PlayerSetup playerSetup = new PlayerSetup();
      //playerSetup.x =  translation.x;
      //playerSetup.y =  translation.y;
      //playerSetup.z =  translation.z;
      playerSetup.isOutworlder = true;
      playerSetup.isLivePlayer = true;
View Full Code Here

                logger.info("Transferring call " + call
        + " to phone " + phoneInfo.phoneNumber);

    Vector3f location = getLocation(phone.phoneCellRef);

    PlayerSetup setup = new PlayerSetup();
    setup.x = location.getX();
    setup.y = location.getY();
    setup.z = location.getZ();
    setup.isOutworlder = true;
    setup.isLivePlayer = true;
View Full Code Here

          }    
      }

      audioBounds = new BoundingSphere((float) extent, new Vector3f());

      Spatializer spatializer = new FullVolumeSpatializer(extent);
      spatializer.setAttenuator(volume);
      return spatializer;
  } else {
            audioBounds = new BoundingSphere((float) extent, new Vector3f());
        }
 
  double fullVolumeRadius = fullVolumeAreaPercent / 100. * extent;

  double falloff = .92 + ((50 - this.falloff) * ((1 - .92) / 50));

  if (falloff >= 1) {
      falloff = .999;
  }

  logger.warning("id " + groupId + " cellRadius " + cellRadius
      + " extent " + extent + " use cell bounds " + useCellBounds
      + " fvr " + fullVolumeRadius + " falloff "
      + falloff + " volume " + volume);

        if (distanceAttenuated == true) {
            DefaultSpatializer spatializer = new DefaultSpatializer();

            spatializer.setFullVolumeRadius(fullVolumeRadius);

            spatializer.setZeroVolumeRadius(extent);

      spatializer.setAttenuator(volume);

      FalloffFunction falloffFunction = spatializer.getFalloffFunction();

      falloffFunction.setFalloff(falloff);

      spatializer.setAttenuator(volume);

      return spatializer;
        }

  Spatializer spatializer = new FullVolumeSpatializer(extent);
  spatializer.setAttenuator(volume);
  return spatializer;
    }
View Full Code Here

          return;
      }

      VoiceManagerParameters parameters = vm.getVoiceManagerParameters();

            Spatializer spatializer;

      spatializer = player.getPublicSpatializer();

      if (spatializer != null) {
          spatializer = (Spatializer) spatializer.clone();
      } else {
          if (player.getSetup().isLivePlayer) {
        spatializer = (Spatializer) parameters.livePlayerSpatializer.clone();
          } else {
        spatializer = (Spatializer) parameters.stationarySpatializer.clone();
          }
      }

            spatializer.setAttenuator(volume);

            softphonePlayer.setPrivateSpatializer(player, spatializer);
  }
View Full Code Here

      return;
  }

  logger.fine("Restarting treatment...");

  Treatment treatment = AppContext.getManager(VoiceManager.class).getTreatment(treatmentId);

  if (treatment == null) {
      logger.warning("No treatment for " + treatmentId);
      return;
  }

  //System.out.println("Cell entered, restarting input treatment " + treatment);
  treatment.restart(false);
    }
View Full Code Here

      return;
  }

  logger.fine("Pausing treatment...");

  Treatment treatment = AppContext.getManager(VoiceManager.class).getTreatment(treatmentId);

  if (treatment == null) {
      logger.warning("No treatment for " + treatmentId);
      return;
  }

  //System.out.println("Cell exited , pausing input treatment " + treatment);
  treatment.restart(true);
    }
View Full Code Here

            System.out.println("Starting treatment " + setup.treatment + " at (" + setup.x
    + ":" + setup.y + ":" + setup.z + ")");
 
            try {
    Treatment t = vm.createTreatment(treatmentId, setup);

    if (group != null) {
                    group.addTreatment(t);
    }
View Full Code Here

TOP

Related Classes of com.sun.mpk20.voicelib.app.CallSetup

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.