summaryrefslogtreecommitdiff
path: root/src/audio/bind.bind
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/bind.bind')
-rw-r--r--src/audio/bind.bind655
1 files changed, 655 insertions, 0 deletions
diff --git a/src/audio/bind.bind b/src/audio/bind.bind
new file mode 100644
index 0000000..c09a1ca
--- /dev/null
+++ b/src/audio/bind.bind
@@ -0,0 +1,655 @@
+int ma_sound_init_from_file_bind(lua_State *L)
+{
+ ma_engine * pEngine = get: ma_engine *
+ const char * pFilePath = luaL_checkstring(L, 2);
+ ma_uint32 flags = luaL_checkinteger(L, 3);
+ ma_sound_group * pGroup = get: ma_sound_group *
+ ma_fence * pDoneFence = get: ma_fence *
+ ma_sound * pSound = get: ma_sound *
+ ma_result bind_result = ma_sound_init_from_file(pEngine, pFilePath, flags, pGroup, pDoneFence, pSound);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_init_from_file_w_bind(lua_State *L)
+{
+ ma_engine * pEngine = get: ma_engine *
+ const wchar_t * pFilePath = luaL_checkstring(L, 2);
+ ma_uint32 flags = luaL_checkinteger(L, 3);
+ ma_sound_group * pGroup = get: ma_sound_group *
+ ma_fence * pDoneFence = get: ma_fence *
+ ma_sound * pSound = get: ma_sound *
+ ma_result bind_result = ma_sound_init_from_file_w(pEngine, pFilePath, flags, pGroup, pDoneFence, pSound);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_init_copy_bind(lua_State *L)
+{
+ ma_engine * pEngine = get: ma_engine *
+ const ma_sound * pExistingSound = get: const ma_sound *
+ ma_uint32 flags = luaL_checkinteger(L, 3);
+ ma_sound_group * pGroup = get: ma_sound_group *
+ ma_sound * pSound = get: ma_sound *
+ ma_result bind_result = ma_sound_init_copy(pEngine, pExistingSound, flags, pGroup, pSound);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_init_from_data_source_bind(lua_State *L)
+{
+ ma_engine * pEngine = get: ma_engine *
+ ma_data_source * pDataSource = get: ma_data_source *
+ ma_uint32 flags = luaL_checkinteger(L, 3);
+ ma_sound_group * pGroup = get: ma_sound_group *
+ ma_sound * pSound = get: ma_sound *
+ ma_result bind_result = ma_sound_init_from_data_source(pEngine, pDataSource, flags, pGroup, pSound);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_init_ex_bind(lua_State *L)
+{
+ ma_engine * pEngine = get: ma_engine *
+ const ma_sound_config * pConfig = get: const ma_sound_config *
+ ma_sound * pSound = get: ma_sound *
+ ma_result bind_result = ma_sound_init_ex(pEngine, pConfig, pSound);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_uninit_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_sound_uninit(pSound);
+ return 0;
+}
+
+
+int ma_sound_get_engine_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_engine* bind_result = ma_sound_get_engine(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_get_data_source_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_data_source* bind_result = ma_sound_get_data_source(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_start_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_result bind_result = ma_sound_start(pSound);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_stop_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_result bind_result = ma_sound_stop(pSound);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_volume_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float volume = luaL_checknumber(L, 2);
+ ma_sound_set_volume(pSound, volume);
+ return 0;
+}
+
+
+int ma_sound_get_volume_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ float bind_result = ma_sound_get_volume(pSound);
+ lua_pushnumber(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_pan_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float pan = luaL_checknumber(L, 2);
+ ma_sound_set_pan(pSound, pan);
+ return 0;
+}
+
+
+int ma_sound_get_pan_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ float bind_result = ma_sound_get_pan(pSound);
+ lua_pushnumber(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_pan_mode_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_pan_mode panMode = get: ma_pan_mode
+ ma_sound_set_pan_mode(pSound, panMode);
+ return 0;
+}
+
+
+int ma_sound_get_pan_mode_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_pan_mode bind_result = ma_sound_get_pan_mode(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_set_pitch_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float pitch = luaL_checknumber(L, 2);
+ ma_sound_set_pitch(pSound, pitch);
+ return 0;
+}
+
+
+int ma_sound_get_pitch_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ float bind_result = ma_sound_get_pitch(pSound);
+ lua_pushnumber(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_spatialization_enabled_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_bool32 enabled = get: ma_bool32
+ ma_sound_set_spatialization_enabled(pSound, enabled);
+ return 0;
+}
+
+
+int ma_sound_is_spatialization_enabled_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_bool32 bind_result = ma_sound_is_spatialization_enabled(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_set_pinned_listener_index_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_uint32 listenerIndex = luaL_checkinteger(L, 2);
+ ma_sound_set_pinned_listener_index(pSound, listenerIndex);
+ return 0;
+}
+
+
+int ma_sound_get_pinned_listener_index_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_uint32 bind_result = ma_sound_get_pinned_listener_index(pSound);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_get_listener_index_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_uint32 bind_result = ma_sound_get_listener_index(pSound);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_get_direction_to_listener_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_vec3f bind_result = ma_sound_get_direction_to_listener(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_set_position_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float x = luaL_checknumber(L, 2);
+ float y = luaL_checknumber(L, 3);
+ float z = luaL_checknumber(L, 4);
+ ma_sound_set_position(pSound, x, y, z);
+ return 0;
+}
+
+
+int ma_sound_get_position_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_vec3f bind_result = ma_sound_get_position(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_set_direction_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float x = luaL_checknumber(L, 2);
+ float y = luaL_checknumber(L, 3);
+ float z = luaL_checknumber(L, 4);
+ ma_sound_set_direction(pSound, x, y, z);
+ return 0;
+}
+
+
+int ma_sound_get_direction_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_vec3f bind_result = ma_sound_get_direction(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_set_velocity_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float x = luaL_checknumber(L, 2);
+ float y = luaL_checknumber(L, 3);
+ float z = luaL_checknumber(L, 4);
+ ma_sound_set_velocity(pSound, x, y, z);
+ return 0;
+}
+
+
+int ma_sound_get_velocity_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_vec3f bind_result = ma_sound_get_velocity(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_set_attenuation_model_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_attenuation_model attenuationModel = get: ma_attenuation_model
+ ma_sound_set_attenuation_model(pSound, attenuationModel);
+ return 0;
+}
+
+
+int ma_sound_get_attenuation_model_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_attenuation_model bind_result = ma_sound_get_attenuation_model(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_set_positioning_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_positioning positioning = get: ma_positioning
+ ma_sound_set_positioning(pSound, positioning);
+ return 0;
+}
+
+
+int ma_sound_get_positioning_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_positioning bind_result = ma_sound_get_positioning(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_set_rolloff_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float rolloff = luaL_checknumber(L, 2);
+ ma_sound_set_rolloff(pSound, rolloff);
+ return 0;
+}
+
+
+int ma_sound_get_rolloff_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ float bind_result = ma_sound_get_rolloff(pSound);
+ lua_pushnumber(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_min_gain_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float minGain = luaL_checknumber(L, 2);
+ ma_sound_set_min_gain(pSound, minGain);
+ return 0;
+}
+
+
+int ma_sound_get_min_gain_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ float bind_result = ma_sound_get_min_gain(pSound);
+ lua_pushnumber(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_max_gain_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float maxGain = luaL_checknumber(L, 2);
+ ma_sound_set_max_gain(pSound, maxGain);
+ return 0;
+}
+
+
+int ma_sound_get_max_gain_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ float bind_result = ma_sound_get_max_gain(pSound);
+ lua_pushnumber(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_min_distance_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float minDistance = luaL_checknumber(L, 2);
+ ma_sound_set_min_distance(pSound, minDistance);
+ return 0;
+}
+
+
+int ma_sound_get_min_distance_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ float bind_result = ma_sound_get_min_distance(pSound);
+ lua_pushnumber(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_max_distance_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float maxDistance = luaL_checknumber(L, 2);
+ ma_sound_set_max_distance(pSound, maxDistance);
+ return 0;
+}
+
+
+int ma_sound_get_max_distance_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ float bind_result = ma_sound_get_max_distance(pSound);
+ lua_pushnumber(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_cone_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float innerAngleInRadians = luaL_checknumber(L, 2);
+ float outerAngleInRadians = luaL_checknumber(L, 3);
+ float outerGain = luaL_checknumber(L, 4);
+ ma_sound_set_cone(pSound, innerAngleInRadians, outerAngleInRadians, outerGain);
+ return 0;
+}
+
+
+int ma_sound_get_cone_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ float * pInnerAngleInRadians = get: float *
+ float * pOuterAngleInRadians = get: float *
+ float * pOuterGain = get: float *
+ ma_sound_get_cone(pSound, pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain);
+ return 0;
+}
+
+
+int ma_sound_set_doppler_factor_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float dopplerFactor = luaL_checknumber(L, 2);
+ ma_sound_set_doppler_factor(pSound, dopplerFactor);
+ return 0;
+}
+
+
+int ma_sound_get_doppler_factor_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ float bind_result = ma_sound_get_doppler_factor(pSound);
+ lua_pushnumber(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_directional_attenuation_factor_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float directionalAttenuationFactor = luaL_checknumber(L, 2);
+ ma_sound_set_directional_attenuation_factor(pSound, directionalAttenuationFactor);
+ return 0;
+}
+
+
+int ma_sound_get_directional_attenuation_factor_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ float bind_result = ma_sound_get_directional_attenuation_factor(pSound);
+ lua_pushnumber(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_fade_in_pcm_frames_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float volumeBeg = luaL_checknumber(L, 2);
+ float volumeEnd = luaL_checknumber(L, 3);
+ ma_uint64 fadeLengthInFrames = luaL_checkinteger(L, 4);
+ ma_sound_set_fade_in_pcm_frames(pSound, volumeBeg, volumeEnd, fadeLengthInFrames);
+ return 0;
+}
+
+
+int ma_sound_set_fade_in_milliseconds_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float volumeBeg = luaL_checknumber(L, 2);
+ float volumeEnd = luaL_checknumber(L, 3);
+ ma_uint64 fadeLengthInMilliseconds = luaL_checkinteger(L, 4);
+ ma_sound_set_fade_in_milliseconds(pSound, volumeBeg, volumeEnd, fadeLengthInMilliseconds);
+ return 0;
+}
+
+
+int ma_sound_get_current_fade_volume_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float bind_result = ma_sound_get_current_fade_volume(pSound);
+ lua_pushnumber(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_start_time_in_pcm_frames_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_uint64 absoluteGlobalTimeInFrames = luaL_checkinteger(L, 2);
+ ma_sound_set_start_time_in_pcm_frames(pSound, absoluteGlobalTimeInFrames);
+ return 0;
+}
+
+
+int ma_sound_set_start_time_in_milliseconds_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_uint64 absoluteGlobalTimeInMilliseconds = luaL_checkinteger(L, 2);
+ ma_sound_set_start_time_in_milliseconds(pSound, absoluteGlobalTimeInMilliseconds);
+ return 0;
+}
+
+
+int ma_sound_set_stop_time_in_pcm_frames_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_uint64 absoluteGlobalTimeInFrames = luaL_checkinteger(L, 2);
+ ma_sound_set_stop_time_in_pcm_frames(pSound, absoluteGlobalTimeInFrames);
+ return 0;
+}
+
+
+int ma_sound_set_stop_time_in_milliseconds_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_uint64 absoluteGlobalTimeInMilliseconds = luaL_checkinteger(L, 2);
+ ma_sound_set_stop_time_in_milliseconds(pSound, absoluteGlobalTimeInMilliseconds);
+ return 0;
+}
+
+
+int ma_sound_is_playing_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_bool32 bind_result = ma_sound_is_playing(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_get_time_in_pcm_frames_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_uint64 bind_result = ma_sound_get_time_in_pcm_frames(pSound);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_set_looping_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_bool32 isLooping = get: ma_bool32
+ ma_sound_set_looping(pSound, isLooping);
+ return 0;
+}
+
+
+int ma_sound_is_looping_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_bool32 bind_result = ma_sound_is_looping(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_at_end_bind(lua_State *L)
+{
+ const ma_sound * pSound = get: const ma_sound *
+ ma_bool32 bind_result = ma_sound_at_end(pSound);
+ /* push result */
+ return /* count */;
+}
+
+
+int ma_sound_seek_to_pcm_frame_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_uint64 frameIndex = luaL_checkinteger(L, 2);
+ ma_result bind_result = ma_sound_seek_to_pcm_frame(pSound, frameIndex);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_get_data_format_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_format * pFormat = get: ma_format *
+ ma_uint32 * pChannels = get: ma_uint32 *
+ ma_uint32 * pSampleRate = get: ma_uint32 *
+ ma_channel * pChannelMap = get: ma_channel *
+ size_t channelMapCap = get: size_t
+ ma_result bind_result = ma_sound_get_data_format(pSound, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_get_cursor_in_pcm_frames_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_uint64 * pCursor = get: ma_uint64 *
+ ma_result bind_result = ma_sound_get_cursor_in_pcm_frames(pSound, pCursor);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_get_length_in_pcm_frames_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ ma_uint64 * pLength = get: ma_uint64 *
+ ma_result bind_result = ma_sound_get_length_in_pcm_frames(pSound, pLength);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_get_cursor_in_seconds_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float * pCursor = get: float *
+ ma_result bind_result = ma_sound_get_cursor_in_seconds(pSound, pCursor);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+
+int ma_sound_get_length_in_seconds_bind(lua_State *L)
+{
+ ma_sound * pSound = get: ma_sound *
+ float * pLength = get: float *
+ ma_result bind_result = ma_sound_get_length_in_seconds(pSound, pLength);
+ lua_pushinteger(L, bind_result);
+ return 1;
+}
+
+