public int playTone(ETones toneId) { string fname; switch (toneId) { case ETones.EToneDial: fname = "Sounds/dial.wav"; break; case ETones.EToneCongestion: fname = "Sounds/congestion.wav"; break; case ETones.EToneRingback: fname = "Sounds/ringback.wav"; break; case ETones.EToneRing: fname = "Sounds/ring.wav"; break; default: fname = ""; break; } player.SoundLocation = fname; player.Load(); player.PlayLooping(); return(1); }
public int playTone(ETones toneId) { Stream snd = SIPComm.Properties.Resources.congestion; switch (toneId) { case ETones.EToneDial: snd = SIPComm.Properties.Resources.dial; break; case ETones.EToneCongestion: snd = SIPComm.Properties.Resources.congestion; break; case ETones.EToneRingback: snd = SIPComm.Properties.Resources.ringback; break; case ETones.EToneRing: snd = SIPComm.Properties.Resources.ring; break; default: break; } //player.SoundLocation = fname; player.Stream = snd; player.Load(); player.PlayLooping(); return 1; }
public int playTone(ETones toneId) { lock (_lockObj) { if (_isPlaying) { //Task.Factory.StartNew(() => stopTone(), TaskCreationOptions.PreferFairness); _isPlaying = false; CommonDelegates.SafeInvoke(() => dll_releaseWav(_playerId)); } if (_sessionId >= 0) { _playerId = CommonDelegates.SafeInvoke(() => dll_playWav(GetToneFile(toneId), true, _sessionId)); if (_playerId >= 0) { _isPlaying = true; } } return(_playerId); } }
public int playTone(ETones toneId) { string fname; switch (toneId) { case ETones.EToneDial: fname = "Sounds/dial.wav"; player.Stream = Properties.Resources.dial; break; case ETones.EToneCongestion: fname = "Sounds/congestion.wav"; player.Stream = Properties.Resources.congestion; break; case ETones.EToneRingback: fname = "Sounds/ringback.wav"; player.Stream = Properties.Resources.ringback; break; case ETones.EToneRing: fname = "Sounds/ring.wav"; player.Stream = Properties.Resources.ring; break; default: fname = ""; break; } //player.SoundLocation = fname; player.Load(); player.PlayLooping(); return 1; }
public void PlayTone(ETones ton) { try { CCallManager.Instance.MediaProxy.playTone(ETones.EToneCongestion); } catch { } }
public int playTone(ETones toneId) { string fname; switch (toneId) { case ETones.EToneDial: fname = "Sounds/dial.wav"; break; case ETones.EToneCongestion: fname = "Sounds/congestion.wav"; break; case ETones.EToneRingback: fname = "Sounds/ringback.wav"; break; case ETones.EToneRing: fname = "Sounds/ring.wav"; break; default: fname = ""; break; } if (!System.IO.File.Exists(fname)) { return(0); } if (toneId == ETones.EToneRingback) { return(1); } if (toneId == ETones.EToneCongestion) { CreateTimer(); } player.SoundLocation = fname; player.Load(); player.PlayLooping(); return(1); }
private string GetToneFile(ETones toneId) { switch (toneId) { case ETones.EToneDial: return("Sounds/dial.wav"); case ETones.EToneCongestion: return("Sounds/congestion.wav"); case ETones.EToneRingback: return("Sounds/ringback.wav"); case ETones.EToneRing: return("Sounds/ring.wav"); default: return(""); } }
public int playTone(ETones toneId) { string fname; switch (toneId) { case ETones.EToneDial: fname = "Sounds/dial.wav"; break; case ETones.EToneCongestion: fname = "Sounds/congestion.wav"; break; case ETones.EToneRingback: fname = "Sounds/ringback.wav"; break; case ETones.EToneRing: fname = Environment.CurrentDirectory + @"\Sounds\ring.wav"; break; default: fname = ""; break; } if (System.IO.File.Exists(fname)) { player.SoundLocation = fname; player.Load(); player.PlayLooping(); } return(1); }
public int playTone(ETones toneId) { return 1; }
public int playTone(ETones toneId) { string fname; switch (toneId) { case ETones.EToneDial: fname = "Sounds/dial.wav"; break; case ETones.EToneCongestion: fname = "Sounds/congestion.wav"; break; case ETones.EToneRingback: fname = "Sounds/ringback.wav"; break; case ETones.EToneRing: fname = "Sounds/ring.wav"; break; default: fname = ""; break; } player.SoundLocation = fname; player.Load(); player.PlayLooping(); return 1; }