Beispiel #1
0
    private static void PrintClipInfo(cHouClip clip, TextWriter tw)
    {
        tw.WriteLine("FPS: {0}", clip.mRate);
        int nfrm = clip.mFramesNum;
        int ntrk = clip.mTracksNum;

        tw.WriteLine("#frames = {0}, #tracks = {1}", nfrm, ntrk);
        for (int i = 0; i < ntrk; ++i)
        {
            cHouClip.cTrack trk = clip.mTracks[i];
            tw.WriteLine("[{0:D2}]: {1}, {2}, range=({3}, {4})", i, trk.ShortName, trk.ChannelName, trk.mMinVal, trk.mMaxVal);
        }
    }
Beispiel #2
0
    public void WriteLooped(TextWriter tw)
    {
        int nfrm = mFramesNum;
        int ntrk = mTracksNum;

        tw.WriteLine(@"{");
        tw.WriteLine("   rate = {0}", mRate);
        tw.WriteLine("   start = {0}", mStart - 1);
        tw.WriteLine("   tracklength = {0}", nfrm + 1);
        tw.WriteLine("   tracks = {0}", ntrk);
        for (int i = 0; i < mTracksNum; ++i)
        {
            cHouClip.cTrack trk = mTracks[i];
            tw.WriteLine(@"   {");
            tw.WriteLine("      name = {0}", trk.mName);
            tw.Write("      data =");
            for (int j = 0; j < nfrm; ++j)
            {
                tw.Write(" {0}", trk.mData[j]);
            }
            if (trk.ShortName == "n_Move")
            {
                if (trk.ChannelName == "tz" && nfrm > 1)
                {
                    tw.Write(" {0}", trk.mData[nfrm - 1] + (trk.mData[1] - trk.mData[0]));
                }
                else
                {
                    tw.Write(" {0}", trk.mData[0]);
                }
            }
            else
            {
                tw.Write(" {0}", trk.mData[0]);
            }
            tw.WriteLine();
            tw.WriteLine(@"   }");
        }
        tw.WriteLine(@"}");
    }