Skip to content

Package com.mojang.blaze3d.audio

Part 1/1


Channel

  • Full name: com.mojang.blaze3d.audio.Channel
  • Package: com.mojang.blaze3d.audio
  • Source: clientOnlycom/mojang/blaze3d/audio/Channel.java
  • Type: class
  • Modifiers: public

com.mojang.blaze3d.audio.Channel#attachBufferStream(AudioStream)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:128
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ attachBufferStream ตาม implementation ของ Channel

ทำงานยังไง

แก้ state: stream, streamingBufferSize. เรียกต่อ: getFormat(), calculateBufferSize(), pumpBuffers().

Parameters

  • AudioStream audioStream

ตัวอย่างใช้งาน

Channel instance = ...;
AudioStream audioStream = ...;
instance.attachBufferStream(audioStream);

com.mojang.blaze3d.audio.Channel#attachStaticBuffer(SoundBuffer)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:124
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ attachStaticBuffer ตาม implementation ของ Channel

ทำงานยังไง

เรียกต่อ: getAlBuffer(), ifPresent(), alSourcei().

Parameters

  • SoundBuffer soundBuffer

ตัวอย่างใช้งาน

Channel instance = ...;
SoundBuffer soundBuffer = ...;
instance.attachStaticBuffer(soundBuffer);

com.mojang.blaze3d.audio.Channel#destroy()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:38
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ destroy ตาม implementation ของ Channel

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. แก้ state: stream. เรียกต่อ: compareAndSet(), alSourceStop(), checkALError(), close(), error(), removeProcessedBuffers(), alDeleteSources().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Channel instance = ...;
instance.destroy();

com.mojang.blaze3d.audio.Channel#disableAttenuation()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:109
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ disableAttenuation ตาม implementation ของ Channel

ทำงานยังไง

เรียกต่อ: alSourcei().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Channel instance = ...;
instance.disableAttenuation();

com.mojang.blaze3d.audio.Channel#linearAttenuation(float)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:113
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ linearAttenuation ตาม implementation ของ Channel

ทำงานยังไง

เรียกต่อ: alSourcei(), alSourcef().

Parameters

  • float f

ตัวอย่างใช้งาน

Channel instance = ...;
instance.linearAttenuation(0.0F);

com.mojang.blaze3d.audio.Channel#pause()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:66
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ pause ตาม implementation ของ Channel

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getState(), alSourcePause().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Channel instance = ...;
instance.pause();

com.mojang.blaze3d.audio.Channel#play()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:58
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ play ตาม implementation ของ Channel

ทำงานยังไง

เรียกต่อ: alSourcePlay().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Channel instance = ...;
instance.play();

com.mojang.blaze3d.audio.Channel#playing()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:85
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ playing ตาม implementation ของ Channel

ทำงานยังไง

เรียกต่อ: getState(). คืนค่า: this.getState() == 4114.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Channel instance = ...;
boolean result = instance.playing();

com.mojang.blaze3d.audio.Channel#setLooping(boolean)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:101
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Looping

ทำงานยังไง

เรียกต่อ: alSourcei().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

Channel instance = ...;
instance.setLooping(true);

com.mojang.blaze3d.audio.Channel#setPitch(float)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:97
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Pitch

ทำงานยังไง

เรียกต่อ: alSourcef().

Parameters

  • float f

ตัวอย่างใช้งาน

Channel instance = ...;
instance.setPitch(0.0F);

com.mojang.blaze3d.audio.Channel#setRelative(boolean)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:120
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Relative

ทำงานยังไง

เรียกต่อ: alSourcei().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

Channel instance = ...;
instance.setRelative(true);

com.mojang.blaze3d.audio.Channel#setSelfPosition(Vec3)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:93
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Self Position

ทำงานยังไง

เรียกต่อ: alSourcefv().

Parameters

  • Vec3 vec3

ตัวอย่างใช้งาน

Channel instance = ...;
Vec3 vec3 = ...;
instance.setSelfPosition(vec3);

com.mojang.blaze3d.audio.Channel#setVolume(float)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:105
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Volume

ทำงานยังไง

เรียกต่อ: alSourcef().

Parameters

  • float f

ตัวอย่างใช้งาน

Channel instance = ...;
instance.setVolume(0.0F);

com.mojang.blaze3d.audio.Channel#stop()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:78
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), alSourceStop(), checkALError().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Channel instance = ...;
instance.stop();

com.mojang.blaze3d.audio.Channel#stopped()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:89
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ stopped ตาม implementation ของ Channel

ทำงานยังไง

