AcoustID.ChromaContext.Start C# (CSharp) Method

Start() public method

Restart the computation of a fingerprint with a new audio stream
public Start ( int sample_rate, int num_channels ) : bool
sample_rate int sample rate of the audio stream (in Hz)
num_channels int numbers of channels in the audio stream (1 or 2)
return bool
        public bool Start(int sample_rate, int num_channels)
        {
            return fingerprinter.Start(sample_rate, num_channels);
        }

Usage Example

Ejemplo n.º 1
0
        private void ProcessFile(string file)
        {
            if (File.Exists(file))
            {
                if (decoder.Ready)
                {
                    //btnOpen.Enabled = false;
                    btnFingerPrint.Enabled = false;
                    btnRequest.Enabled = false;

                    Task.Factory.StartNew(() =>
                    {
                        Stopwatch stopwatch = new Stopwatch();
                        stopwatch.Start();

                        ChromaContext context = new ChromaContext();
                        context.Start(decoder.SampleRate, decoder.Channels);
                        decoder.Decode(context.Consumer, 120);
                        context.Finish();

                        stopwatch.Stop();

                        ProcessFileCallback(context.GetFingerprint(), stopwatch.ElapsedMilliseconds);
                    });
                }
            }
        }
All Usage Examples Of AcoustID.ChromaContext::Start