private bool ParseHeader_1_7(TabStream s) { m_fileType = s.LE_ReadUInt8(); switch (m_fileType) { case FILETYPE_SONG: m_songData = new SongData(); m_songData.contentType = s.LE_ReadUInt8(); m_songData.title = s.ReadStringWithLength(); m_songData.artist = s.ReadStringWithLength(); m_songData.releaseType = s.LE_ReadUInt8(); switch (m_songData.releaseType) { case RELEASETYPE_PUBLIC_AUDIO: m_songData.audioData = new SongData.AudioData(); m_songData.audioData.type = s.LE_ReadUInt8(); m_songData.audioData.title = s.ReadStringWithLength(); m_songData.audioData.year = s.LE_ReadUInt16(); m_songData.audioData.live = s.LE_ReadUInt8(); break; case RELEASETYPE_PUBLIC_VIDEO: m_songData.videoData = new SongData.VideoData(); m_songData.videoData.title = s.ReadStringWithLength(); m_songData.videoData.live = s.LE_ReadUInt8(); break; case RELEASETYPE_BOOTLEG: m_songData.bootlegData = new SongData.BootlegData(); m_songData.bootlegData.title = s.ReadStringWithLength(); m_songData.bootlegData.month = s.LE_ReadUInt16(); m_songData.bootlegData.day = s.LE_ReadUInt16(); m_songData.bootlegData.year = s.LE_ReadUInt16(); break; } m_songData.authorType = s.LE_ReadUInt8(); if (m_songData.authorType == AUTHORTYPE_AUTHORKNOWN) { m_songData.authorData = new SongData.AuthorData(); m_songData.authorData.composer = s.ReadStringWithLength(); m_songData.authorData.lyricist = s.ReadStringWithLength(); } m_songData.arranger = s.ReadStringWithLength(); m_songData.guitarScoreTranscriber = s.ReadStringWithLength(); m_songData.bassScoreTranscriber = s.ReadStringWithLength(); m_songData.copyright = s.ReadStringWithLength(); m_songData.lyrics = s.ReadStringWithLength(); m_songData.guitarScoreNotes = s.ReadStringWithLength(); m_songData.bassScoreNotes = s.ReadStringWithLength(); break; case FILETYPE_LESSON: m_lessonData = new LessonData(); m_lessonData.title = s.ReadStringWithLength(); m_lessonData.subtitle = s.ReadStringWithLength(); m_lessonData.musicStyle = s.LE_ReadUInt16(); m_lessonData.level = s.LE_ReadUInt8(); m_lessonData.author = s.ReadStringWithLength(); m_lessonData.notes = s.ReadStringWithLength(); m_lessonData.copyright = s.ReadStringWithLength(); break; } return(true); }
private bool ParseHeader_1_7(TabStream s) { m_fileType = s.LE_ReadUInt8(); switch (m_fileType) { case FILETYPE_SONG: m_songData = new SongData(); m_songData.contentType = s.LE_ReadUInt8(); m_songData.title = s.ReadStringWithLength(); m_songData.artist = s.ReadStringWithLength(); m_songData.releaseType = s.LE_ReadUInt8(); switch (m_songData.releaseType) { case RELEASETYPE_PUBLIC_AUDIO: m_songData.audioData = new SongData.AudioData(); m_songData.audioData.type = s.LE_ReadUInt8(); m_songData.audioData.title = s.ReadStringWithLength(); m_songData.audioData.year = s.LE_ReadUInt16(); m_songData.audioData.live = s.LE_ReadUInt8(); break; case RELEASETYPE_PUBLIC_VIDEO: m_songData.videoData = new SongData.VideoData(); m_songData.videoData.title = s.ReadStringWithLength(); m_songData.videoData.live = s.LE_ReadUInt8(); break; case RELEASETYPE_BOOTLEG: m_songData.bootlegData = new SongData.BootlegData(); m_songData.bootlegData.title = s.ReadStringWithLength(); m_songData.bootlegData.month = s.LE_ReadUInt16(); m_songData.bootlegData.day = s.LE_ReadUInt16(); m_songData.bootlegData.year = s.LE_ReadUInt16(); break; } m_songData.authorType = s.LE_ReadUInt8(); if (m_songData.authorType == AUTHORTYPE_AUTHORKNOWN) { m_songData.authorData = new SongData.AuthorData(); m_songData.authorData.composer = s.ReadStringWithLength(); m_songData.authorData.lyricist = s.ReadStringWithLength(); } m_songData.arranger = s.ReadStringWithLength(); m_songData.guitarScoreTranscriber = s.ReadStringWithLength(); m_songData.bassScoreTranscriber = s.ReadStringWithLength(); m_songData.copyright = s.ReadStringWithLength(); m_songData.lyrics = s.ReadStringWithLength(); m_songData.guitarScoreNotes = s.ReadStringWithLength(); m_songData.bassScoreNotes = s.ReadStringWithLength(); break; case FILETYPE_LESSON: m_lessonData = new LessonData(); m_lessonData.title = s.ReadStringWithLength(); m_lessonData.subtitle = s.ReadStringWithLength(); m_lessonData.musicStyle = s.LE_ReadUInt16(); m_lessonData.level = s.LE_ReadUInt8(); m_lessonData.author = s.ReadStringWithLength(); m_lessonData.notes = s.ReadStringWithLength(); m_lessonData.copyright = s.ReadStringWithLength(); break; } return true; }
public static bool IsType(TabStream s) { s.Position = 0; return(s.ReadStringWithLength().StartsWith("FICHIER GUITAR PRO")); }
public static bool IsType(TabStream s) { s.Position = 0; return s.ReadStringWithLength().StartsWith("FICHIER GUITAR PRO"); }