/// <summary>
        ///
        /// </summary>
        /// <param name="_enabled"></param>
        /// <param name="tipo"></param>
        /// <returns></returns>
        static public int AddDevice(bool _enabled, CORESIP_SndDevType tipo, CMediaDevMode mode)
        {
            int _device = -1;

            if (_enabled)
            {
                int _channel_in  = mode != CMediaDevMode.Output ? GetInputChannelFor(tipo) : -1;
                int _channel_out = mode != CMediaDevMode.Input ? GetOutputChannelFor(tipo) : -1;

                _device = SipAgent.AddSndDevice(tipo, _channel_in, _channel_out);
                _Logger.Debug("Agregado Dispositivo de sonido ({0}) = {1:X}: IN:{2},OUT:{3}", tipo, _device, _channel_in, _channel_out);
            }
            return(_device);
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="_enabled"></param>
        /// <param name="tipo"></param>
        /// <returns></returns>
        static public int AddDevice(bool _enabled, CORESIP_SndDevType tipo)
        {
            int _device = -1;

            if (_enabled)
            {
                int _channel_in  = tipo == CORESIP_SndDevType.CORESIP_SND_INSTRUCTOR_MHP || tipo == CORESIP_SndDevType.CORESIP_SND_ALUMN_MHP ? GetInputChannelFor(tipo) : -1;
                int _channel_out = GetOutputChannelFor(tipo);

                _device = SipAgent.AddSndDevice(tipo, _channel_in, _channel_out);
                _Logger.Info("Agregado Dispositivo de sonido ({0}) = {1:X}: IN:{2},OUT:{3}", tipo, _device, _channel_in, _channel_out);
            }
            return(_device);
        }