JOAL v2.6.0-rc-20250712
JOAL, OpenAL® API Binding for Java™ (public API).
ALCdevice.java
Go to the documentation of this file.
1/* !---- DO NOT EDIT: This file autogenerated by com/jogamp/gluegen/JavaEmitter.java on Sat Jul 12 19:11:43 CEST 2025 ----! */
2/* !---- Java-Unit: [pkg com.jogamp.openal, cls ALCdevice], ../build/gensrc/classes/com/jogamp/openal/ALCdevice.java ----! */
3
4
5package com.jogamp.openal;
6
7import java.nio.*;
8import java.nio.charset.Charset;
9import java.nio.charset.StandardCharsets;
10
11import com.jogamp.gluegen.runtime.*;
12import com.jogamp.common.os.*;
13import com.jogamp.common.nio.*;
14import jogamp.common.os.MachineDataInfoRuntime;
15
16
17public class ALCdevice {
18
19 StructAccessor accessor;
20
21 private static final int mdIdx = MachineDataInfoRuntime.getStatic().ordinal();
22 private final MachineDataInfo md;
23
24 private static final int[] ALCdevice_size = new int[] { 0 /* ARM_MIPS_32 */, 0 /* X86_32_UNIX */, 0 /* X86_32_ANDROID */, 0 /* X86_32_MACOS */, 0 /* PPC_32_UNIX */, 0 /* SPARC_32_SUNOS */, 0 /* X86_32_WINDOWS */, 0 /* LP64_UNIX */, 0 /* X86_64_WINDOWS */, 0 /* ARM64_IOS */ };
25
26 /** Returns true if this generated implementation uses native code, otherwise false. */
27 public static boolean usesNativeCode() {
28 return false;
29 }
30
31 /** Returns the aligned total size of a native instance. */
32 public static int size() {
33 return ALCdevice_size[mdIdx];
34 }
35
36 /** Returns a new instance with all bytes set to zero. */
37 public static ALCdevice create() {
38 return create(Buffers.newDirectByteBuffer(size()));
39 }
40
41 /** Returns a new instance using the given ByteBuffer having at least {#link size()} bytes capacity. The ByteBuffer will be {@link ByteBuffer#rewind()} and native-order set. */
42 public static ALCdevice create(java.nio.ByteBuffer buf) {
43 return new ALCdevice(buf);
44 }
45
46 /** Returns new instance dereferencing ByteBuffer at given native address `addr` with size {@link #size()}. */
47 public static ALCdevice derefPointer(final long addr) {
48 return create( ElementBuffer.derefPointer(size(), addr, 1).getByteBuffer() );
49 }
50
51 ALCdevice(java.nio.ByteBuffer buf) {
52 md = MachineDataInfo.StaticConfig.values()[mdIdx].md;
53 accessor = new StructAccessor(buf);
54 }
55
56 /** Return the underlying native direct ByteBuffer */
57 public final java.nio.ByteBuffer getBuffer() {
58 return accessor.getBuffer();
59 }
60
61 /** Returns the native address of the underlying native ByteBuffer {@link #getBuffer()} */
62 public final long getDirectBufferAddress() {
63 return accessor.getDirectBufferAddress();
64 }
65
66}
static ALCdevice create()
Returns a new instance with all bytes set to zero.
Definition: ALCdevice.java:37
static boolean usesNativeCode()
Returns true if this generated implementation uses native code, otherwise false.
Definition: ALCdevice.java:27
static int size()
Returns the aligned total size of a native instance.
Definition: ALCdevice.java:32
final java.nio.ByteBuffer getBuffer()
Return the underlying native direct ByteBuffer.
Definition: ALCdevice.java:57
static ALCdevice create(java.nio.ByteBuffer buf)
Returns a new instance using the given ByteBuffer having at least {#link size()} bytes capacity.
Definition: ALCdevice.java:42
final long getDirectBufferAddress()
Returns the native address of the underlying native ByteBuffer getBuffer().
Definition: ALCdevice.java:62
static ALCdevice derefPointer(final long addr)
Returns new instance dereferencing ByteBuffer at given native address addr with size size().
Definition: ALCdevice.java:47