≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Issue with sound play with selected device
Posted by:
(you are not logged in)
Enter the missing letter in: "Intern?tional"
(you are not logged in)
Text:
[quote][b]KRP[/b] wrote: Hey, here is the code - Fetch devices from system and show them : //To store the Key-Value pair of audio devices var DeviceList = new List<System.Collections.DictionaryEntry>(); //Get the list of installed sound devices. IrrKlang.ISoundDeviceList SoundDeviceList = new IrrKlang.ISoundDeviceList(IrrKlang.SoundDeviceListType.PlaybackDevice); //Add each device to a combo box. for (int i = 0; i < SoundDeviceList.DeviceCount; i++) { DeviceList.Add(new System.Collections.DictionaryEntry(SoundDeviceList.getDeviceDescription(i), SoundDeviceList.getDeviceID(i))); } cmbRingingDevice.DataSource = DeviceList; cmbRingingDevice.DisplayMember = "Key"; cmbRingingDevice.ValueMember = "Value"; //Show device name saved in the registry if (Application.UserAppDataRegistry.GetValue("Ringing Device Name") != null) { string strRingingDevice = Application.UserAppDataRegistry.GetValue("Ringing Device Name").ToString(); if (strRingingDevice != null) cmbRingingDevice.Text = strRingingDevice; } ///////////////////////////////////////////// //Fetch device from registry : if (Application.UserAppDataRegistry.GetValue("Ringing Device ID") != null) { string strRingingDevice = Application.UserAppDataRegistry.GetValue("Ringing Device ID").ToString(); if (strRingingDevice != "") { IrrKlang.ISoundEngine irrKlangEngine = new IrrKlang.ISoundEngine(IrrKlang.SoundOutputDriver.AutoDetect, IrrKlang.SoundEngineOptionFlag.DefaultOptions, strRingingDevice); irrKlangEngine.AddSoundSourceFromFile(System.IO.Path.Combine(Application.StartupPath, @"irish.wav")); irrKlangEngine.Play2D(System.IO.Path.Combine(Application.StartupPath, @"irish.wav"), true); popUpFrom.ShowBox("Answer the incoming call?\nCaller: " + CAPName + " \nService Name: " + strIP[1], strIP[0]); irrKlangEngine.StopAllSounds(); } }[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact