示例#1
0
        private void Convert_Click(object sender, EventArgs e)
        {
            lblUpdate.Text = string.Format("Converting and downloading: 0/{0}", listCount);
            EnableConvert(false);
            flpDestination.Enabled = false;

            foreach (VideoInfos url in urlList)
                workingList.Add(url);

            urlList.Clear();
            flpSettings.Enabled = false;

            Parameter param;

            if (chkAudio.Checked)
            {
                commandsList.AddCommand(Com.ExtractAudio);
                commandsList.AddCommand(Com.AudioQuality, new Parameter(0));

                param = new Parameter(AudioFormats.GetAudioFormat(cmbOptions.SelectedItem.ToString()));
            }
            else
                param = new Parameter(VideoFormats.GetVideoFormat(cmbOptions.SelectedItem.ToString()));

            commandsList.AddCommand(chkVideo.Checked ? Com.VideoFormat : Com.AudioFormat, param);

            // Output
            commandsList.AddCommand(Com.Output, new Parameter(destinationPath));

            Thread thread = new Thread(Download);
            thread.Start();
        }
        private void SetAudioFormat(ref object value)
        {
            try
            {
                object resultObject;
                string resultvalue, resulttext;

                CFControls.CFListViewItem[] audioFormatItems = new CFControls.CFListViewItem[3];
                audioFormatItems[0] = new CFControls.CFListViewItem(GetAudioFormatDisplay(AudioFormats.AAC_PLUS), AudioFormats.AAC_PLUS.ToString(), 0, false, (object)AudioFormats.AAC_PLUS);
                audioFormatItems[1] = new CFControls.CFListViewItem(GetAudioFormatDisplay(AudioFormats.MP3), AudioFormats.MP3.ToString(), 0, false, (object)AudioFormats.MP3);
                audioFormatItems[2] = new CFControls.CFListViewItem(GetAudioFormatDisplay(AudioFormats.MP3_HIFI), AudioFormats.MP3_HIFI.ToString(), 0, false, (object)AudioFormats.MP3_HIFI);

                AudioFormats audioFormat = AudioFormats.MP3;

                try
                {
                    audioFormat = (AudioFormats)Enum.Parse(typeof(AudioFormats), this.pluginConfig.ReadField("/APPCONFIG/AUDIOFORMAT"));
                }
                catch { }

                //TODO: Pass in current value so the list shows the correct item selected initially, this doesn't seem to work as-is
                DialogResult dialogResult = this.CF_systemDisplayDialog(CF_Dialogs.FileBrowser, this.pluginLang.ReadField("/APPLANG/SETUP/AUDIOFORMAT"), null, audioFormat.ToString(), out resultvalue, out resulttext, out resultObject, audioFormatItems, false, true, false, false, false, false, 1);

                if (dialogResult == DialogResult.OK)
                {
                    audioFormat = (AudioFormats)resultObject;

                    // save user value, note this does not save to file yet, as this should only be done when user confirms settings
                    // being overwritten when they click the "Save" button.  Saving is done internally by the CFSetup instance if
                    // pluginConfig and pluginLang were properly set before callin CF_initSetup().
                    this.pluginConfig.WriteField("/APPCONFIG/AUDIOFORMAT", audioFormat.ToString());

                    // Display new value on Settings Screen button
                    ButtonValue[(int)value] = resulttext;

                    if (audioFormat == AudioFormats.MP3_HIFI)
                    {
                        CFDialogParams dialogParams = new CFDialogParams("High quality audio is only available to Pandora One subscribers. If you are not a subscriber regular quality will be used instead.");
                        this.CF_displayDialog(CF_Dialogs.OkBox, dialogParams);
                    }
                    else if (audioFormat == AudioFormats.AAC_PLUS)
                    {
                        System.Reflection.Assembly assembly = System.Reflection.Assembly.GetEntryAssembly();
                        string bassAacAssemblyPath          = System.IO.Path.GetDirectoryName(assembly.Location) + "\\bass_aac.dll";

                        if (!File.Exists(bassAacAssemblyPath))
                        {
                            CFDialogParams dialogParams = new CFDialogParams("Centrafuse does not natively support the AAC audio format which is used by the mobile quality setting. To enable mobile quality playback you need to install the bass_aac.dll audio extension which can be downloaded from www.un4seen.com. Place the DLL in the Centrafuse directory. If you do not install this library you will not be able to listen to Pandora using the mobile quality setting.");
                            this.CF_displayDialog(CF_Dialogs.OkBoxBig, dialogParams);
                        }
                    }
                }
            }
            catch (Exception errmsg) { CFTools.writeError(errmsg.Message, errmsg.StackTrace); }
        }
        /// <summary>
        /// Sets a file to play and sets the ID of the track for that file name.
        /// </summary>
        /// <param name="fullFileName">Full path of the file to play.</param>
        /// <param name="trackId">ID of the track.</param>
        /// <returns>Task instance.</returns>
        /// <exception cref="AudioPlayerException">If something goes wrong while setting the file.</exception>
        public async Task SetFileAsync(string fullFileName, string trackId)
        {
            await Task.Run(() =>
            {
                // We can only set a new file after the stop procedure completed
                _resetEvent.WaitOne();

                lock (this)
                {
                    try
                    {
                        _trackId = trackId;

                        if (_player.PlaybackState != PlaybackState.Stopped)
                        {
                            throw new AudioPlayerException("The player is not stopped. You can only set a new file if the player is stopped.");
                        }
                        else
                        {
                            // Get the audio format of the new file
                            AudioFormats audioFormat = GetAudioFormatForFileName(fullFileName);

                            if (audioFormat == AudioFormats.Unknown)
                            {
                                throw new AudioPlayerException($"The audio format in the file {fullFileName} is not supported.");
                            }
                            else
                            {
                                // Set the correct reader for the audio format
                                if (audioFormat == AudioFormats.Vorbis)
                                {
                                    _waveStream = new NAudio.Vorbis.VorbisWaveReader(fullFileName);
                                }
                                else
                                {
                                    _waveStream = new AudioFileReader(fullFileName);
                                }
                            }

                            _player.Init(_waveStream);
                        }
                    }
                    catch (Exception e)
                    {
                        throw new AudioPlayerException($"Cannot set the file {fullFileName} ready for playback.", e);
                    }
                }

                // Signal reset event
                _resetEvent.Set();
            });
        }
示例#4
0
        public void RetrieveSongsAsync(string stationId, AudioFormats audioFormat)
        {
            try
            {
                WebClient client = new WebClient();
                client.Headers.Add("content-type", "text-xml");
                client.UploadDataCompleted += new UploadDataCompletedEventHandler(RetrieveSongs_UploadDataCompleted);
                Uri uri = new Uri(String.Format(BASE_URL_LID, _rid, _lid, "getFragment"));

                List <object> parameters = new List <object>();
                parameters.Add(GetTimestamp());
                parameters.Add(_authenticationToken);
                parameters.Add(stationId);
                parameters.Add("0");          //total listening time
                parameters.Add(String.Empty); //time since last session
                parameters.Add(String.Empty); //tracking code

                switch (audioFormat)
                {
                case AudioFormats.AAC_PLUS:
                    parameters.Add("aacplus");
                    break;

                case AudioFormats.MP3:
                    parameters.Add("mp3");
                    break;

                case AudioFormats.MP3_HIFI:
                    parameters.Add("mp3-hifi");
                    break;
                }

                parameters.Add("0"); //delta listening time
                parameters.Add("0"); //listening timestamp

                string xml          = GetXml("playlist.getFragment", parameters);
                string encryptedXml = EncryptionHelper.EncryptString(xml);
                client.UploadDataAsync(uri, "POST", System.Text.Encoding.ASCII.GetBytes(encryptedXml));
            }
            catch (Exception exception)
            {
                if (ExceptionReceived != null)
                {
                    ExceptionReceived(this, new EventArgs <Exception>(exception));
                }
            }
        }
        private string GetAudioFormatDisplay(AudioFormats audioFormat)
        {
            switch (audioFormat)
            {
            case AudioFormats.AAC_PLUS:
                return(this.pluginLang.ReadField("/APPLANG/SETUP/MOBILEQUALITY"));

            case AudioFormats.MP3:
                return(this.pluginLang.ReadField("/APPLANG/SETUP/REGULARQUALITY"));

            case AudioFormats.MP3_HIFI:
                return(this.pluginLang.ReadField("/APPLANG/SETUP/HIGHQUALITY"));

            default:
                return(String.Empty);
            }
        }
示例#6
0
        private void AudioCheckedChanged(object sender, EventArgs e)
        {
            CheckBox chk = (CheckBox)sender;

            if (chk.Checked)
            {
                cmbOptions.Items.Clear();
                chkVideo.Checked = false;
                foreach (string format in AudioFormats.GetAllFormats())
                    cmbOptions.Items.Add(format.ToUpper());

                cmbOptions.SelectedIndex = 0;
                cmbOptions.Enabled = true;

                if (!string.IsNullOrEmpty(destinationPath) && urlList.Count > 0)
                    EnableConvert(true);
            }
            else if (!chkAudio.Checked)
            {
                cmbOptions.Items.Clear();
                EnableConvert(false);
            }
        }
        public override void CF_setupReadSettings(int currentpage, bool advanced)
        {
            try
            {
                ButtonHandler[CFSetupButton.One] = new CFSetupHandler(SetUserName);
                ButtonText[CFSetupButton.One]    = this.pluginLang.ReadField("/APPLANG/SETUP/USERNAME");
                ButtonValue[CFSetupButton.One]   = this.pluginConfig.ReadField("/APPCONFIG/USERNAME");

                ButtonHandler[CFSetupButton.Two] = new CFSetupHandler(SetPassword);
                ButtonText[CFSetupButton.Two]    = this.pluginLang.ReadField("/APPLANG/SETUP/PASSWORD");
                string encryptedPassword = this.pluginConfig.ReadField("/APPCONFIG/PASSWORD");
                ButtonValue[CFSetupButton.Two] = String.IsNullOrEmpty(encryptedPassword) ? String.Empty : new String('•', 8);

                ButtonHandler[CFSetupButton.Three] = new CFSetupHandler(SetAudioFormat);
                ButtonText[CFSetupButton.Three]    = this.pluginLang.ReadField("/APPLANG/SETUP/AUDIOFORMAT");
                AudioFormats audioFormat = AudioFormats.MP3;
                try
                {
                    audioFormat = (AudioFormats)Enum.Parse(typeof(AudioFormats), this.pluginConfig.ReadField("/APPCONFIG/AUDIOFORMAT"));
                }
                catch {}
                ButtonValue[CFSetupButton.Three] = GetAudioFormatDisplay(audioFormat);

                ButtonHandler[CFSetupButton.Four] = new CFSetupHandler(ClearFavorites);
                ButtonText[CFSetupButton.Four]    = this.pluginLang.ReadField("/APPLANG/SETUP/CLEARFAVORITES");
                ButtonValue[CFSetupButton.Four]   = this.pluginLang.ReadField("/APPLANG/SETUP/CLEARFAVORITESPROMPT");

                ButtonHandler[CFSetupButton.Five] = new CFSetupHandler(SetClearCache);
                ButtonText[CFSetupButton.Five]    = this.pluginLang.ReadField("/APPLANG/SETUP/CLEARCACHE");
                ButtonValue[CFSetupButton.Five]   = this.pluginConfig.ReadField("/APPCONFIG/CLEARCACHE");

                ButtonHandler[CFSetupButton.Six] = new CFSetupHandler(SetLogEvents);
                ButtonText[CFSetupButton.Six]    = this.pluginLang.ReadField("/APPLANG/SETUP/LOGEVENTS");
                ButtonValue[CFSetupButton.Six]   = this.pluginConfig.ReadField("/APPCONFIG/LOGEVENTS");
            }
            catch (Exception errmsg) { CFTools.writeError(errmsg.Message, errmsg.StackTrace); }
        }
 private string GetAudioFormatDisplay(AudioFormats audioFormat)
 {
     switch (audioFormat)
     {
         case AudioFormats.AAC_PLUS:
             return this.pluginLang.ReadField("/APPLANG/SETUP/MOBILEQUALITY");
         case AudioFormats.MP3:
             return this.pluginLang.ReadField("/APPLANG/SETUP/REGULARQUALITY");
         case AudioFormats.MP3_HIFI:
             return this.pluginLang.ReadField("/APPLANG/SETUP/HIGHQUALITY");
         default:
             return String.Empty;
     }
 }
        private void LoadSettings()
        {
            //Need to check this first because other stuff may need to write logs
            string logEvents = this.pluginConfig.ReadField("/APPCONFIG/LOGEVENTS");
            Boolean.TryParse(logEvents, out _logEvents);

            //Display name for the plugin
            this.CF_params.displayName = this.pluginLang.ReadField("/APPLANG/PANDORA/DISPLAYNAME");

            _userName = this.pluginConfig.ReadField("/APPCONFIG/USERNAME");

            string _encryptedPassword = this.pluginConfig.ReadField("/APPCONFIG/PASSWORD");

            if (!String.IsNullOrEmpty(_encryptedPassword))
            {
                try
                {
                    _password = EncryptionHelper.DecryptString(_encryptedPassword, Setup.ENCRYPTION_PASSPHRASE);
                }
                catch (Exception ex)
                {
                    WriteLog("Error during password decryption.", ex);
                }
            }

            string favoritesString = this.pluginConfig.ReadField("/APPCONFIG/FAVORITES");
            _favorites.Clear();

            if (!String.IsNullOrEmpty(favoritesString))
                _favorites.AddRange(favoritesString.Split(';'));

            try
            {
                _audioFormat = (AudioFormats)Enum.Parse(typeof(AudioFormats), this.pluginConfig.ReadField("/APPCONFIG/AUDIOFORMAT"));
            }
            catch (Exception ex)
            {
                WriteLog("Unable to parse AudioFormat.", ex);
            }

            try
            {
                _clearCache = Boolean.Parse(this.pluginConfig.ReadField("/APPCONFIG/CLEARCACHE"));
            }
            catch (Exception ex)
            {
                WriteLog("Unable to parse ClearCache.", ex);
            }
        }
        public void RetrieveSongsAsync(string stationId, AudioFormats audioFormat)
        {
            try
            {
                WebClient client = new WebClient();
                client.Headers.Add("content-type", "text-xml");
                client.UploadDataCompleted += new UploadDataCompletedEventHandler(RetrieveSongs_UploadDataCompleted);
                Uri uri = new Uri(String.Format(BASE_URL_LID, _rid, _lid, "getFragment"));

                List<object> parameters = new List<object>();
                parameters.Add(GetTimestamp());
                parameters.Add(_authenticationToken);
                parameters.Add(stationId);
                parameters.Add("0"); //total listening time
                parameters.Add(String.Empty); //time since last session
                parameters.Add(String.Empty); //tracking code

                switch (audioFormat)
                {
                    case AudioFormats.AAC_PLUS:
                        parameters.Add("aacplus");
                        break;
                    case AudioFormats.MP3:
                        parameters.Add("mp3");
                        break;
                    case AudioFormats.MP3_HIFI:
                        parameters.Add("mp3-hifi");
                        break;
                }

                parameters.Add("0"); //delta listening time
                parameters.Add("0"); //listening timestamp

                string xml = GetXml("playlist.getFragment", parameters);
                string encryptedXml = EncryptionHelper.EncryptString(xml);
                client.UploadDataAsync(uri, "POST", System.Text.Encoding.ASCII.GetBytes(encryptedXml));
            }
            catch (Exception exception)
            {
                if (ExceptionReceived != null)
                    ExceptionReceived(this, new EventArgs<Exception>(exception));
            }
        }
