Ejemplo n.º 1
0
        public void Convert(int LoopSt, int LoopEn, bool Loop, string Out)
        {
            if (File.Exists(Out))
            {
                File.Delete(Out);
            }

            FileStream Stream = new FileStream(Out, FileMode.CreateNew);

            VGAudio.Containers.NintendoWare.BrstmWriter Writer = new VGAudio.Containers.NintendoWare.BrstmWriter();

            Writer.WriteToStream(Audio.AudioFormat.WithLoop(Loop, LoopSt, LoopEn == 0 ? Audio.AudioFormat.SampleCount : LoopEn), Stream, Audio.Configuration);
            Stream.Close();
        }
Ejemplo n.º 2
0
        public void Convert(int LoopSt, int LoopEn, bool Loop, string Out)
        {
            if (File.Exists(Out))
            {
                File.Delete(Out);
            }

            FileStream Stream = new FileStream(Out, FileMode.CreateNew);

            if (OutType == VGAudio.Containers.NintendoWare.NwTarget.Revolution)
            {
                VGAudio.Containers.NintendoWare.BrstmWriter brWriter = new VGAudio.Containers.NintendoWare.BrstmWriter();
                brWriter.Configuration.Version = new VGAudio.Containers.NintendoWare.NwVersion((byte)VerA.Value, (byte)VerB.Value, (byte)VerC.Value, (byte)VerD.Value);
                brWriter.WriteToStream(Audio.AudioFormat.WithLoop(Loop, LoopSt, LoopEn == 0 ? Audio.AudioFormat.SampleCount : LoopEn), Stream, Audio.Configuration);
            }
            else
            {
                VGAudio.Containers.NintendoWare.BCFstmWriter fcWriter = new VGAudio.Containers.NintendoWare.BCFstmWriter(OutType);
                fcWriter.Configuration.Version = new VGAudio.Containers.NintendoWare.NwVersion((byte)VerA.Value, (byte)VerB.Value, (byte)VerC.Value, (byte)VerD.Value);
                fcWriter.WriteToStream(Audio.AudioFormat.WithLoop(Loop, LoopSt, LoopEn == 0 ? Audio.AudioFormat.SampleCount : LoopEn), Stream, Audio.Configuration);
            }

            Stream.Close();
        }