Descent3/acmlib/acmlib.cpp

34 lines
884 B
C++
Raw Normal View History

2024-04-16 03:43:29 +00:00
#include "Adecode.h"
#include "mem.h"
#ifdef __cplusplus
extern "C" {
#endif
2024-04-16 18:56:40 +00:00
AudioDecoder *Create_AudioDecoder(ReadFunction *reader, void *data, unsigned *pChannels, unsigned *pSampleRate,
long *pSampleCount) {
return (AudioDecoder *)mem_malloc(sizeof(AudioDecoder));
2024-04-16 03:43:29 +00:00
}
// Read from audio decoder at most the specified qty of bytes
// (each sample takes two bytes).
// Returns zero when the end of file is reached.
2024-04-16 18:56:40 +00:00
unsigned __cdecl AudioDecoder_Read(AudioDecoder *ad, void *buf, unsigned qty) { return 0; }
2024-04-16 03:43:29 +00:00
// Close audio decoder
2024-04-16 18:56:40 +00:00
void __cdecl AudioDecoder_Close(AudioDecoder *ad) {
if (ad)
mem_free(ad);
2024-04-16 03:43:29 +00:00
}
// Optional interface for supplying your own malloc and free functions
// Default is to use standard malloc and free.
2024-04-16 18:56:40 +00:00
void __cdecl AudioDecoder_MallocFree(ad_malloc *fn_malloc, ad_free *fn_free) {}
2024-04-16 03:43:29 +00:00
#ifdef __cplusplus
};
#endif