示例#11
0
 public virtual IAudioSource createFromRaw(string name, string data, uint length, uint frequency, AudioFormats format) {
   IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_createFromRaw(swigCPtr, name, data, length, frequency, (int)format);
   IAudioSource ret = (cPtr == IntPtr.Zero) ? null : new IAudioSource(cPtr, false);
   return ret;
 }
示例#12
0
        public virtual IAudioSource createFromAudioBuffer(string name, AudioCaptureBuffer pBiffer, uint frequency, AudioFormats format)
        {
            IntPtr       cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_createFromAudioBuffer(swigCPtr, name, AudioCaptureBuffer.getCPtr(pBiffer), frequency, (int)format);
            IAudioSource ret  = (cPtr == IntPtr.Zero) ? null : new IAudioSource(cPtr, false);

            return(ret);
        }
示例#13
0
        public virtual IAudioSource createFromRaw(string name, string data, uint length, uint frequency, AudioFormats format)
        {
            IntPtr       cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_createFromRaw(swigCPtr, name, data, length, frequency, (int)format);
            IAudioSource ret  = (cPtr == IntPtr.Zero) ? null : new IAudioSource(cPtr, false);

            return(ret);
        }
示例#14
0
 public virtual bool initialize(string deviceName, uint frequency, AudioFormats format) {
   bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_initialize__SWIG_1(swigCPtr, deviceName, frequency, (int)format);
   return ret;
 }
