@NoOffset @Properties(inherit=ale.class) public class Sound extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
Sound(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
_close()
Should be called to close the sound device.
|
void |
adjustCycleCounter(int amount)
The system cycle counter is being adjusting by the specified amount.
|
void |
adjustVolume(byte direction)
Adjusts the volume of the sound device based on the given direction.
|
void |
initialize()
Initializes the sound device.
|
boolean |
isSuccessfullyInitialized()
Return true iff the sound device was successfully initialized.
|
boolean |
load(Deserializer in)
Loads the current state of this device from the given Deserializer.
|
void |
mute(boolean state)
Set the mute state of the sound object.
|
void |
recordNextFrame()
Tells the sound engine to record one frame's worth of sound.
|
void |
reset()
Reset the sound device.
|
boolean |
save(Serializer out)
Saves the current state of this device to the given Serializer.
|
void |
set(short addr,
byte value,
int cycle)
Sets the sound register to a given value.
|
void |
setChannels(int channels)
Sets the number of channels (mono or stereo sound).
|
void |
setEnabled(boolean enable)
Enables/disables the sound subsystem.
|
void |
setFrameRate(int framerate)
Sets the display framerate.
|
void |
setVolume(int percent)
Sets the volume of the sound device to the specified level.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, getPointer, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, offsetof, parseBytes, physicalBytes, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic Sound(Pointer p)
Pointer.Pointer(Pointer).public void setEnabled(@Cast(value="bool") boolean enable)
enable - Either true or false, to enable or disable the sound systempublic void adjustCycleCounter(@Cast(value="Int32") int amount)
amount - The amount the cycle counter is being adjusted bypublic void setChannels(@Cast(value="uInt32") int channels)
channels - The number of channelspublic void setFrameRate(@Cast(value="uInt32") int framerate)
framerate - The base framerate depending on NTSC or PAL ROMpublic void initialize()
@Name(value="close") public void _close()
@Cast(value="bool") public boolean isSuccessfullyInitialized()
public void mute(@Cast(value="bool") boolean state)
state - Mutes sound if true, unmute if falsepublic void reset()
public void set(@Cast(value="uInt16") short addr, @Cast(value="uInt8") byte value, @Cast(value="Int32") int cycle)
addr - The register addressvalue - The value to save into the registercycle - The system cycle at which the register is being updatedpublic void setVolume(@Cast(value="Int32") int percent)
percent - The new volume percentage level for the sound devicepublic void adjustVolume(@Cast(value="Int8") byte direction)
direction - Increase or decrease the current volume by a predefined
amount based on the direction (1 = increase, -1 =decrease)public void recordNextFrame()
@Cast(value="bool") public boolean load(@ByRef Deserializer in)
in - The deserializer device to load from.@Cast(value="bool") public boolean save(@ByRef Serializer out)
out - The serializer device to save to.Copyright © 2020. All rights reserved.