Ejemplo n.º 1
0
        public static void EncodeWAVtoSEW(string file, int version, int loopStart, int loopEnd)
        {
            using (var br = new BinaryReaderX(File.OpenRead(file)))
            {
                var sew = new SEW();
                var wav = new WAV(file);

                var decodedData = wav.GetAudioData();

                sew.Create(Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + ".sew"), decodedData, wav.ChannelCount, wav.SampleRate, loopStart, loopEnd);
            }
        }
Ejemplo n.º 2
0
        public static void DecodeSEWtoWAV(string file)
        {
            using (var br = new BinaryReaderX(File.OpenRead(file)))
            {
                var sew = new SEW(file);
                var wav = new WAV();

                sew.PrintMeta();
                var decodedData = sew.Decode();

                wav.Create(Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + ".wav"), decodedData, sew.ChannelCount, sew.SampleRate);
            }
        }