예제 #1
0
 public Tag(ABFFIO.TagStruct tagStruct, float tagTimeMult)
 {
     lTagTime        = tagStruct.lTagTime;
     sComment        = tagStruct.sComment;
     nTagType        = tagStruct.nTagType;
     nVoiceTagNumber = tagStruct.nVoiceTagNumber;
     Time            = lTagTime * tagTimeMult;
 }
예제 #2
0
        /// <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);
        }
예제 #3
0
 private static extern bool ABF_ReadTags(Int32 nFile, ref AbfFileHeader pFH, UInt32 dwFirstTag, ref TagStruct pTagArray, UInt32 uNumTags, ref Int32 pnError);