Skip to content

Commit

Permalink
feat(fmod) update to 2.02.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Dec 18, 2023
1 parent 7dc94e3 commit de8bd86
Show file tree
Hide file tree
Showing 6 changed files with 248 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/notes/3.3.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This build includes the following changes:
- Assimp: Updated to 5.3.1 (up from 5.2.5)
- bgfx: Updated to API version 124 (up from 122)
* Windows: support for the Direct3D 9 backend has been dropped.
- FMOD: Updated to 2.02.19 (up from 2.02.16)
- FMOD: Updated to 2.02.20 (up from 2.02.16)
- glfw: Updated to latest 3.3.9 (up from 3.3.8)
- glfw: Added experimental support for IME. (#946)
* Added `GLFW_SOFT_FULLSCREEN`, `GLFW_IME`, `GLFW_MANAGE_PREEDIT_CANDIDATE` and `GLFW_X11_ONTHESPOT`.
Expand Down
90 changes: 89 additions & 1 deletion modules/lwjgl/fmod/src/generated/java/org/lwjgl/fmod/FMOD.java
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public static SharedLibrary getLibrary() {
return FMOD;
}

public static final int FMOD_VERSION = 0x20219;
public static final int FMOD_VERSION = 0x20220;

public static final int FMOD_DEBUG_LEVEL_NONE = 0x0;

Expand Down Expand Up @@ -8824,4 +8824,92 @@ public static int FMOD_Reverb3D_GetUserData(@NativeType("FMOD_REVERB3D *") long
return nFMOD_Reverb3D_GetUserData(reverb3d, memAddress(userdata));
}

public static String FMOD_ErrorString(@NativeType("FMOD_RESULT") int errcode) {
switch (errcode) {
case FMOD_OK: return "No errors.";
case FMOD_ERR_BADCOMMAND: return "Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound).";
case FMOD_ERR_CHANNEL_ALLOC: return "Error trying to allocate a channel.";
case FMOD_ERR_CHANNEL_STOLEN: return "The specified channel has been reused to play another sound.";
case FMOD_ERR_DMA: return "DMA Failure. See debug output for more information.";
case FMOD_ERR_DSP_CONNECTION: return "DSP connection error. Connection possibly caused a cyclic dependency or connected dsps with incompatible buffer counts.";
case FMOD_ERR_DSP_DONTPROCESS: return "DSP return code from a DSP process query callback. Tells mixer not to call the process callback and therefore not consume CPU. Use this to optimize the DSP graph.";
case FMOD_ERR_DSP_FORMAT: return "DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map.";
case FMOD_ERR_DSP_INUSE: return "DSP is already in the mixer's DSP network. It must be removed before being reinserted or released.";
case FMOD_ERR_DSP_NOTFOUND: return "DSP connection error. Couldn't find the DSP unit specified.";
case FMOD_ERR_DSP_RESERVED: return "DSP operation error. Cannot perform operation on this DSP as it is reserved by the system.";
case FMOD_ERR_DSP_SILENCE: return "DSP return code from a DSP process query callback. Tells mixer silence would be produced from read, so go idle and not consume CPU. Use this to optimize the DSP graph.";
case FMOD_ERR_DSP_TYPE: return "DSP operation cannot be performed on a DSP of this type.";
case FMOD_ERR_FILE_BAD: return "Error loading file.";
case FMOD_ERR_FILE_COULDNOTSEEK: return "Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.";
case FMOD_ERR_FILE_DISKEJECTED: return "Media was ejected while reading.";
case FMOD_ERR_FILE_EOF: return "End of file unexpectedly reached while trying to read essential data (truncated?).";
case FMOD_ERR_FILE_ENDOFDATA: return "End of current chunk reached while trying to read data.";
case FMOD_ERR_FILE_NOTFOUND: return "File not found.";
case FMOD_ERR_FORMAT: return "Unsupported file or audio format.";
case FMOD_ERR_HEADER_MISMATCH: return "There is a version mismatch between the FMOD header and either the FMOD Studio library or the FMOD Low Level library.";
case FMOD_ERR_HTTP: return "A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere.";
case FMOD_ERR_HTTP_ACCESS: return "The specified resource requires authentication or is forbidden.";
case FMOD_ERR_HTTP_PROXY_AUTH: return "Proxy authentication is required to access the specified resource.";
case FMOD_ERR_HTTP_SERVER_ERROR: return "A HTTP server error occurred.";
case FMOD_ERR_HTTP_TIMEOUT: return "The HTTP request timed out.";
case FMOD_ERR_INITIALIZATION: return "FMOD was not initialized correctly to support this function.";
case FMOD_ERR_INITIALIZED: return "Cannot call this command after System::init.";
case FMOD_ERR_INTERNAL: return "An error occured in the FMOD system. Use the logging version of FMOD for more information.";
case FMOD_ERR_INVALID_FLOAT: return "Value passed in was a NaN, Inf or denormalized float.";
case FMOD_ERR_INVALID_HANDLE: return "An invalid object handle was used.";
case FMOD_ERR_INVALID_PARAM: return "An invalid parameter was passed to this function.";
case FMOD_ERR_INVALID_POSITION: return "An invalid seek position was passed to this function.";
case FMOD_ERR_INVALID_SPEAKER: return "An invalid speaker was passed to this function based on the current speaker mode.";
case FMOD_ERR_INVALID_SYNCPOINT: return "The syncpoint did not come from this sound handle.";
case FMOD_ERR_INVALID_THREAD: return "Tried to call a function on a thread that is not supported.";
case FMOD_ERR_INVALID_VECTOR: return "The vectors passed in are not unit length, or perpendicular.";
case FMOD_ERR_MAXAUDIBLE: return "Reached maximum audible playback count for this sound's soundgroup.";
case FMOD_ERR_MEMORY: return "Not enough memory or resources.";
case FMOD_ERR_MEMORY_CANTPOINT: return "Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used.";
case FMOD_ERR_NEEDS3D: return "Tried to call a command on a 2d sound when the command was meant for 3d sound.";
case FMOD_ERR_NEEDSHARDWARE: return "Tried to use a feature that requires hardware support.";
case FMOD_ERR_NET_CONNECT: return "Couldn't connect to the specified host.";
case FMOD_ERR_NET_SOCKET_ERROR: return "A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere.";
case FMOD_ERR_NET_URL: return "The specified URL couldn't be resolved.";
case FMOD_ERR_NET_WOULD_BLOCK: return "Operation on a non-blocking socket could not complete immediately.";
case FMOD_ERR_NOTREADY: return "Operation could not be performed because specified sound/DSP connection is not ready.";
case FMOD_ERR_OUTPUT_ALLOCATED: return "Error initializing output device, but more specifically, the output device is already in use and cannot be reused.";
case FMOD_ERR_OUTPUT_CREATEBUFFER: return "Error creating hardware sound buffer.";
case FMOD_ERR_OUTPUT_DRIVERCALL: return "A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted.";
case FMOD_ERR_OUTPUT_FORMAT: return "Soundcard does not support the specified format.";
case FMOD_ERR_OUTPUT_INIT: return "Error initializing output device.";
case FMOD_ERR_OUTPUT_NODRIVERS: return "The output device has no drivers installed. If pre-init, FMOD_OUTPUT_NOSOUND is selected as the output mode. If post-init, the function just fails.";
case FMOD_ERR_PLUGIN: return "An unspecified error has been returned from a plugin.";
case FMOD_ERR_PLUGIN_MISSING: return "A requested output, dsp unit type or codec was not available.";
case FMOD_ERR_PLUGIN_RESOURCE: return "A resource that the plugin requires cannot be allocated or found. (ie the DLS file for MIDI playback)";
case FMOD_ERR_PLUGIN_VERSION: return "A plugin was built with an unsupported SDK version.";
case FMOD_ERR_RECORD: return "An error occurred trying to initialize the recording device.";
case FMOD_ERR_REVERB_CHANNELGROUP: return "Reverb properties cannot be set on this channel because a parent channelgroup owns the reverb connection.";
case FMOD_ERR_REVERB_INSTANCE: return "Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number or the reverb doesn't exist.";
case FMOD_ERR_SUBSOUNDS: return "The error occurred because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound.";
case FMOD_ERR_SUBSOUND_ALLOCATED: return "This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first.";
case FMOD_ERR_SUBSOUND_CANTMOVE: return "Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file.";
case FMOD_ERR_TAGNOTFOUND: return "The specified tag could not be found or there are no tags.";
case FMOD_ERR_TOOMANYCHANNELS: return "The sound created exceeds the allowable input channel count. This can be increased using the 'maxinputchannels' parameter in System::setSoftwareFormat.";
case FMOD_ERR_TRUNCATED: return "The retrieved string is too long to fit in the supplied buffer and has been truncated.";
case FMOD_ERR_UNIMPLEMENTED: return "Something in FMOD hasn't been implemented when it should be. Contact support.";
case FMOD_ERR_UNINITIALIZED: return "This command failed because System::init or System::setDriver was not called.";
case FMOD_ERR_UNSUPPORTED: return "A command issued was not supported by this object. Possibly a plugin without certain callbacks specified.";
case FMOD_ERR_VERSION: return "The version number of this file format is not supported.";
case FMOD_ERR_EVENT_ALREADY_LOADED: return "The specified bank has already been loaded.";
case FMOD_ERR_EVENT_LIVEUPDATE_BUSY: return "The live update connection failed due to the game already being connected.";
case FMOD_ERR_EVENT_LIVEUPDATE_MISMATCH: return "The live update connection failed due to the game data being out of sync with the tool.";
case FMOD_ERR_EVENT_LIVEUPDATE_TIMEOUT: return "The live update connection timed out.";
case FMOD_ERR_EVENT_NOTFOUND: return "The requested event, parameter, bus or vca could not be found.";
case FMOD_ERR_STUDIO_UNINITIALIZED: return "The Studio::System object is not yet initialized.";
case FMOD_ERR_STUDIO_NOT_LOADED: return "The specified resource is not loaded, so it can't be unloaded.";
case FMOD_ERR_INVALID_STRING: return "An invalid string was passed to this function.";
case FMOD_ERR_ALREADY_LOCKED: return "The specified resource is already locked.";
case FMOD_ERR_NOT_LOCKED: return "The specified resource is not locked, so it can't be unlocked.";
case FMOD_ERR_RECORD_DISCONNECTED: return "The specified recording driver has been disconnected.";
case FMOD_ERR_TOOMANYSAMPLES: return "The length provided exceeds the allowable limit.";
default: return "Unknown error.";
}
}

}
35 changes: 34 additions & 1 deletion modules/lwjgl/fmod/src/generated/java/org/lwjgl/fmod/FSBank.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public static SharedLibrary getLibrary() {

public static final int FSBANK_BUILD_WRITEPEAKVOLUME = 0x200;

public static final int FSBANK_BUILD_ALIGN4K = 0x400;

public static final int FSBANK_BUILD_OVERRIDE_MASK = FSBANK_BUILD_DISABLESYNCPOINTS | FSBANK_BUILD_DONTLOOP | FSBANK_BUILD_FILTERHIGHFREQ | FSBANK_BUILD_DISABLESEEKING | FSBANK_BUILD_OPTIMIZESAMPLERATE | FSBANK_BUILD_WRITEPEAKVOLUME;

public static final int FSBANK_BUILD_CACHE_VALIDATION_MASK = FSBANK_BUILD_DONTLOOP | FSBANK_BUILD_FILTERHIGHFREQ | FSBANK_BUILD_OPTIMIZESAMPLERATE;
Expand Down Expand Up @@ -114,6 +116,7 @@ public static SharedLibrary getLibrary() {
* <li>{@link #FSBANK_WARN_FORCED_DONTWRITENAMES WARN_FORCED_DONTWRITENAMES}</li>
* <li>{@link #FSBANK_ERR_ENCODER_FILE_NOTFOUND ERR_ENCODER_FILE_NOTFOUND}</li>
* <li>{@link #FSBANK_ERR_ENCODER_FILE_BAD ERR_ENCODER_FILE_BAD}</li>
* <li>{@link #FSBANK_WARN_IGNORED_ALIGN4K WARN_IGNORED_ALIGN4K}</li>
* </ul>
*/
public static final int
Expand All @@ -138,7 +141,8 @@ public static SharedLibrary getLibrary() {
FSBANK_WARN_IGNORED_DISABLESEEKING = 18,
FSBANK_WARN_FORCED_DONTWRITENAMES = 19,
FSBANK_ERR_ENCODER_FILE_NOTFOUND = 20,
FSBANK_ERR_ENCODER_FILE_BAD = 21;
FSBANK_ERR_ENCODER_FILE_BAD = 21,
FSBANK_WARN_IGNORED_ALIGN4K = 22;

/**
* {@code FSBANK_FORMAT}
Expand Down Expand Up @@ -355,4 +359,33 @@ public static int FSBank_MemoryGetStats(@Nullable @NativeType("unsigned int *")
return nFSBank_MemoryGetStats(memAddressSafe(currentAllocated), memAddressSafe(maximumAllocated));
}

public static String FSBank_ErrorString(@NativeType("FSBANK_RESULT") int result) {
switch (result) {
case FSBANK_OK: return "No errors.";
case FSBANK_ERR_CACHE_CHUNKNOTFOUND: return "An expected chunk is missing from the cache, perhaps try deleting cache files.";
case FSBANK_ERR_CANCELLED: return "The build process was cancelled during compilation by the user.";
case FSBANK_ERR_CANNOT_CONTINUE: return "The build process cannot continue due to previously ignored errors.";
case FSBANK_ERR_ENCODER: return "Encoder for chosen format has encountered an unexpected error.";
case FSBANK_ERR_ENCODER_INIT: return "Encoder initialization failed.";
case FSBANK_ERR_ENCODER_NOTSUPPORTED: return "Encoder for chosen format is not supported on this platform.";
case FSBANK_ERR_FILE_OS: return "An operating system based file error was encountered.";
case FSBANK_ERR_FILE_NOTFOUND: return "A specified file could not be found.";
case FSBANK_ERR_FMOD: return "Internal error from FMOD sub-system.";
case FSBANK_ERR_INITIALIZED: return "Already initialized.";
case FSBANK_ERR_INVALID_FORMAT: return "The format of the source file is invalid.";
case FSBANK_ERR_INVALID_PARAM: return "An invalid parameter has been passed to this function.";
case FSBANK_ERR_MEMORY: return "Run out of memory.";
case FSBANK_ERR_UNINITIALIZED: return "Not initialized yet.";
case FSBANK_ERR_WRITER_FORMAT: return "Chosen encode format is not supported by this FSB version.";
case FSBANK_WARN_CANNOTLOOP: return "Source file is too short for seamless looping. Looping disabled.";
case FSBANK_WARN_IGNORED_FILTERHIGHFREQ: return "FSBANK_BUILD_FILTERHIGHFREQ flag ignored: feature only supported by XMA format.";
case FSBANK_WARN_IGNORED_DISABLESEEKING: return "FSBANK_BUILD_DISABLESEEKING flag ignored: feature only supported by XMA format.";
case FSBANK_WARN_FORCED_DONTWRITENAMES: return "FSBANK_BUILD_FSB5_DONTWRITENAMES flag forced: cannot write names when source is from memory.";
case FSBANK_ERR_ENCODER_FILE_NOTFOUND: return "External encoder dynamic library not found.";
case FSBANK_ERR_ENCODER_FILE_BAD: return "External encoder dynamic library could not be loaded, possibly incorrect binary format, incorrect architecture, or file corruption.";
case FSBANK_WARN_IGNORED_ALIGN4K: return "FSBANK_BUILD_ALIGN4K flag ignored: feature only supported by Opus, Vorbis, and FADPCM formats.";
default: return "Unknown error.";
}
}

}
1 change: 1 addition & 0 deletions modules/lwjgl/fmod/src/templates/kotlin/fmod/FMODTypes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ val FMOD_ADVANCEDSETTINGS = struct(Module.FMOD, "FMOD_ADVANCEDSETTINGS") {
unsigned_int("randomSeed", "")
int("maxConvolutionThreads", "")
int("maxOpusCodecs", "")
int("maxSpatialObjects", "")
}

val FMOD_TAG = struct(Module.FMOD, "FMOD_TAG") {
Expand Down
Loading

0 comments on commit de8bd86

Please sign in to comment.