コード例 #1
0
        public static WaveDataSection CreateDefault()
        {
            var v = default(WaveDataSection);

            v.DataSize = 0;
            HcaHelper.SetString(out v.DATA, "data");
            return(v);
        }
コード例 #2
0
        public static WaveNoteSection CreateDefault()
        {
            var v = default(WaveNoteSection);

            v.Name     = 0;
            v.NoteSize = 0;
            HcaHelper.SetString(out v.NOTE, "note");
            return(v);
        }
コード例 #3
0
        public static WaveRiffSection CreateDefault()
        {
            var v = default(WaveRiffSection);

            v.RiffSize         = 0;
            v.FmtSize          = 0x10;
            v.FmtType          = 0;
            v.FmtChannels      = 0;
            v.FmtSamplingRate  = 0;
            v.FmtSamplesPerSec = 0;
            v.FmtSamplingSize  = 0;
            v.FmtBitCount      = 0;
            HcaHelper.SetString(out v.RIFF, "RIFF");
            HcaHelper.SetString(out v.WAVE, "WAVE");
            HcaHelper.SetString(out v.FMT, "fmt ");
            return(v);
        }
コード例 #4
0
 public static void TranslateTables()
 {
     _decode1ValueSingle = new float[_decode1ValueUInt.Length];
     for (var i = 0; i < _decode1ValueSingle.Length; ++i)
     {
         _decode1ValueSingle[i] = HcaHelper.UInt32ToSingleBits(_decode1ValueUInt[i]);
     }
     _decode1ScaleSingle = new float[_decode1ScaleUInt.Length];
     for (var i = 0; i < _decode1ScaleSingle.Length; ++i)
     {
         _decode1ScaleSingle[i] = HcaHelper.UInt32ToSingleBits(_decode1ScaleUInt[i]);
     }
     _decode3ListSingle = new float[_decode3ListUInt[0].Length + _decode3ListUInt[1].Length];
     for (var i = 0; i < _decode3ListUInt[0].Length; ++i)
     {
         _decode3ListSingle[i] = HcaHelper.UInt32ToSingleBits(_decode3ListUInt[0][i]);
     }
     for (var i = 0; i < _decode3ListUInt[1].Length; ++i)
     {
         _decode3ListSingle[i + _decode3ListOffset] = HcaHelper.UInt32ToSingleBits(_decode3ListUInt[1][i]);
     }
     _decode4ListSingle = new float[_decode4ListUInt.Length];
     for (var i = 0; i < _decode4ListSingle.Length; ++i)
     {
         _decode4ListSingle[i] = HcaHelper.UInt32ToSingleBits(_decode4ListUInt[i]);
     }
     _decode5List1Single = new float[_decode5List1UInt.Length];
     for (var i = 0; i < _decode5List1Single.Length; ++i)
     {
         _decode5List1Single[i] = HcaHelper.UInt32ToSingleBits(_decode5List1UInt[i]);
     }
     _decode5List2Single = new float[_decode5List2UInt.Length];
     for (var i = 0; i < _decode5List2Single.Length; ++i)
     {
         _decode5List2Single[i] = HcaHelper.UInt32ToSingleBits(_decode5List2UInt[i]);
     }
     _decode5List3Single = new float[_decode5List3UInt.Length];
     for (var i = 0; i < _decode5List3Single.Length; ++i)
     {
         _decode5List3Single[i] = HcaHelper.UInt32ToSingleBits(_decode5List3UInt[i]);
     }
 }
コード例 #5
0
 public static void TranslateTables()
 {
     _decode1ValueSingle = new float[_decode1ValueUInt.Length];
     for (var i = 0; i < _decode1ValueSingle.Length; ++i)
     {
         _decode1ValueSingle[i] = HcaHelper.UInt32ToSingleBits(_decode1ValueUInt[i]);
     }
     _decode1ScaleSingle = new float[_decode1ScaleUInt.Length];
     for (var i = 0; i < _decode1ScaleSingle.Length; ++i)
     {
         _decode1ScaleSingle[i] = HcaHelper.UInt32ToSingleBits(_decode1ScaleUInt[i]);
     }
     _decode3ListSingle = new float[_decode3ListUInt.Length][];
     for (var i = 0; i < _decode3ListSingle.Length; ++i)
     {
         _decode3ListSingle[i] = new float[_decode3ListUInt[i].Length];
         for (var j = 0; j < _decode3ListSingle[i].Length; ++j)
         {
             _decode3ListSingle[i][j] = HcaHelper.UInt32ToSingleBits(_decode3ListUInt[i][j]);
         }
     }
     _decode4ListSingle = new float[_decode4ListUInt.Length];
     for (var i = 0; i < _decode4ListSingle.Length; ++i)
     {
         _decode4ListSingle[i] = HcaHelper.UInt32ToSingleBits(_decode4ListUInt[i]);
     }
     _decode5List1Single = new float[_decode5List1UInt.Length];
     for (var i = 0; i < _decode5List1Single.Length; ++i)
     {
         _decode5List1Single[i] = HcaHelper.UInt32ToSingleBits(_decode5List1UInt[i]);
     }
     _decode5List2Single = new float[_decode5List2UInt.Length];
     for (var i = 0; i < _decode5List2Single.Length; ++i)
     {
         _decode5List2Single[i] = HcaHelper.UInt32ToSingleBits(_decode5List2UInt[i]);
     }
     _decode5List3Single = new float[_decode5List3UInt.Length];
     for (var i = 0; i < _decode5List3Single.Length; ++i)
     {
         _decode5List3Single[i] = HcaHelper.UInt32ToSingleBits(_decode5List3UInt[i]);
     }
 }
コード例 #6
0
        public static WaveSampleSection CreateDefault()
        {
            var v = default(WaveSampleSection);

            v.SmplSize          = 0x3c;
            v.Manufacturer      = 0;
            v.Product           = 0;
            v.SamplePeriod      = 0;
            v.MidiUnityNote     = 0x3c;
            v.MidiPitchFraction = 0;
            v.SmpteFormat       = 0;
            v.SmpteOffset       = 0;
            v.SampleLoops       = 1;
            v.SamplerData       = 0x18;
            v.LoopIdentifier    = 0;
            v.LoopType          = 0;
            v.LoopStart         = 0;
            v.LoopEnd           = 0;
            v.LoopFraction      = 0;
            v.LoopPlayCount     = 0;
            HcaHelper.SetString(out v.SMPL, "smpl");
            return(v);
        }