-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a312b2c
commit 8e7dbef
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/org/sheinbergon/aac/jna/structure/LibInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.sheinbergon.aac.jna.structure; | ||
|
||
import com.sun.jna.Structure; | ||
import org.sheinbergon.aac.jna.util.JNASupport; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Maps to LIB_INFO struct. | ||
* | ||
* @see <a href="https://github.com/mstorsjo/fdk-aac/blob/v2.0.2/libSYS/include/FDK_audio.h">fdk-aac/libSYS/include/FDK_audio.h</a> | ||
*/ | ||
@SuppressWarnings({"JavadocVariable", "VisibilityModifier", "MemberName"}) | ||
public final class LibInfo extends Structure { | ||
|
||
private static final int VERSION_STRING_SIZE = 32; | ||
|
||
private static final List<String> FIELD_ORDER = JNASupport.structureFieldOrder(LibInfo.class); | ||
|
||
/** | ||
* Library Info mapping. | ||
*/ | ||
public LibInfo() { | ||
setAlignType(Structure.ALIGN_NONE); // Make sure field size alignments are as expected | ||
read(); // Read once after initialize from provided pointer | ||
} | ||
|
||
public String title; | ||
public String build_date; | ||
public String build_time; | ||
public int module_id; | ||
public int version; | ||
public int flags; | ||
public byte[] versionStr = new byte[VERSION_STRING_SIZE]; | ||
|
||
@Override | ||
protected List<String> getFieldOrder() { | ||
return FIELD_ORDER; | ||
} | ||
} |