mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 08:14:04 +02:00
Minor restructure.
This commit is contained in:
+26
-26
@@ -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_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_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
|
#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);
|
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
|
#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_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_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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#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)
|
static ma_result ma_engine_sound_detach(ma_engine* pEngine, ma_sound* pSound)
|
||||||
{
|
{
|
||||||
ma_sound_group* pGroup;
|
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
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user