Lines Matching full:tonegenerator
35 import android.media.ToneGenerator;
81 // ToneGenerator instance for playing SignalInfo tones
82 private ToneGenerator mSignalInfoToneGenerator;
156 // Instantiate the ToneGenerator for SignalInfo and CallWaiting
158 // around forever. Need to change it so as to create a ToneGenerator instance only
162 mSignalInfoToneGenerator = new ToneGenerator(AudioManager.STREAM_VOICE_CALL,
281 * during a call, using the ToneGenerator.
339 int toneType = 0; // passed to ToneGenerator.startTone()
340 int toneVolume; // passed to the ToneGenerator constructor
346 toneType = ToneGenerator.TONE_SUP_CALL_WAITING;
353 toneType = ToneGenerator.TONE_CDMA_NETWORK_BUSY_ONE_SHOT;
360 toneType = ToneGenerator.TONE_SUP_BUSY;
368 toneType = ToneGenerator.TONE_SUP_CONGESTION;
374 toneType = ToneGenerator.TONE_PROP_PROMPT;
381 toneType = ToneGenerator.TONE_CDMA_ALERT_CALL_GUARD;
385 toneType = ToneGenerator.TONE_PROP_PROMPT;
391 toneType = ToneGenerator.TONE_CDMA_ALERT_NETWORK_LITE;
396 toneType = ToneGenerator.TONE_CDMA_REORDER;
401 toneType = ToneGenerator.TONE_CDMA_ABBR_INTERCEPT;
407 toneType = ToneGenerator.TONE_CDMA_CALLDROP_LITE;
412 toneType = ToneGenerator.TONE_CDMA_ALERT_AUTOREDIAL_LITE;
417 toneType = ToneGenerator.TONE_SUP_ERROR;
427 ToneGenerator toneGenerator;
436 toneGenerator = new ToneGenerator(stream, toneVolume);
437 // if (DBG) log("- created toneGenerator: " + toneGenerator);
440 "InCallTonePlayer: Exception caught while creating ToneGenerator: " + e);
441 toneGenerator = null;
444 // Using the ToneGenerator (with the CALL_WAITING / BUSY /
445 // CONGESTION tones at least), the ToneGenerator itself knows
452 // TODO: When we stop the ToneGenerator in the middle of a
455 // ToneGenerator to say "stop at the next silent part of the
461 if (toneGenerator != null) {
464 if (toneType == ToneGenerator.TONE_CDMA_ALERT_CALL_GUARD) {
471 } else if ((toneType == ToneGenerator.TONE_CDMA_NETWORK_BUSY_ONE_SHOT) ||
472 (toneType == ToneGenerator.TONE_CDMA_REORDER) ||
473 (toneType == ToneGenerator.TONE_CDMA_ABBR_REORDER) ||
474 (toneType == ToneGenerator.TONE_CDMA_ABBR_INTERCEPT) ||
475 (toneType == ToneGenerator.TONE_CDMA_CALLDROP_LITE)) {
481 } else if ((toneType == ToneGenerator.TONE_CDMA_ALERT_AUTOREDIAL_LITE) ||
482 (toneType == ToneGenerator.TONE_CDMA_ALERT_NETWORK_LITE)) {
499 toneGenerator.startTone(toneType);
507 toneGenerator.stopTone();
511 toneGenerator.release();
672 * Helper class to play SignalInfo tones using the ToneGenerator.
728 //Map the Signal to a ToneGenerator ToneID only if Signal info is present
747 new SignalInfoTonePlayer(ToneGenerator.TONE_CDMA_SIGNAL_OFF).start();