public WinFfMpegResampler(ITagService tagService, IExtendedAudioService audioService)
 {
     this.tagService   = tagService;
     this.audioService = audioService;
     InitializeComponent();
     Icon = Resources.Sound;
     currentProceesedFiles = 0;
     skipped = 0;
 }
 public WinFfMpegResampler(ITagService tagService, IExtendedAudioService audioService)
 {
     this.tagService = tagService;
     this.audioService = audioService;
     InitializeComponent();
     Icon = Resources.Sound;
     currentProceesedFiles = 0;
     skipped = 0;
 }
        public WinCheckHashBins(IFingerprintQueryBuilder queryBuilder, ITagService tagService, IModelService modelService, IExtendedAudioService audioService)
        {
            this.queryBuilder = queryBuilder;
            this.tagService = tagService;
            this.modelService = modelService;
            this.audioService = audioService;

            InitializeComponent();

            Icon = Resources.Sound;
            AddConnectionStringsToComboBox();

            _cmbAlgorithm.SelectedIndex = (int)hashAlgorithm;

            string[] items = Enum.GetNames(typeof(StrideType));

            _cmbStrideType.Items.AddRange(items.ToArray<object>());
            _cmbStrideType.SelectedIndex = 3;

            switch (_cmbAlgorithm.SelectedIndex)
            {
                case (int)HashAlgorithm.LSH:
                    _gbMinHash.Enabled = true;
                    _gbNeuralHasher.Enabled = false;
                    break;
                case (int)HashAlgorithm.NeuralHasher:
                    _gbMinHash.Enabled = false;
                    _gbNeuralHasher.Enabled = true;
                    break;
                case (int)HashAlgorithm.None:
                    _gbMinHash.Enabled = false;
                    _gbNeuralHasher.Enabled = false;
                    break;
            }

            _gbQueryMicrophoneBox.Enabled = audioService.IsRecordingSupported;
        }
Beispiel #4
0
        public WinCheckHashBins(IQueryCommandBuilder queryCommandBuilder, ITagService tagService, IModelService modelService, IExtendedAudioService audioService)
        {
            this.queryCommandBuilder = queryCommandBuilder;
            this.tagService = tagService;
            this.modelService = modelService;
            this.audioService = audioService;

            InitializeComponent();

            Icon = Resources.Sound;
            AddConnectionStringsToComboBox();

            _cmbAlgorithm.SelectedIndex = (int)hashAlgorithm;

            string[] items = Enum.GetNames(typeof(StrideType)); 

            _cmbStrideType.Items.AddRange(items.ToArray<object>());
            _cmbStrideType.SelectedIndex = 3;

            switch (_cmbAlgorithm.SelectedIndex)
            {
                case (int)HashAlgorithm.LSH:
                    _gbMinHash.Enabled = true;
                    _gbNeuralHasher.Enabled = false;
                    break;
                case (int)HashAlgorithm.NeuralHasher:
                    _gbMinHash.Enabled = false;
                    _gbNeuralHasher.Enabled = true;
                    break;
                case (int)HashAlgorithm.None:
                    _gbMinHash.Enabled = false;
                    _gbNeuralHasher.Enabled = false;
                    break;
            }

            _gbQueryMicrophoneBox.Enabled = audioService.IsRecordingSupported;
        }
Beispiel #5
0
 public WinBassResampler(IExtendedAudioService extendedAudioService)
 {
     this.extendedAudioService = extendedAudioService;
     InitializeComponent();
     Icon = Resources.Sound;
 }
 public WinBassResampler(IExtendedAudioService extendedAudioService)
 {
     this.extendedAudioService = extendedAudioService;
     InitializeComponent();
     Icon = Resources.Sound;
 }
        public RepositoryGateway()
        {
            #if TEST
            if (File.Exists("serialized.ss"))
            {
                using (Stream file = new FileStream("serialized.ss", FileMode.Open))
                {
                    BinaryFormatter formatter = new BinaryFormatter();
                    storage = (IStorage)formatter.Deserialize(file);
                }
            }
            else
            {
                storage = ServiceContainer.Kernel.Get<IStorage>(new ConstructorArgument("numberOfHashTables", NumberOfHashTables));
            }
            #else
            storage = ServiceContainer.Kernel.Get<IStorage>(new ConstructorArgument("numberOfHashTables", NumberOfHashTables));
            #endif

            audioService = ServiceContainer.Kernel.Get<IExtendedAudioService>();
            tagService = ServiceContainer.Kernel.Get<ITagService>();
            cts = new CancellationTokenSource();
            repository = new Repository(ServiceContainer.Kernel.Get<IFingerprintUnitBuilder>(), storage, ServiceContainer.Kernel.Get<ICombinedHashingAlgoritm>());
        }