mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Make some sound functions const.
Public issue https://github.com/mackron/miniaudio/issues/990
This commit is contained in:
+10
-10
@@ -11449,11 +11449,11 @@ MA_API ma_bool32 ma_sound_is_looping(const ma_sound* pSound);
|
|||||||
MA_API ma_bool32 ma_sound_at_end(const ma_sound* pSound);
|
MA_API ma_bool32 ma_sound_at_end(const ma_sound* pSound);
|
||||||
MA_API ma_result ma_sound_seek_to_pcm_frame(ma_sound* pSound, ma_uint64 frameIndex); /* Just a wrapper around ma_data_source_seek_to_pcm_frame(). */
|
MA_API ma_result ma_sound_seek_to_pcm_frame(ma_sound* pSound, ma_uint64 frameIndex); /* Just a wrapper around ma_data_source_seek_to_pcm_frame(). */
|
||||||
MA_API ma_result ma_sound_seek_to_second(ma_sound* pSound, float seekPointInSeconds); /* Abstraction to ma_sound_seek_to_pcm_frame() */
|
MA_API ma_result ma_sound_seek_to_second(ma_sound* pSound, float seekPointInSeconds); /* Abstraction to ma_sound_seek_to_pcm_frame() */
|
||||||
MA_API 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_API ma_result ma_sound_get_data_format(const ma_sound* pSound, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);
|
||||||
MA_API ma_result ma_sound_get_cursor_in_pcm_frames(ma_sound* pSound, ma_uint64* pCursor);
|
MA_API ma_result ma_sound_get_cursor_in_pcm_frames(const ma_sound* pSound, ma_uint64* pCursor);
|
||||||
MA_API ma_result ma_sound_get_length_in_pcm_frames(ma_sound* pSound, ma_uint64* pLength);
|
MA_API ma_result ma_sound_get_length_in_pcm_frames(const ma_sound* pSound, ma_uint64* pLength);
|
||||||
MA_API ma_result ma_sound_get_cursor_in_seconds(ma_sound* pSound, float* pCursor);
|
MA_API ma_result ma_sound_get_cursor_in_seconds(const ma_sound* pSound, float* pCursor);
|
||||||
MA_API ma_result ma_sound_get_length_in_seconds(ma_sound* pSound, float* pLength);
|
MA_API ma_result ma_sound_get_length_in_seconds(const ma_sound* pSound, float* pLength);
|
||||||
MA_API ma_result ma_sound_set_end_callback(ma_sound* pSound, ma_sound_end_proc callback, void* pUserData);
|
MA_API ma_result ma_sound_set_end_callback(ma_sound* pSound, ma_sound_end_proc callback, void* pUserData);
|
||||||
|
|
||||||
MA_API ma_result ma_sound_group_init(ma_engine* pEngine, ma_uint32 flags, ma_sound_group* pParentGroup, ma_sound_group* pGroup);
|
MA_API ma_result ma_sound_group_init(ma_engine* pEngine, ma_uint32 flags, ma_sound_group* pParentGroup, ma_sound_group* pGroup);
|
||||||
@@ -79291,7 +79291,7 @@ MA_API ma_result ma_sound_seek_to_second(ma_sound* pSound, float seekPointInSeco
|
|||||||
return ma_sound_seek_to_pcm_frame(pSound, frameIndex);
|
return ma_sound_seek_to_pcm_frame(pSound, frameIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
MA_API 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_API ma_result ma_sound_get_data_format(const ma_sound* pSound, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)
|
||||||
{
|
{
|
||||||
if (pSound == NULL) {
|
if (pSound == NULL) {
|
||||||
return MA_INVALID_ARGS;
|
return MA_INVALID_ARGS;
|
||||||
@@ -79324,7 +79324,7 @@ MA_API ma_result ma_sound_get_data_format(ma_sound* pSound, ma_format* pFormat,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MA_API ma_result ma_sound_get_cursor_in_pcm_frames(ma_sound* pSound, ma_uint64* pCursor)
|
MA_API ma_result ma_sound_get_cursor_in_pcm_frames(const ma_sound* pSound, ma_uint64* pCursor)
|
||||||
{
|
{
|
||||||
ma_uint64 seekTarget;
|
ma_uint64 seekTarget;
|
||||||
|
|
||||||
@@ -79346,7 +79346,7 @@ MA_API ma_result ma_sound_get_cursor_in_pcm_frames(ma_sound* pSound, ma_uint64*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MA_API ma_result ma_sound_get_length_in_pcm_frames(ma_sound* pSound, ma_uint64* pLength)
|
MA_API ma_result ma_sound_get_length_in_pcm_frames(const ma_sound* pSound, ma_uint64* pLength)
|
||||||
{
|
{
|
||||||
if (pSound == NULL) {
|
if (pSound == NULL) {
|
||||||
return MA_INVALID_ARGS;
|
return MA_INVALID_ARGS;
|
||||||
@@ -79360,7 +79360,7 @@ MA_API ma_result ma_sound_get_length_in_pcm_frames(ma_sound* pSound, ma_uint64*
|
|||||||
return ma_data_source_get_length_in_pcm_frames(pSound->pDataSource, pLength);
|
return ma_data_source_get_length_in_pcm_frames(pSound->pDataSource, pLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
MA_API ma_result ma_sound_get_cursor_in_seconds(ma_sound* pSound, float* pCursor)
|
MA_API ma_result ma_sound_get_cursor_in_seconds(const ma_sound* pSound, float* pCursor)
|
||||||
{
|
{
|
||||||
ma_result result;
|
ma_result result;
|
||||||
ma_uint64 cursorInPCMFrames;
|
ma_uint64 cursorInPCMFrames;
|
||||||
@@ -79386,7 +79386,7 @@ MA_API ma_result ma_sound_get_cursor_in_seconds(ma_sound* pSound, float* pCursor
|
|||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
MA_API ma_result ma_sound_get_length_in_seconds(ma_sound* pSound, float* pLength)
|
MA_API ma_result ma_sound_get_length_in_seconds(const ma_sound* pSound, float* pLength)
|
||||||
{
|
{
|
||||||
if (pSound == NULL) {
|
if (pSound == NULL) {
|
||||||
return MA_INVALID_ARGS;
|
return MA_INVALID_ARGS;
|
||||||
|
|||||||
Reference in New Issue
Block a user