Esempio n. 1
0
 private void InitializeFields()
 {
     outputFiles           = new OutputFileController();
     artistInputLabel.Text = "";
     titleInputLabel.Text  = "";
     lengthInputLabel.Text = "";
 }
Esempio n. 2
0
        public Encoder(MainForm mainForm, OutputFileController outputFiles)
        {
            string inputFile = mainForm.sourceFilePathTextBox.Text;

            for (int i = 0; i < outputFiles.CountOfSoundFiles; i++)
            {
                outputFiles.GoToIndex(i);
                var tag = outputFiles.TagInfo;
                if (string.IsNullOrEmpty(tag.track))
                {
                    tag.track = (i + 1).ToString();
                }
                var resp = BaseEncoder.EncodeFile(
                    inputFile: inputFile,
                    outputFile: mainForm.destinationFilePathTextBox.Text + outputFiles.GetFileName() + ".mp3",
                    encoder: new EncoderLAME(0)
                {
                    LAME_UseVBR = true, TAGs = tag
                },
                    proc: new BaseEncoder.ENCODEFILEPROC(mainForm.FileEncodingNotification),
                    overwriteOutput: true,
                    deleteInput: false,
                    updateTags: false,
                    fromPos: outputFiles.GetStartTime() + 0.0f,
                    toPos: outputFiles.GetEndTime() + 0.0f
                    );
                mainForm.ColorDataGrid(i);
            }
        }