示例#1
0
 public static bool ImportWAVSample(int index, string fullPath)
 {
     try
     {
         byte[] sample = (byte[])Do.Import(new byte[1], fullPath);
         BRRSamples[index].Sample = BRR.Encode(sample);
     }
     catch
     {
         MessageBox.Show("Error encoding .wav file.",
                         "LAZY SHELL", MessageBoxButtons.OK, MessageBoxIcon.Stop);
         return(false);
     }
     return(true);
 }
示例#2
0
        public static bool ImportWAVSamples(string fullPath)
        {
            byte[][] samples = new byte[BRRSamples.Length][];
            try
            {
                Do.Import(samples, fullPath + "\\" + "sampleWAV", "WAV SAMPLE", true);
            }
            catch
            {
                MessageBox.Show("Error encoding .wav file(s).",
                                "LAZY SHELL", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return(false);
            }
            int i = 0;

            foreach (var sample in BRRSamples)
            {
                sample.Sample = BRR.Encode(samples[i++]);
            }
            //
            return(true);
        }