mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Add ma_seek_origin_end in preparation for future work.
This commit is contained in:
+5
-4
@@ -5404,7 +5404,8 @@ MA_API ma_result ma_audio_buffer_at_end(ma_audio_buffer* pAudioBuffer);
|
||||
typedef enum
|
||||
{
|
||||
ma_seek_origin_start,
|
||||
ma_seek_origin_current
|
||||
ma_seek_origin_current,
|
||||
ma_seek_origin_end /* Not used by decoders. */
|
||||
} ma_seek_origin;
|
||||
|
||||
typedef enum
|
||||
@@ -5426,7 +5427,7 @@ you do your own synchronization.
|
||||
typedef struct ma_decoder ma_decoder;
|
||||
|
||||
typedef size_t (* ma_decoder_read_proc) (ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead); /* Returns the number of bytes read. */
|
||||
typedef ma_bool32 (* ma_decoder_seek_proc) (ma_decoder* pDecoder, int byteOffset, ma_seek_origin origin);
|
||||
typedef ma_bool32 (* ma_decoder_seek_proc) (ma_decoder* pDecoder, int byteOffset, ma_seek_origin origin); /* Origin will never be ma_seek_origin_end. */
|
||||
typedef ma_uint64 (* ma_decoder_read_pcm_frames_proc) (ma_decoder* pDecoder, void* pFramesOut, ma_uint64 frameCount); /* Returns the number of frames read. Output data is in internal format. */
|
||||
typedef ma_result (* ma_decoder_seek_to_pcm_frame_proc) (ma_decoder* pDecoder, ma_uint64 frameIndex);
|
||||
typedef ma_result (* ma_decoder_uninit_proc) (ma_decoder* pDecoder);
|
||||
@@ -5549,8 +5550,8 @@ MA_API ma_result ma_decoder_seek_to_pcm_frame(ma_decoder* pDecoder, ma_uint64 fr
|
||||
Helper for opening and decoding a file into a heap allocated block of memory. Free the returned pointer with ma_free(). On input,
|
||||
pConfig should be set to what you want. On output it will be set to what you got.
|
||||
*/
|
||||
MA_API ma_result ma_decode_file(const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppDataOut);
|
||||
MA_API ma_result ma_decode_memory(const void* pData, size_t dataSize, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppDataOut);
|
||||
MA_API ma_result ma_decode_file(const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut);
|
||||
MA_API ma_result ma_decode_memory(const void* pData, size_t dataSize, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut);
|
||||
|
||||
#endif /* MA_NO_DECODING */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user