public Tag(ABFFIO.TagStruct tagStruct, float tagTimeMult) { lTagTime = tagStruct.lTagTime; sComment = tagStruct.sComment; nTagType = tagStruct.nTagType; nVoiceTagNumber = tagStruct.nVoiceTagNumber; Time = lTagTime * tagTimeMult; }
/// <summary> /// Return tags in the ABF (or an empty array) /// </summary> public TagStruct[] ReadTags() { Int32 fileHandle = 0; Int32 errorCode = 0; TagStruct[] abfTags = new TagStruct[(UInt32)Header.lNumTagEntries]; for (uint i = 0; i < abfTags.Length; i++) { ABF_ReadTags(fileHandle, ref Header, i, ref abfTags[i], 1, ref errorCode); if (errorCode != 0) { throw new InvalidOperationException($"ABF_ReadTags() returned error {errorCode} ({(Error)errorCode})"); } } return(abfTags); }
private static extern bool ABF_ReadTags(Int32 nFile, ref AbfFileHeader pFH, UInt32 dwFirstTag, ref TagStruct pTagArray, UInt32 uNumTags, ref Int32 pnError);