Exemple #1
0
        public override void PrintSpecificMetadata(object metadata, StringBuilder builder)
        {
            var bcwav = metadata as BxstmStructure;

            if (bcwav == null)
            {
                throw new InvalidDataException("Could not parse file metadata.");
            }

            GcAdpcm.PrintAdpcmMetadata(bcwav.ChannelInfo.Channels, builder);
        }
Exemple #2
0
        public override void PrintSpecificMetadata(object structure, StringBuilder builder)
        {
            var genhStructure = structure as GenhStructure;

            if (genhStructure == null)
            {
                throw new InvalidDataException("Could not parse file metadata.");
            }

            GcAdpcm.PrintAdpcmMetadata(genhStructure.Channels, builder);
        }
Exemple #3
0
        public override void PrintSpecificMetadata(object metadata, StringBuilder builder)
        {
            var brwav = metadata as BrwavStructure;

            if (brwav == null)
            {
                throw new InvalidDataException("Could not parse file metadata.");
            }

            List <GcAdpcmChannelInfo> channels = brwav.WaveInfo.Channels.Select(x => x.AdpcmInfo).ToList();

            GcAdpcm.PrintAdpcmMetadata(channels, builder, brwav.WaveInfo.Looping);
        }
Exemple #4
0
        public override void PrintSpecificMetadata(object structure, StringBuilder builder)
        {
            var hps = structure as HpsStructure;

            if (hps == null)
            {
                throw new InvalidDataException("Could not parse file metadata.");
            }

            builder.AppendLine();

            builder.AppendLine($"Max block size: 0x{hps.Channels.First().MaxBlockSize:X}");

            GcAdpcm.PrintAdpcmMetadata(hps.Channels.Cast <GcAdpcmChannelInfo>().ToList(), builder, printLoopInfo: false);
        }
Exemple #5
0
        public override void PrintSpecificMetadata(object structure, StringBuilder builder)
        {
            var idsp = structure as IdspStructure;

            if (idsp == null)
            {
                throw new InvalidDataException("Could not parse file metadata.");
            }

            builder.AppendLine();

            builder.AppendLine($"Interleave size: 0x{idsp.InterleaveSize:X}");
            builder.AppendLine($"Audio data size: 0x{idsp.AudioDataLength:X}");

            GcAdpcm.PrintAdpcmMetadata(idsp.Channels.Cast <GcAdpcmChannelInfo>().ToList(), builder);
        }
Exemple #6
0
        public override void PrintSpecificMetadata(object structure, StringBuilder builder)
        {
            if (!(structure is McAdpcmStructure McAdpcm))
            {
                throw new InvalidDataException("Could not parse file metadata.");
            }

            builder.AppendLine();

            builder.AppendLine($"Nibble Count: {McAdpcm.NibbleCount}");
            builder.AppendLine($"Start Address: 0x{McAdpcm.StartAddress:X8}");
            builder.AppendLine($"End Address: 0x{McAdpcm.EndAddress:X8}");
            builder.AppendLine($"Current Address: 0x{McAdpcm.CurrentAddress:X8}");

            GcAdpcm.PrintAdpcmMetadata(McAdpcm.Channels, builder);
        }
Exemple #7
0
        public override void PrintSpecificMetadata(object structure, StringBuilder builder)
        {
            var dsp = structure as DspStructure;

            if (dsp == null)
            {
                throw new InvalidDataException("Could not parse file metadata.");
            }

            builder.AppendLine();

            builder.AppendLine($"Nibble Count: {dsp.NibbleCount}");
            builder.AppendLine($"Start Address: 0x{dsp.StartAddress:X8}");
            builder.AppendLine($"End Address: 0x{dsp.EndAddress:X8}");
            builder.AppendLine($"Current Address: 0x{dsp.CurrentAddress:X8}");

            GcAdpcm.PrintAdpcmMetadata(dsp.Channels, builder);
        }
Exemple #8
0
        public static void PrintSpecificMetadata(object structure, StringBuilder builder)
        {
            var bxstm = structure as BxstmStructure;

            if (bxstm == null)
            {
                throw new InvalidDataException("Could not parse file metadata.");
            }
            StreamInfo info = bxstm.StreamInfo;

            builder.AppendLine();

            int calculatedSamples = (info.InterleaveCount - 1) * info.SamplesPerInterleave +
                                    GcAdpcmMath.ByteCountToSampleCount(info.LastBlockSizeWithoutPadding);

            builder.AppendLine($"Interleave Count: {info.InterleaveCount}");
            builder.AppendLine($"Interleave Size: 0x{info.InterleaveSize:X}");
            builder.AppendLine($"Samples per interleave: {info.SamplesPerInterleave}");
            builder.AppendLine($"Last interleave size without padding: 0x{info.LastBlockSizeWithoutPadding:X}");
            builder.AppendLine($"Last interleave size: 0x{info.LastBlockSize:X}");
            builder.AppendLine($"Samples in last interleave block: {info.LastBlockSamples}");
            builder.AppendLine($"Sample count from data size: {calculatedSamples}");
            builder.AppendLine();

            builder.AppendLine($"Samples per seek table entry: {info.SamplesPerSeekTableEntry}");

            for (int i = 0; i < bxstm.TrackInfo?.Tracks.Count; i++)
            {
                builder.AppendLine();
                builder.AppendLine($"Track {i}");
                builder.AppendLine(new string('-', 25));
                PrintTrackMetadata(bxstm.TrackInfo?.Tracks[i], builder);
            }

            if (info.Codec != NwCodec.GcAdpcm)
            {
                return;
            }
            GcAdpcm.PrintAdpcmMetadata(bxstm.ChannelInfo.Channels, builder);
        }