示例#15
0
 public SYMMSettings(string downloadURL, string savePath, Actions action, Mode downloadMode = Mode.Single, bool checkDuplicate = true, AudioFormats audioFormat = AudioFormats.mp3, short audioBitrate = 192)
 {
     this.DownloadURL    = downloadURL;
     this.SavePath       = savePath;
     this.Action         = action;
     this.CheckDuplicate = checkDuplicate;
     this.AudioFormat    = audioFormat;
     this.AudioBitrate   = audioBitrate;
     this.DownloadMode   = downloadMode;
     this.UrlSpecs       = URLSpecs.ExamineURL(downloadURL);
 }
示例#16
0
        public virtual bool setFormat(AudioFormats format)
        {
            bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_setFormat(swigCPtr, (int)format);

            return(ret);
        }
示例#17
0
 public Parameter(AudioFormats value)
 {
     audioFormat = value;
 }
示例#18
0
 public virtual IAudioSource createFromAudioBuffer(string name, AudioCaptureBuffer pBiffer, uint frequency, AudioFormats format) {
   IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_createFromAudioBuffer(swigCPtr, name, AudioCaptureBuffer.getCPtr(pBiffer), frequency, (int)format);
   IAudioSource ret = (cPtr == IntPtr.Zero) ? null : new IAudioSource(cPtr, false);
   return ret;
 }
示例#19
0
 /// <summary>
 /// Initialize / set audio device properties.
 /// If not called, BonEngine will initialize with defaults.
 /// </summary>
 /// <param name="frequency">Audio frequency.</param>
 /// <param name="format">Audio format.</param>
 /// <param name="stereo">Support stereo?</param>
 /// <param name="audioChunkSize">Size of the chunks to break sound tracks into. Smaller values means more responsiveness, but also more CPU to play sounds.</param>
 public void SetAudioProperties(int frequency = 22050, AudioFormats format = AudioFormats.S16LSB, bool stereo = true, int audioChunkSize = 4096)
 {
     _BonEngineBind.BON_Sfx_SetAudioProperties(frequency, (int)format, stereo, audioChunkSize);
 }
