Add function to set tracks for AaruFormat image context with validation and memory management

This commit is contained in:
2025-10-03 13:29:46 +01:00
parent c0934b339d
commit 32dd752519
2 changed files with 127 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
#include "sha256.h"
#include "simd.h"
#include "spamsum.h"
#include "structs/optical.h"
#ifdef __cplusplus
#define EXTERNC extern "C"
#else
@@ -84,6 +85,7 @@ AARU_EXPORT void AARU_CALL aaruf_crc64_slicing(uint64_t *previous_crc, con
AARU_EXPORT uint64_t AARU_CALL aaruf_crc64_data(const uint8_t *data, uint32_t len);
AARU_EXPORT int32_t AARU_CALL aaruf_get_tracks(const void *context, uint8_t *buffer, size_t *length);
AARU_EXPORT int32_t AARU_CALL aaruf_set_tracks(void *context, TrackEntry *tracks, const int count);
AARU_EXPORT int32_t AARU_CALL aaruf_read_sector(void *context, uint64_t sector_address, bool negative, uint8_t *data,
uint32_t *length);