@Environment(value=CLIENT) public class Sound extends Object implements SoundContainer<Sound>
Modifier and Type | Class and Description |
---|---|
static class |
Sound.RegistrationType |
Modifier and Type | Field and Description |
---|---|
private int |
attenuation |
private Identifier |
id |
private float |
pitch |
private boolean |
preload |
private Sound.RegistrationType |
registrationType |
private boolean |
stream |
private float |
volume |
private int |
weight |
Constructor and Description |
---|
Sound(String id,
float volume,
float pitch,
int weight,
Sound.RegistrationType registrationType,
boolean stream,
boolean preload,
int attenuation) |
Modifier and Type | Method and Description |
---|---|
int |
getAttenuation() |
Identifier |
getIdentifier() |
Identifier |
getLocation() |
float |
getPitch() |
Sound.RegistrationType |
getRegistrationType() |
Sound |
getSound() |
float |
getVolume() |
int |
getWeight() |
boolean |
isPreloaded() |
boolean |
isStreamed() |
void |
preload(SoundSystem soundSystem) |
String |
toString() |
private final Identifier id
private final float volume
private final float pitch
private final int weight
private final Sound.RegistrationType registrationType
private final boolean stream
private final boolean preload
private final int attenuation
public Sound(String id, float volume, float pitch, int weight, Sound.RegistrationType registrationType, boolean stream, boolean preload, int attenuation)
public Identifier getIdentifier()
public Identifier getLocation()
public float getVolume()
public float getPitch()
public int getWeight()
getWeight
in interface SoundContainer<Sound>
public Sound getSound()
getSound
in interface SoundContainer<Sound>
public void preload(SoundSystem soundSystem)
preload
in interface SoundContainer<Sound>
public Sound.RegistrationType getRegistrationType()
public boolean isStreamed()
public boolean isPreloaded()
public int getAttenuation()