เรียกต่อ: getState(). คืนค่า: this.getState() == 4116.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Channel instance = ...;
boolean result = instance.stopped();

com.mojang.blaze3d.audio.Channel#unpause()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:72
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ unpause ตาม implementation ของ Channel

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getState(), alSourcePlay().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Channel instance = ...;
instance.unpause();

com.mojang.blaze3d.audio.Channel#updateStream()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Channel.java:154
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Stream

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: removeProcessedBuffers(), pumpBuffers().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Channel instance = ...;
instance.updateStream();

Library

  • Full name: com.mojang.blaze3d.audio.Library
  • Package: com.mojang.blaze3d.audio
  • Source: clientOnlycom/mojang/blaze3d/audio/Library.java
  • Type: class
  • Modifiers: public

com.mojang.blaze3d.audio.Library#acquireChannel(Library.Pool)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:233
  • Modifiers: public
  • Return: Channel

คืออะไร

ดำเนินการ acquireChannel ตาม implementation ของ Library

ทำงานยังไง

เรียกต่อ: acquire(). คืนค่า: (pool == Library.Pool.STREAMING ? this.streamingChannels : this.staticChannels).acquire().

Parameters

  • Library.Pool pool

ตัวอย่างใช้งาน

Library instance = ...;
Library.Pool pool = ...;
Channel result = instance.acquireChannel(pool);

com.mojang.blaze3d.audio.Library#cleanup()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:220
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ cleanup ตาม implementation ของ Library

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: alcDestroyContext(), alcCloseDevice().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Library instance = ...;
instance.cleanup();

com.mojang.blaze3d.audio.Library#getAvailableSoundDevices()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:255
  • Modifiers: public
  • Return: List<String>

คืออะไร

อ่านค่า Available Sound Devices

ทำงานยังไง

เรียกต่อ: getStringList(), emptyList(). คืนค่า: list == null ? Collections.emptyList() : list.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Library instance = ...;
List<String> result = instance.getAvailableSoundDevices();

com.mojang.blaze3d.audio.Library#getCurrentDeviceName()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:171
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Current Device Name

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: alcGetString(). คืนค่า: string.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Library instance = ...;
String result = instance.getCurrentDeviceName();

com.mojang.blaze3d.audio.Library#getDebugString()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:244
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Debug String

ทำงานยังไง

เรียกต่อ: format(), getUsedCount(), getMaxCount().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Library instance = ...;
String result = instance.getDebugString();

com.mojang.blaze3d.audio.Library#getDefaultDeviceName()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:161
  • Modifiers: public static
  • Return: String

คืออะไร

