Commit dcb2b0ba authored by David Reid's avatar David Reid

Minor restructure.

parent 1f89b003
......@@ -967,6 +967,9 @@ MA_API ma_result ma_engine_stop(ma_engine* pEngine);
MA_API ma_result ma_engine_set_volume(ma_engine* pEngine, float volume);
MA_API ma_result ma_engine_set_gain_db(ma_engine* pEngine, float gainDB);
MA_API ma_result ma_engine_listener_set_position(ma_engine* pEngine, ma_vec3 position);
MA_API ma_result ma_engine_listener_set_rotation(ma_engine* pEngine, ma_quat rotation);
#ifndef MA_NO_RESOURCE_MANAGER
MA_API ma_result ma_engine_sound_init_from_file(ma_engine* pEngine, const char* pFilePath, ma_uint32 flags, ma_async_notification* pNotification, ma_sound_group* pGroup, ma_sound* pSound);
#endif
......@@ -1009,9 +1012,6 @@ MA_API ma_result ma_engine_sound_group_set_start_delay(ma_engine* pEngine, ma_so
MA_API ma_result ma_engine_sound_group_set_stop_delay(ma_engine* pEngine, ma_sound_group* pGroup, ma_uint64 delayInMilliseconds);
MA_API ma_result ma_engine_sound_group_get_time_in_frames(ma_engine* pEngine, const ma_sound_group* pGroup, ma_uint64* pTimeInFrames);
MA_API ma_result ma_engine_listener_set_position(ma_engine* pEngine, ma_vec3 position);
MA_API ma_result ma_engine_listener_set_rotation(ma_engine* pEngine, ma_quat rotation);
#ifdef __cplusplus
}
#endif
......@@ -5728,6 +5728,29 @@ MA_API ma_result ma_engine_set_gain_db(ma_engine* pEngine, float gainDB)
}
MA_API ma_result ma_engine_listener_set_position(ma_engine* pEngine, ma_vec3 position)
{
if (pEngine == NULL) {
return MA_INVALID_ARGS;
}
pEngine->listener.position = position;
return MA_SUCCESS;
}
MA_API ma_result ma_engine_listener_set_rotation(ma_engine* pEngine, ma_quat rotation)
{
if (pEngine == NULL) {
return MA_INVALID_ARGS;
}
pEngine->listener.rotation = rotation;
return MA_SUCCESS;
}
static ma_result ma_engine_sound_detach(ma_engine* pEngine, ma_sound* pSound)
{
ma_sound_group* pGroup;
......@@ -6702,27 +6725,4 @@ MA_API ma_result ma_engine_sound_group_get_time_in_frames(ma_engine* pEngine, co
}
MA_API ma_result ma_engine_listener_set_position(ma_engine* pEngine, ma_vec3 position)
{
if (pEngine == NULL) {
return MA_INVALID_ARGS;
}
pEngine->listener.position = position;
return MA_SUCCESS;
}
MA_API ma_result ma_engine_listener_set_rotation(ma_engine* pEngine, ma_quat rotation)
{
if (pEngine == NULL) {
return MA_INVALID_ARGS;
}
pEngine->listener.rotation = rotation;
return MA_SUCCESS;
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment