示例#1
0
        public static void Save(string newName, WaveScanner ws, int overhead, bool createLogs)
        {
            List <splitter> chains  = OTSplitter.GetChains(ws.NumFiles, overhead);
            int             chain_n = 1;

            foreach (splitter chain in chains)
            {
                WavCollection samples = ws.GetSamples(chain);
                Wav           total   = samples.GetChain();

                for (int k = 0; k < chain.fillers; k++)
                {
                    total.CatSilence(samples.MaxDuration());
                }

                int    tot = chain.chainLen + chain.fillers;
                string wavName, logName;
                mkNames(newName, tot, chain_n, out wavName, out logName);

                total.Save(wavName);
                if (createLogs)
                {
                    saveLog(logName, chain.fillers, samples);
                }
                chain_n++;
            }
        }
示例#2
0
        public static List <splitter> GetChains(int numSamples, int overhead)
        {
            OTSplitter      instance = new OTSplitter();
            int             offset   = 0;
            List <splitter> rv       = instance.mkChain(numSamples, overhead);

            foreach (splitter t in rv)
            {
                t.chainOffset = offset;
                offset       += t.chainLen;
            }
            return(rv);
        }