/// <summary> /// Add a file to the LUT. /// </summary> /// <param name="in_fileDesc">File descriptor.</param> /// <param name="in_mapLanguages">LanguageNameString-LanguageID hash.</param> /// <returns>Returns false if file is missing.</returns> public bool Add(AK.Wwise.InfoFile.FileDescriptorType in_fileDesc, Dictionary <string, uint> in_mapLanguages) { if (in_fileDesc.Path.Length > 0) { string szFullPath = System.IO.Path.Combine(m_rootPath, in_fileDesc.Path); if (System.IO.File.Exists(szFullPath)) { // Set all fields (ID, file size and language), but leave starting // address (uBlock) to 0. In order to set this field, the offset // of the data section must be known, and LUTs must be all considered // globally. // The INFO file should not have 2 files that have same ID and same language. ushort uLanguageID = (ushort)in_mapLanguages[in_fileDesc.Language]; System.Diagnostics.Debug.Assert(!m_arFiles.Exists(delegate(IncludedFile in_searchedFile) { return(in_searchedFile.uFileID == in_fileDesc.Id && in_searchedFile.uLanguageID == uLanguageID); })); { // For file size: FileInfo fi = new FileInfo(szFullPath); // Block size: find least common multiple between desired global block size // and this file's minimum alignment requirement. m_arFiles.Add(new IncludedFile(in_fileDesc.Id, m_uDefaultBlockAlign, 0, (ulong)fi.Length, uLanguageID, szFullPath)); } return(true); } } return(false); }
public PackageItem(AK.Wwise.InfoFile.FileDescriptorType in_descriptor, ExternalSourceInfo in_externalSourceInfo) { Descriptor = in_descriptor; ExternalSourceInfo = in_externalSourceInfo; }
public ContentItemViewModel(AK.Wwise.InfoFile.FileDescriptorType fileDescriptor) { _fileDescriptor = fileDescriptor; _id = _fileDescriptor.Id; }