From 265c381d5f10dd552dfc9b8f49430ff4b2e8ca04 Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 26 Feb 2023 16:18:20 -0600 Subject: bind (almost) all miniaudio functions --- src/audio/bind.bind | 472 ++++++++++++++++++---------------------------------- 1 file changed, 165 insertions(+), 307 deletions(-) (limited to 'src/audio/bind.bind') diff --git a/src/audio/bind.bind b/src/audio/bind.bind index c09a1ca..41fddd6 100644 --- a/src/audio/bind.bind +++ b/src/audio/bind.bind @@ -1,653 +1,511 @@ -int ma_sound_init_from_file_bind(lua_State *L) +int ma_sound_group_init_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_uint32 flags = luaL_checkinteger(L, 2); + ma_sound_group * pParentGroup = get: ma_sound_group * 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); + ma_result bind_result = ma_sound_group_init(pEngine, flags, pParentGroup, pGroup); lua_pushinteger(L, bind_result); return 1; } -int ma_sound_init_from_file_w_bind(lua_State *L) +int ma_sound_group_init_ex_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); + const ma_sound_group_config * pConfig = get: const ma_sound_group_config * 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); + ma_result bind_result = ma_sound_group_init_ex(pEngine, pConfig, pGroup); lua_pushinteger(L, bind_result); return 1; } -int ma_sound_init_copy_bind(lua_State *L) +int ma_sound_group_uninit_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); + ma_sound_group_uninit(pGroup); 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) +int ma_sound_group_get_engine_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - ma_data_source* bind_result = ma_sound_get_data_source(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_engine* bind_result = ma_sound_group_get_engine(pGroup); /* push result */ return /* count */; } -int ma_sound_start_bind(lua_State *L) +int ma_sound_group_start_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * - ma_result bind_result = ma_sound_start(pSound); + ma_sound_group * pGroup = get: ma_sound_group * + ma_result bind_result = ma_sound_group_start(pGroup); lua_pushinteger(L, bind_result); return 1; } -int ma_sound_stop_bind(lua_State *L) +int ma_sound_group_stop_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * - ma_result bind_result = ma_sound_stop(pSound); + ma_sound_group * pGroup = get: ma_sound_group * + ma_result bind_result = ma_sound_group_stop(pGroup); lua_pushinteger(L, bind_result); return 1; } -int ma_sound_set_volume_bind(lua_State *L) +int ma_sound_group_set_volume_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * float volume = luaL_checknumber(L, 2); - ma_sound_set_volume(pSound, volume); + ma_sound_group_set_volume(pGroup, volume); return 0; } -int ma_sound_get_volume_bind(lua_State *L) +int ma_sound_group_get_volume_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - float bind_result = ma_sound_get_volume(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + float bind_result = ma_sound_group_get_volume(pGroup); lua_pushnumber(L, bind_result); return 1; } -int ma_sound_set_pan_bind(lua_State *L) +int ma_sound_group_set_pan_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * float pan = luaL_checknumber(L, 2); - ma_sound_set_pan(pSound, pan); + ma_sound_group_set_pan(pGroup, pan); return 0; } -int ma_sound_get_pan_bind(lua_State *L) +int ma_sound_group_get_pan_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - float bind_result = ma_sound_get_pan(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + float bind_result = ma_sound_group_get_pan(pGroup); lua_pushnumber(L, bind_result); return 1; } -int ma_sound_set_pan_mode_bind(lua_State *L) +int ma_sound_group_set_pan_mode_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * ma_pan_mode panMode = get: ma_pan_mode - ma_sound_set_pan_mode(pSound, panMode); + ma_sound_group_set_pan_mode(pGroup, panMode); return 0; } -int ma_sound_get_pan_mode_bind(lua_State *L) +int ma_sound_group_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); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_pan_mode bind_result = ma_sound_group_get_pan_mode(pGroup); /* push result */ return /* count */; } -int ma_sound_set_pitch_bind(lua_State *L) +int ma_sound_group_set_pitch_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * float pitch = luaL_checknumber(L, 2); - ma_sound_set_pitch(pSound, pitch); + ma_sound_group_set_pitch(pGroup, pitch); return 0; } -int ma_sound_get_pitch_bind(lua_State *L) +int ma_sound_group_get_pitch_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - float bind_result = ma_sound_get_pitch(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + float bind_result = ma_sound_group_get_pitch(pGroup); lua_pushnumber(L, bind_result); return 1; } -int ma_sound_set_spatialization_enabled_bind(lua_State *L) +int ma_sound_group_set_spatialization_enabled_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * ma_bool32 enabled = get: ma_bool32 - ma_sound_set_spatialization_enabled(pSound, enabled); + ma_sound_group_set_spatialization_enabled(pGroup, enabled); return 0; } -int ma_sound_is_spatialization_enabled_bind(lua_State *L) +int ma_sound_group_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); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_bool32 bind_result = ma_sound_group_is_spatialization_enabled(pGroup); /* push result */ return /* count */; } -int ma_sound_set_pinned_listener_index_bind(lua_State *L) +int ma_sound_group_set_pinned_listener_index_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * ma_uint32 listenerIndex = luaL_checkinteger(L, 2); - ma_sound_set_pinned_listener_index(pSound, listenerIndex); + ma_sound_group_set_pinned_listener_index(pGroup, listenerIndex); return 0; } -int ma_sound_get_pinned_listener_index_bind(lua_State *L) +int ma_sound_group_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); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_uint32 bind_result = ma_sound_group_get_pinned_listener_index(pGroup); lua_pushinteger(L, bind_result); return 1; } -int ma_sound_get_listener_index_bind(lua_State *L) +int ma_sound_group_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); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_uint32 bind_result = ma_sound_group_get_listener_index(pGroup); lua_pushinteger(L, bind_result); return 1; } -int ma_sound_get_direction_to_listener_bind(lua_State *L) +int ma_sound_group_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); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_vec3f bind_result = ma_sound_group_get_direction_to_listener(pGroup); /* push result */ return /* count */; } -int ma_sound_set_position_bind(lua_State *L) +int ma_sound_group_set_position_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * 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); + ma_sound_group_set_position(pGroup, x, y, z); return 0; } -int ma_sound_get_position_bind(lua_State *L) +int ma_sound_group_get_position_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - ma_vec3f bind_result = ma_sound_get_position(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_vec3f bind_result = ma_sound_group_get_position(pGroup); /* push result */ return /* count */; } -int ma_sound_set_direction_bind(lua_State *L) +int ma_sound_group_set_direction_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * 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); + ma_sound_group_set_direction(pGroup, x, y, z); return 0; } -int ma_sound_get_direction_bind(lua_State *L) +int ma_sound_group_get_direction_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - ma_vec3f bind_result = ma_sound_get_direction(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_vec3f bind_result = ma_sound_group_get_direction(pGroup); /* push result */ return /* count */; } -int ma_sound_set_velocity_bind(lua_State *L) +int ma_sound_group_set_velocity_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * 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); + ma_sound_group_set_velocity(pGroup, x, y, z); return 0; } -int ma_sound_get_velocity_bind(lua_State *L) +int ma_sound_group_get_velocity_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - ma_vec3f bind_result = ma_sound_get_velocity(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_vec3f bind_result = ma_sound_group_get_velocity(pGroup); /* push result */ return /* count */; } -int ma_sound_set_attenuation_model_bind(lua_State *L) +int ma_sound_group_set_attenuation_model_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * ma_attenuation_model attenuationModel = get: ma_attenuation_model - ma_sound_set_attenuation_model(pSound, attenuationModel); + ma_sound_group_set_attenuation_model(pGroup, attenuationModel); return 0; } -int ma_sound_get_attenuation_model_bind(lua_State *L) +int ma_sound_group_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); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_attenuation_model bind_result = ma_sound_group_get_attenuation_model(pGroup); /* push result */ return /* count */; } -int ma_sound_set_positioning_bind(lua_State *L) +int ma_sound_group_set_positioning_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * ma_positioning positioning = get: ma_positioning - ma_sound_set_positioning(pSound, positioning); + ma_sound_group_set_positioning(pGroup, positioning); return 0; } -int ma_sound_get_positioning_bind(lua_State *L) +int ma_sound_group_get_positioning_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - ma_positioning bind_result = ma_sound_get_positioning(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_positioning bind_result = ma_sound_group_get_positioning(pGroup); /* push result */ return /* count */; } -int ma_sound_set_rolloff_bind(lua_State *L) +int ma_sound_group_set_rolloff_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * float rolloff = luaL_checknumber(L, 2); - ma_sound_set_rolloff(pSound, rolloff); + ma_sound_group_set_rolloff(pGroup, rolloff); return 0; } -int ma_sound_get_rolloff_bind(lua_State *L) +int ma_sound_group_get_rolloff_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - float bind_result = ma_sound_get_rolloff(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + float bind_result = ma_sound_group_get_rolloff(pGroup); lua_pushnumber(L, bind_result); return 1; } -int ma_sound_set_min_gain_bind(lua_State *L) +int ma_sound_group_set_min_gain_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * float minGain = luaL_checknumber(L, 2); - ma_sound_set_min_gain(pSound, minGain); + ma_sound_group_set_min_gain(pGroup, minGain); return 0; } -int ma_sound_get_min_gain_bind(lua_State *L) +int ma_sound_group_get_min_gain_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - float bind_result = ma_sound_get_min_gain(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + float bind_result = ma_sound_group_get_min_gain(pGroup); lua_pushnumber(L, bind_result); return 1; } -int ma_sound_set_max_gain_bind(lua_State *L) +int ma_sound_group_set_max_gain_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * float maxGain = luaL_checknumber(L, 2); - ma_sound_set_max_gain(pSound, maxGain); + ma_sound_group_set_max_gain(pGroup, maxGain); return 0; } -int ma_sound_get_max_gain_bind(lua_State *L) +int ma_sound_group_get_max_gain_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - float bind_result = ma_sound_get_max_gain(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + float bind_result = ma_sound_group_get_max_gain(pGroup); lua_pushnumber(L, bind_result); return 1; } -int ma_sound_set_min_distance_bind(lua_State *L) +int ma_sound_group_set_min_distance_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * float minDistance = luaL_checknumber(L, 2); - ma_sound_set_min_distance(pSound, minDistance); + ma_sound_group_set_min_distance(pGroup, minDistance); return 0; } -int ma_sound_get_min_distance_bind(lua_State *L) +int ma_sound_group_get_min_distance_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - float bind_result = ma_sound_get_min_distance(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + float bind_result = ma_sound_group_get_min_distance(pGroup); lua_pushnumber(L, bind_result); return 1; } -int ma_sound_set_max_distance_bind(lua_State *L) +int ma_sound_group_set_max_distance_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * float maxDistance = luaL_checknumber(L, 2); - ma_sound_set_max_distance(pSound, maxDistance); + ma_sound_group_set_max_distance(pGroup, maxDistance); return 0; } -int ma_sound_get_max_distance_bind(lua_State *L) +int ma_sound_group_get_max_distance_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - float bind_result = ma_sound_get_max_distance(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + float bind_result = ma_sound_group_get_max_distance(pGroup); lua_pushnumber(L, bind_result); return 1; } -int ma_sound_set_cone_bind(lua_State *L) +int ma_sound_group_set_cone_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * 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); + ma_sound_group_set_cone(pGroup, innerAngleInRadians, outerAngleInRadians, outerGain); return 0; } -int ma_sound_get_cone_bind(lua_State *L) +int ma_sound_group_get_cone_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * + const ma_sound_group * pGroup = get: const ma_sound_group * float * pInnerAngleInRadians = get: float * float * pOuterAngleInRadians = get: float * float * pOuterGain = get: float * - ma_sound_get_cone(pSound, pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain); + ma_sound_group_get_cone(pGroup, pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain); return 0; } -int ma_sound_set_doppler_factor_bind(lua_State *L) +int ma_sound_group_set_doppler_factor_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * float dopplerFactor = luaL_checknumber(L, 2); - ma_sound_set_doppler_factor(pSound, dopplerFactor); + ma_sound_group_set_doppler_factor(pGroup, dopplerFactor); return 0; } -int ma_sound_get_doppler_factor_bind(lua_State *L) +int ma_sound_group_get_doppler_factor_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - float bind_result = ma_sound_get_doppler_factor(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + float bind_result = ma_sound_group_get_doppler_factor(pGroup); lua_pushnumber(L, bind_result); return 1; } -int ma_sound_set_directional_attenuation_factor_bind(lua_State *L) +int ma_sound_group_set_directional_attenuation_factor_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * float directionalAttenuationFactor = luaL_checknumber(L, 2); - ma_sound_set_directional_attenuation_factor(pSound, directionalAttenuationFactor); + ma_sound_group_set_directional_attenuation_factor(pGroup, directionalAttenuationFactor); return 0; } -int ma_sound_get_directional_attenuation_factor_bind(lua_State *L) +int ma_sound_group_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); + const ma_sound_group * pGroup = get: const ma_sound_group * + float bind_result = ma_sound_group_get_directional_attenuation_factor(pGroup); lua_pushnumber(L, bind_result); return 1; } -int ma_sound_set_fade_in_pcm_frames_bind(lua_State *L) +int ma_sound_group_set_fade_in_pcm_frames_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * 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); + ma_sound_group_set_fade_in_pcm_frames(pGroup, volumeBeg, volumeEnd, fadeLengthInFrames); return 0; } -int ma_sound_set_fade_in_milliseconds_bind(lua_State *L) +int ma_sound_group_set_fade_in_milliseconds_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * 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); + ma_sound_group_set_fade_in_milliseconds(pGroup, volumeBeg, volumeEnd, fadeLengthInMilliseconds); return 0; } -int ma_sound_get_current_fade_volume_bind(lua_State *L) +int ma_sound_group_get_current_fade_volume_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * - float bind_result = ma_sound_get_current_fade_volume(pSound); + ma_sound_group * pGroup = get: ma_sound_group * + float bind_result = ma_sound_group_get_current_fade_volume(pGroup); lua_pushnumber(L, bind_result); return 1; } -int ma_sound_set_start_time_in_pcm_frames_bind(lua_State *L) +int ma_sound_group_set_start_time_in_pcm_frames_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * ma_uint64 absoluteGlobalTimeInFrames = luaL_checkinteger(L, 2); - ma_sound_set_start_time_in_pcm_frames(pSound, absoluteGlobalTimeInFrames); + ma_sound_group_set_start_time_in_pcm_frames(pGroup, absoluteGlobalTimeInFrames); return 0; } -int ma_sound_set_start_time_in_milliseconds_bind(lua_State *L) +int ma_sound_group_set_start_time_in_milliseconds_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * ma_uint64 absoluteGlobalTimeInMilliseconds = luaL_checkinteger(L, 2); - ma_sound_set_start_time_in_milliseconds(pSound, absoluteGlobalTimeInMilliseconds); + ma_sound_group_set_start_time_in_milliseconds(pGroup, absoluteGlobalTimeInMilliseconds); return 0; } -int ma_sound_set_stop_time_in_pcm_frames_bind(lua_State *L) +int ma_sound_group_set_stop_time_in_pcm_frames_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * ma_uint64 absoluteGlobalTimeInFrames = luaL_checkinteger(L, 2); - ma_sound_set_stop_time_in_pcm_frames(pSound, absoluteGlobalTimeInFrames); + ma_sound_group_set_stop_time_in_pcm_frames(pGroup, absoluteGlobalTimeInFrames); return 0; } -int ma_sound_set_stop_time_in_milliseconds_bind(lua_State *L) +int ma_sound_group_set_stop_time_in_milliseconds_bind(lua_State *L) { - ma_sound * pSound = get: ma_sound * + ma_sound_group * pGroup = get: ma_sound_group * ma_uint64 absoluteGlobalTimeInMilliseconds = luaL_checkinteger(L, 2); - ma_sound_set_stop_time_in_milliseconds(pSound, absoluteGlobalTimeInMilliseconds); + ma_sound_group_set_stop_time_in_milliseconds(pGroup, absoluteGlobalTimeInMilliseconds); return 0; } -int ma_sound_is_playing_bind(lua_State *L) +int ma_sound_group_is_playing_bind(lua_State *L) { - const ma_sound * pSound = get: const ma_sound * - ma_bool32 bind_result = ma_sound_is_playing(pSound); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_bool32 bind_result = ma_sound_group_is_playing(pGroup); /* 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) +int ma_sound_group_get_time_in_pcm_frames_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); + const ma_sound_group * pGroup = get: const ma_sound_group * + ma_uint64 bind_result = ma_sound_group_get_time_in_pcm_frames(pGroup); lua_pushinteger(L, bind_result); return 1; } -- cgit v1.2.1