示例#20
0
        static void Main()
        {
            //Some fancy text
            Console.WriteLine("cAudio 2.2.0 Tutorial 4: Audio Capture. C#\n");
            Console.WriteLine("Available Playback Devices:\n");

            //Setup the default frequency and duration
            UInt32 CAPTURE_FREQUENCY = 22050;
            UInt32 CAPTURE_DURATION  = 10;

            AudioFormats CAPTURE_FORMAT = AudioFormats.EAF_16BIT_MONO;

            String formatName;

            if (CAPTURE_FORMAT == AudioFormats.EAF_8BIT_MONO)
            {
                formatName = "8 Bit Mono";
            }
            else if (CAPTURE_FORMAT == AudioFormats.EAF_8BIT_STEREO)
            {
                formatName = "8 Bit Stereo";
            }
            else if (CAPTURE_FORMAT == AudioFormats.EAF_16BIT_MONO)
            {
                formatName = "16 Bit Mono";
            }
            else
            {
                formatName = "16 Bit Stereo";
            }

            //Create an audio manager with default settings
            IAudioManager audioMgr = cAudioCSharpWrapper.createAudioManager();
            //! The capture interface can be gotten at any time, and can even be used completely seperate from the manager
            // Also it is possible to have more than one capture interface at the same time, useful for recording from multiple sources
            IAudioCapture capture = cAudioCSharpWrapper.createAudioCapture(false);

            // ! Here we enumerate different devices
            IAudioDeviceList pAudioDeviceList = cAudioCSharpWrapper.createAudioDeviceList(cAudio.IDeviceType.DT_RECORDING);

            bool captureReady = pAudioDeviceList.isSupported();

            Console.WriteLine("Capturing Supported: " + captureReady + "\n");

            if (captureReady)
            {
                Console.WriteLine("Available Capture Devices: ");
                UInt32 deviceCount       = pAudioDeviceList.getDeviceCount();
                string defaultDeviceName = pAudioDeviceList.getDefaultDeviceName();
                for (UInt32 i = 0; i < deviceCount; ++i)
                {
                    string deviceName = pAudioDeviceList.getDeviceName(i);
                    if (deviceName.Equals(defaultDeviceName))
                    {
                        Console.WriteLine("" + i + "): " + deviceName + " [DEFAULT] ");
                    }
                    else
                    {
                        Console.WriteLine("" + i + "): " + deviceName);
                    }
                }
                Console.WriteLine("");
                Console.WriteLine("Choose a device by number: ");
                string deviceSelection = Console.ReadLine();
                uint   deviceSelect    = Convert.ToUInt32(deviceSelection);
                Console.WriteLine("\n");

                captureReady = capture.initialize(pAudioDeviceList.getDeviceName(deviceSelect), CAPTURE_FREQUENCY, CAPTURE_FORMAT);

                Console.WriteLine("Ready to capture audio: " + captureReady + "\n");

                UInt32 targetRecordSize = CAPTURE_FREQUENCY * CAPTURE_DURATION * capture.getSampleSize();

                Console.WriteLine("Capture Device: " + capture.getDeviceName() + ".");
                Console.WriteLine("Capture Frequency: " + CAPTURE_FREQUENCY + " hertz.");
                Console.WriteLine("Capture Duration: " + CAPTURE_DURATION + " seconds.");
                Console.WriteLine("Capture Format: " + formatName + ".");
                Console.WriteLine("Sample Size: " + capture.getSampleSize() + " bytes.");
                Console.WriteLine("Target size of audio: " + targetRecordSize + " bytes.");
                Console.WriteLine("");

                UInt32 currentsize = 0;
                Console.WriteLine("Starting capture...");
                if (capture.beginCapture())
                {
                    while (currentsize < targetRecordSize)
                    {
                        currentsize = capture.getCurrentCapturedAudioSize();

                        //Sleep for 1 ms to free some CPU
                        cAudioCSharpWrapper.cAudioSleep(1);
                    }
                }

                capture.stopCapture();
                Console.WriteLine("Capture stopped... \n");

                //Grab the total size again, ensures we get ALL the audio data
                //Not completely necessary, as starting a capture again will clear the old audio data
                currentsize = capture.getCurrentCapturedAudioSize();
                Console.WriteLine("Captured " + currentsize + " bytes of audio data. \n ");

                //Create a IAudio object and load a sound from a file
                var          buffer  = capture.getCapturedAudioBuffer();
                IAudioSource mysound = audioMgr.createFromAudioBuffer("sound1", buffer, CAPTURE_FREQUENCY, CAPTURE_FORMAT);
                buffer.Dispose();

                if (mysound != null)
                {
                    mysound.setVolume(0.5f);
                    mysound.play2d(false);

                    while (mysound.isPlaying())
                    {
                        cAudioCSharpWrapper.cAudioSleep(10);
                    }
                }
            }

            audioMgr.Dispose();

            Console.WriteLine(@"Press any key to quit ");
            Console.ReadLine();
        }
示例#21
0
        public virtual AudioFormats getFormat()
        {
            AudioFormats ret = (AudioFormats)cAudioCSharpWrapperPINVOKE.IAudioCapture_getFormat(swigCPtr);

            return(ret);
        }
示例#22
0
 internal List<string> GetWasapiUris(AudioFormats.Format format)
 {
     // TODO : res in parameter + remoteInterface !
     List<string> uris = new List<string>();
     foreach (var item in this.GetUPnPService().ParentDevice.LocalIPEndPoints)
     {
         if (item.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork && !item.ToString().StartsWith("127.0.0.1") && !item.ToString().StartsWith("169"))
         {
             uris.Add("http://" + item.ToString() + "/stream/swyh." + (format == AudioFormats.Format.Pcm ? "wav" : "mp3"));
         }
     }
     return uris;
 }
示例#23
0
        public virtual bool initialize(string deviceName, uint frequency, AudioFormats format)
        {
            bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_initialize__SWIG_1(swigCPtr, deviceName, frequency, (int)format);

            return(ret);
        }
示例#24
0
 public virtual bool setFormat(AudioFormats format) {
   bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_setFormat(swigCPtr, (int)format);
   return ret;
 }