private static void ReadCue(BinaryReader reader, INode parent, ICollection<INode> container)
        {
            var approved = reader.ReadBoolean();
            var looped = reader.ReadBoolean();
            var name = reader.ReadString();
            var pan = reader.ReadSingle();
            var pitch = reader.ReadSingle();
            var radius = reader.ReadSingle();
            var volume = reader.ReadSingle();
            var centerPointX = reader.ReadDouble();
            var centerPointY = reader.ReadDouble();
            var definedCenterX = reader.ReadDouble();
            var definedCenterY = reader.ReadDouble();
            var cuePlaybackMode = (CuePlaybackMode) reader.ReadInt32();

            // Add parent first
            var cue = new Cue
            {
                Parent = parent
            };
            container.Add(cue);

            cue.Approved = approved;
            cue.Looped = looped;
            cue.Name = name;
            cue.Pan = pan;
            cue.Pitch = pitch;
            cue.Radius = radius;
            cue.Volume = volume;
            cue.CenterPoint = new Point(centerPointX, centerPointY);
            cue.DefinedCenter = new Point(definedCenterX, definedCenterY);
            cue.CuePlaybackMode = cuePlaybackMode;

            var count = reader.ReadInt32();
            for (var i = 0; i < count; i++)
            {
                ReadSound(reader, cue);
            }
        }
Example #2
0
 public void ExecuteNewCueCommand(object o)
 {
     var cue = new Cue();
     AddChild(cue);
 }