อ่านค่า Default Device Name

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: alcIsExtensionPresent(), getStringList(), alcGetString(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

String result = Library.getDefaultDeviceName();

com.mojang.blaze3d.audio.Library#getListener()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:229
  • Modifiers: public
  • Return: Listener

คืออะไร

อ่านค่า Listener

ทำงานยังไง

คืนค่า: this.listener.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Library instance = ...;
Listener result = instance.getListener();

com.mojang.blaze3d.audio.Library#hasDefaultDeviceChanged()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:184
  • Modifiers: public synchronized
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Default Device Changed

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: defaultDeviceName. เรียกต่อ: getDefaultDeviceName(), equals(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Library instance = ...;
boolean result = instance.hasDefaultDeviceChanged();

com.mojang.blaze3d.audio.Library#init(String,boolean)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:73
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ init ตาม implementation ของ Library

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. แก้ state: currentDevice, supportsDisconnections, context, staticChannels, streamingChannels. เรียกต่อ: openDeviceOrFallback(), createCapabilities(), checkALCError(), setHrtf(), stackPush(), callocInt(), put(), flip(). สร้างออบเจ็กต์: IllegalStateException, Library.CountingChannelPool.

Parameters

  • String string
  • boolean bl

ตัวอย่างใช้งาน

Library instance = ...;
instance.init("value", true);

com.mojang.blaze3d.audio.Library#isCurrentDeviceDisconnected()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:260
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Current Device Disconnected

ทำงานยังไง

เรียกต่อ: alcGetInteger(). คืนค่า: this.supportsDisconnections && ALC11.alcGetInteger(this.currentDevice, 787) == 0.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Library instance = ...;
boolean result = instance.isCurrentDeviceDisconnected();

com.mojang.blaze3d.audio.Library#Library()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:69
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Library ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: defaultDeviceName. เรียกต่อ: getDefaultDeviceName().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Library instance = new Library();

com.mojang.blaze3d.audio.Library#releaseChannel(Channel)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Library.java:238
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ releaseChannel ตาม implementation ของ Library

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: release(). สร้างออบเจ็กต์: IllegalStateException.

Parameters

  • Channel channel

ตัวอย่างใช้งาน

Library instance = ...;
Channel channel = ...;
instance.releaseChannel(channel);

Listener

  • Full name: com.mojang.blaze3d.audio.Listener
  • Package: com.mojang.blaze3d.audio
  • Source: clientOnlycom/mojang/blaze3d/audio/Listener.java
  • Type: class
  • Modifiers: public

com.mojang.blaze3d.audio.Listener#getGain()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Listener.java:27
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Gain

ทำงานยังไง

คืนค่า: this.gain.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Listener instance = ...;
float result = instance.getGain();

com.mojang.blaze3d.audio.Listener#getTransform()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Listener.java:35
  • Modifiers: public
  • Return: ListenerTransform

คืออะไร

อ่านค่า Transform

ทำงานยังไง

คืนค่า: this.transform.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Listener instance = ...;
ListenerTransform result = instance.getTransform();

com.mojang.blaze3d.audio.Listener#reset()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Listener.java:31
  • Modifiers: public
  • Return: void

คืออะไร

รีเซ็ต reset

ทำงานยังไง

เรียกต่อ: setTransform().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Listener instance = ...;
instance.reset();

com.mojang.blaze3d.audio.Listener#setGain(float)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Listener.java:22
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Gain

ทำงานยังไง

แก้ state: gain. เรียกต่อ: alListenerf().

Parameters

  • float f

ตัวอย่างใช้งาน

Listener instance = ...;
instance.setGain(0.0F);

com.mojang.blaze3d.audio.Listener#setTransform(ListenerTransform)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/Listener.java:13
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Transform

ทำงานยังไง

แก้ state: transform. เรียกต่อ: position(), forward(), up(), alListener3f(), alListenerfv(), x(), y(), z().

Parameters

  • ListenerTransform listenerTransform

ตัวอย่างใช้งาน

Listener instance = ...;
ListenerTransform listenerTransform = ...;
instance.setTransform(listenerTransform);

ListenerTransform

  • Full name: com.mojang.blaze3d.audio.ListenerTransform
  • Package: com.mojang.blaze3d.audio
  • Source: clientOnlycom/mojang/blaze3d/audio/ListenerTransform.java
  • Type: record
  • Modifiers: public

com.mojang.blaze3d.audio.ListenerTransform#right()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/ListenerTransform.java:11
  • Modifiers: public
  • Return: Vec3

คืออะไร

ดำเนินการ right ตาม implementation ของ ListenerTransform

ทำงานยังไง

เรียกต่อ: cross(). คืนค่า: this.forward.cross(this.up).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ListenerTransform instance = ...;
Vec3 result = instance.right();

SoundBuffer

  • Full name: com.mojang.blaze3d.audio.SoundBuffer
  • Package: com.mojang.blaze3d.audio
  • Source: clientOnlycom/mojang/blaze3d/audio/SoundBuffer.java
  • Type: class
  • Modifiers: public

com.mojang.blaze3d.audio.SoundBuffer#discardAlBuffer()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/SoundBuffer.java:50
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ discardAlBuffer ตาม implementation ของ SoundBuffer

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: hasAlBuffer. เรียกต่อ: alDeleteBuffers(), checkALError().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundBuffer instance = ...;
instance.discardAlBuffer();

com.mojang.blaze3d.audio.SoundBuffer#releaseAlBuffer()

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/SoundBuffer.java:61
  • Modifiers: public
  • Return: OptionalInt

คืออะไร

ดำเนินการ releaseAlBuffer ตาม implementation ของ SoundBuffer

ทำงานยังไง

แก้ state: hasAlBuffer. เรียกต่อ: getAlBuffer(). คืนค่า: optionalInt.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundBuffer instance = ...;
OptionalInt result = instance.releaseAlBuffer();

com.mojang.blaze3d.audio.SoundBuffer#SoundBuffer(ByteBuffer,AudioFormat)

  • Origin: clientOnly
  • Source: com/mojang/blaze3d/audio/SoundBuffer.java:19
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ SoundBuffer ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: data, format.

Parameters

  • ByteBuffer byteBuffer
  • AudioFormat audioFormat

ตัวอย่างใช้งาน

ByteBuffer byteBuffer = ...;
AudioFormat audioFormat = ...;
SoundBuffer instance = new SoundBuffer(byteBuffer, audioFormat);