Ejemplo n.º 1
0
        public byte[] getData()
        {
            var       ms = new MemoryStream();
            FileWrite fr = new FileWrite(ms);

            fr._file.Write(_sound_structure.getData().ToCharArray());
            fr._file.Write(_children);
            foreach (uint id in _child_ids)
            {
                fr._file.Write(id);
            }

            fr._file.Write(_unk_double_1);
            fr._file.Write(_unk_field64_1);
            fr._file.Write(_tempo);
            fr._file.Write(_time_sig1);
            fr._file.Write(_time_sig2);
            fr._file.Write(_unk_field32_1);
            fr._file.Write(_unk_field8_1);
            fr._file.Write(_time_length);
            fr._file.Write(_unk_field32_2);
            fr._file.Write(_unk_field32_3);
            fr._file.Write(_unk_field64_2);
            fr._file.Write(_unk_field32_4);
            fr._file.Write(_unk_field32_5);
            fr._file.Write(_time_length_next);
            fr._file.Write(_unk_field32_6);

            if (_unk_data != null)
            {
                fr._file.Write(_unk_data);
            }

            byte[] result = ms.ToArray();
            fr._file.Close();

            return(result);
        }
Ejemplo n.º 2
0
        public byte[] getData()
        {
            var       ms = new MemoryStream();
            FileWrite fr = new FileWrite(ms);

            fr._file.Write(_sound_structure.getData());
            fr._file.Write(_segments);
            foreach (uint id in _segment_ids)
            {
                fr._file.Write(id);
            }
            fr._file.Write(_unk_double_1);
            fr._file.Write(_unk_field64_1);
            fr._file.Write(_tempo);
            fr._file.Write(_time_sig1);
            fr._file.Write(_time_sig2);
            fr._file.Write(_unk_field8_1);
            fr._file.Write(_transition_count);

            foreach (MusicPlaylistObject_Transition mt in _transitions)
            {
                fr._file.Write(mt._source_id);
                fr._file.Write(mt._dest_id);
                fr._file.Write(mt._source_fadeout);
                fr._file.Write(mt._source_shape_curve_fadeout);
                fr._file.Write(mt._source_fadeout_offset);
                fr._file.Write(mt._unk_field32_1);
                fr._file.Write(mt._unk_field32_2);
                fr._file.Write(mt._unk_field32_3);
                fr._file.Write(mt._src_type);
                fr._file.Write(mt._dest_fadein);
                fr._file.Write(mt._dest_shape_curve_fadein);
                fr._file.Write(mt._dest_fadein_offset);
                fr._file.Write(mt._unk_field32_4);
                fr._file.Write(mt._unk_field32_5);
                fr._file.Write(mt._unk_field16_1);
                fr._file.Write(mt._dest_type);
                fr._file.Write(mt._unk_field8_1);
                fr._file.Write(mt._has_segment);
                fr._file.Write(mt._trans_segment_id);
                fr._file.Write(mt._trans_fadein);
                fr._file.Write(mt._trans_shape_curve_fadein);
                fr._file.Write(mt._trans_fadein_offset);
                fr._file.Write(mt._trans_fadeout);
                fr._file.Write(mt._trans_shape_curve_fadeout);
                fr._file.Write(mt._trans_fadeout_offset);
                fr._file.Write(mt._trans_fadein_type);
                fr._file.Write(mt._trans_fadeout_type);
            }

            fr._file.Write(_playlist_elements_count);

            foreach (MusicPlaylistObject_PlaylistElement mp in _playlist_elements)
            {
                fr._file.Write(mp._music_segment_id);
                fr._file.Write(mp._id);
                fr._file.Write(mp._child_elements);
                fr._file.Write(mp._playlist_type);
                fr._file.Write(mp._loop_count);
                fr._file.Write(mp._weight);
                fr._file.Write(mp._times_in_row);
                fr._file.Write(mp._unk_field8_1);
                fr._file.Write(mp._random_type);
            }

            byte[] result = ms.ToArray();
            fr._file.Close();

            return(result);
        }