summaryrefslogtreecommitdiff
path: root/src/audio/bind
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-02-26 16:18:20 -0600
committersanine <sanine.not@pm.me>2023-02-26 16:18:20 -0600
commit265c381d5f10dd552dfc9b8f49430ff4b2e8ca04 (patch)
treede41180c4ff6f723add47bd700eba3844798e213 /src/audio/bind
parent231bab5db23e5be996b3ff0733d3ebd8d1cbbc96 (diff)
bind (almost) all miniaudio functions
Diffstat (limited to 'src/audio/bind')
-rw-r--r--src/audio/bind123
1 files changed, 55 insertions, 68 deletions
diff --git a/src/audio/bind b/src/audio/bind
index 6f7e41c..3a9befe 100644
--- a/src/audio/bind
+++ b/src/audio/bind
@@ -1,68 +1,55 @@
-ma_result ma_sound_init_from_file(ma_engine* pEngine, const char* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound);
-ma_result ma_sound_init_from_file_w(ma_engine* pEngine, const wchar_t* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound);
-ma_result ma_sound_init_copy(ma_engine* pEngine, const ma_sound* pExistingSound, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound);
-ma_result ma_sound_init_from_data_source(ma_engine* pEngine, ma_data_source* pDataSource, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound);
-ma_result ma_sound_init_ex(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound);
-void ma_sound_uninit(ma_sound* pSound);
-ma_engine* ma_sound_get_engine(const ma_sound* pSound);
-ma_data_source* ma_sound_get_data_source(const ma_sound* pSound);
-ma_result ma_sound_start(ma_sound* pSound);
-ma_result ma_sound_stop(ma_sound* pSound);
-void ma_sound_set_volume(ma_sound* pSound, float volume);
-float ma_sound_get_volume(const ma_sound* pSound);
-void ma_sound_set_pan(ma_sound* pSound, float pan);
-float ma_sound_get_pan(const ma_sound* pSound);
-void ma_sound_set_pan_mode(ma_sound* pSound, ma_pan_mode panMode);
-ma_pan_mode ma_sound_get_pan_mode(const ma_sound* pSound);
-void ma_sound_set_pitch(ma_sound* pSound, float pitch);
-float ma_sound_get_pitch(const ma_sound* pSound);
-void ma_sound_set_spatialization_enabled(ma_sound* pSound, ma_bool32 enabled);
-ma_bool32 ma_sound_is_spatialization_enabled(const ma_sound* pSound);
-void ma_sound_set_pinned_listener_index(ma_sound* pSound, ma_uint32 listenerIndex);
-ma_uint32 ma_sound_get_pinned_listener_index(const ma_sound* pSound);
-ma_uint32 ma_sound_get_listener_index(const ma_sound* pSound);
-ma_vec3f ma_sound_get_direction_to_listener(const ma_sound* pSound);
-void ma_sound_set_position(ma_sound* pSound, float x, float y, float z);
-ma_vec3f ma_sound_get_position(const ma_sound* pSound);
-void ma_sound_set_direction(ma_sound* pSound, float x, float y, float z);
-ma_vec3f ma_sound_get_direction(const ma_sound* pSound);
-void ma_sound_set_velocity(ma_sound* pSound, float x, float y, float z);
-ma_vec3f ma_sound_get_velocity(const ma_sound* pSound);
-void ma_sound_set_attenuation_model(ma_sound* pSound, ma_attenuation_model attenuationModel);
-ma_attenuation_model ma_sound_get_attenuation_model(const ma_sound* pSound);
-void ma_sound_set_positioning(ma_sound* pSound, ma_positioning positioning);
-ma_positioning ma_sound_get_positioning(const ma_sound* pSound);
-void ma_sound_set_rolloff(ma_sound* pSound, float rolloff);
-float ma_sound_get_rolloff(const ma_sound* pSound);
-void ma_sound_set_min_gain(ma_sound* pSound, float minGain);
-float ma_sound_get_min_gain(const ma_sound* pSound);
-void ma_sound_set_max_gain(ma_sound* pSound, float maxGain);
-float ma_sound_get_max_gain(const ma_sound* pSound);
-void ma_sound_set_min_distance(ma_sound* pSound, float minDistance);
-float ma_sound_get_min_distance(const ma_sound* pSound);
-void ma_sound_set_max_distance(ma_sound* pSound, float maxDistance);
-float ma_sound_get_max_distance(const ma_sound* pSound);
-void ma_sound_set_cone(ma_sound* pSound, float innerAngleInRadians, float outerAngleInRadians, float outerGain);
-void ma_sound_get_cone(const ma_sound* pSound, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain);
-void ma_sound_set_doppler_factor(ma_sound* pSound, float dopplerFactor);
-float ma_sound_get_doppler_factor(const ma_sound* pSound);
-void ma_sound_set_directional_attenuation_factor(ma_sound* pSound, float directionalAttenuationFactor);
-float ma_sound_get_directional_attenuation_factor(const ma_sound* pSound);
-void ma_sound_set_fade_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames);
-void ma_sound_set_fade_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds);
-float ma_sound_get_current_fade_volume(ma_sound* pSound);
-void ma_sound_set_start_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames);
-void ma_sound_set_start_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds);
-void ma_sound_set_stop_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames);
-void ma_sound_set_stop_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds);
-ma_bool32 ma_sound_is_playing(const ma_sound* pSound);
-ma_uint64 ma_sound_get_time_in_pcm_frames(const ma_sound* pSound);
-void ma_sound_set_looping(ma_sound* pSound, ma_bool32 isLooping);
-ma_bool32 ma_sound_is_looping(const ma_sound* pSound);
-ma_bool32 ma_sound_at_end(const ma_sound* pSound);
-ma_result ma_sound_seek_to_pcm_frame(ma_sound* pSound, ma_uint64 frameIndex);
-ma_result ma_sound_get_data_format(ma_sound* pSound, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);
-ma_result ma_sound_get_cursor_in_pcm_frames(ma_sound* pSound, ma_uint64* pCursor);
-ma_result ma_sound_get_length_in_pcm_frames(ma_sound* pSound, ma_uint64* pLength);
-ma_result ma_sound_get_cursor_in_seconds(ma_sound* pSound, float* pCursor);
-ma_result ma_sound_get_length_in_seconds(ma_sound* pSound, float* pLength);
+ma_result ma_sound_group_init(ma_engine* pEngine, ma_uint32 flags, ma_sound_group* pParentGroup, ma_sound_group* pGroup);
+ma_result ma_sound_group_init_ex(ma_engine* pEngine, const ma_sound_group_config* pConfig, ma_sound_group* pGroup);
+void ma_sound_group_uninit(ma_sound_group* pGroup);
+ma_engine* ma_sound_group_get_engine(const ma_sound_group* pGroup);
+ma_result ma_sound_group_start(ma_sound_group* pGroup);
+ma_result ma_sound_group_stop(ma_sound_group* pGroup);
+void ma_sound_group_set_volume(ma_sound_group* pGroup, float volume);
+float ma_sound_group_get_volume(const ma_sound_group* pGroup);
+void ma_sound_group_set_pan(ma_sound_group* pGroup, float pan);
+float ma_sound_group_get_pan(const ma_sound_group* pGroup);
+void ma_sound_group_set_pan_mode(ma_sound_group* pGroup, ma_pan_mode panMode);
+ma_pan_mode ma_sound_group_get_pan_mode(const ma_sound_group* pGroup);
+void ma_sound_group_set_pitch(ma_sound_group* pGroup, float pitch);
+float ma_sound_group_get_pitch(const ma_sound_group* pGroup);
+void ma_sound_group_set_spatialization_enabled(ma_sound_group* pGroup, ma_bool32 enabled);
+ma_bool32 ma_sound_group_is_spatialization_enabled(const ma_sound_group* pGroup);
+void ma_sound_group_set_pinned_listener_index(ma_sound_group* pGroup, ma_uint32 listenerIndex);
+ma_uint32 ma_sound_group_get_pinned_listener_index(const ma_sound_group* pGroup);
+ma_uint32 ma_sound_group_get_listener_index(const ma_sound_group* pGroup);
+ma_vec3f ma_sound_group_get_direction_to_listener(const ma_sound_group* pGroup);
+void ma_sound_group_set_position(ma_sound_group* pGroup, float x, float y, float z);
+ma_vec3f ma_sound_group_get_position(const ma_sound_group* pGroup);
+void ma_sound_group_set_direction(ma_sound_group* pGroup, float x, float y, float z);
+ma_vec3f ma_sound_group_get_direction(const ma_sound_group* pGroup);
+void ma_sound_group_set_velocity(ma_sound_group* pGroup, float x, float y, float z);
+ma_vec3f ma_sound_group_get_velocity(const ma_sound_group* pGroup);
+void ma_sound_group_set_attenuation_model(ma_sound_group* pGroup, ma_attenuation_model attenuationModel);
+ma_attenuation_model ma_sound_group_get_attenuation_model(const ma_sound_group* pGroup);
+void ma_sound_group_set_positioning(ma_sound_group* pGroup, ma_positioning positioning);
+ma_positioning ma_sound_group_get_positioning(const ma_sound_group* pGroup);
+void ma_sound_group_set_rolloff(ma_sound_group* pGroup, float rolloff);
+float ma_sound_group_get_rolloff(const ma_sound_group* pGroup);
+void ma_sound_group_set_min_gain(ma_sound_group* pGroup, float minGain);
+float ma_sound_group_get_min_gain(const ma_sound_group* pGroup);
+void ma_sound_group_set_max_gain(ma_sound_group* pGroup, float maxGain);
+float ma_sound_group_get_max_gain(const ma_sound_group* pGroup);
+void ma_sound_group_set_min_distance(ma_sound_group* pGroup, float minDistance);
+float ma_sound_group_get_min_distance(const ma_sound_group* pGroup);
+void ma_sound_group_set_max_distance(ma_sound_group* pGroup, float maxDistance);
+float ma_sound_group_get_max_distance(const ma_sound_group* pGroup);
+void ma_sound_group_set_cone(ma_sound_group* pGroup, float innerAngleInRadians, float outerAngleInRadians, float outerGain);
+void ma_sound_group_get_cone(const ma_sound_group* pGroup, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain);
+void ma_sound_group_set_doppler_factor(ma_sound_group* pGroup, float dopplerFactor);
+float ma_sound_group_get_doppler_factor(const ma_sound_group* pGroup);
+void ma_sound_group_set_directional_attenuation_factor(ma_sound_group* pGroup, float directionalAttenuationFactor);
+float ma_sound_group_get_directional_attenuation_factor(const ma_sound_group* pGroup);
+void ma_sound_group_set_fade_in_pcm_frames(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames);
+void ma_sound_group_set_fade_in_milliseconds(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds);
+float ma_sound_group_get_current_fade_volume(ma_sound_group* pGroup);
+void ma_sound_group_set_start_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames);
+void ma_sound_group_set_start_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds);
+void ma_sound_group_set_stop_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames);
+void ma_sound_group_set_stop_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds);
+ma_bool32 ma_sound_group_is_playing(const ma_sound_group* pGroup);
+ma_uint64 ma_sound_group_get_time_in_pcm_frames(const ma_sound_group* pGroup);