@@ -53,7 +53,11 @@ typedef struct {
53
53
int (* mpg123_open_handle )(mpg123_handle * mh , void * iohandle );
54
54
const char * (* mpg123_plain_strerror )(int errcode );
55
55
void (* mpg123_rates )(const long * * list , size_t * number );
56
+ #if (MPG123_API_VERSION >= 45 ) /* api (but not abi) change as of mpg123-1.26.0 */
57
+ int (* mpg123_read )(mpg123_handle * mh , void * outmemory , size_t outmemsize , size_t * done );
58
+ #else
56
59
int (* mpg123_read )(mpg123_handle * mh , unsigned char * outmemory , size_t outmemsize , size_t * done );
60
+ #endif
57
61
int (* mpg123_replace_reader_handle )( mpg123_handle * mh , MIX_SSIZE_T (* r_read ) (void * , void * , size_t ), off_t (* r_lseek )(void * , off_t , int ), void (* cleanup )(void * ) );
58
62
off_t (* mpg123_seek )( mpg123_handle * mh , off_t sampleoff , int whence );
59
63
off_t (* mpg123_tell )( mpg123_handle * mh );
@@ -100,7 +104,11 @@ static int MPG123_Load(void)
100
104
FUNCTION_LOADER (mpg123_open_handle , int (* )(mpg123_handle * mh , void * iohandle ))
101
105
FUNCTION_LOADER (mpg123_plain_strerror , const char * (* )(int errcode ))
102
106
FUNCTION_LOADER (mpg123_rates , void (* )(const long * * list , size_t * number ))
107
+ #if (MPG123_API_VERSION >= 45 ) /* api (but not abi) change as of mpg123-1.26.0 */
108
+ FUNCTION_LOADER (mpg123_read , int (* )(mpg123_handle * mh , void * outmemory , size_t outmemsize , size_t * done ))
109
+ #else
103
110
FUNCTION_LOADER (mpg123_read , int (* )(mpg123_handle * mh , unsigned char * outmemory , size_t outmemsize , size_t * done ))
111
+ #endif
104
112
FUNCTION_LOADER (mpg123_replace_reader_handle , int (* )( mpg123_handle * mh , MIX_SSIZE_T (* r_read ) (void * , void * , size_t ), off_t (* r_lseek )(void * , off_t , int ), void (* cleanup )(void * ) ))
105
113
FUNCTION_LOADER (mpg123_seek , off_t (* )( mpg123_handle * mh , off_t sampleoff , int whence ))
106
114
FUNCTION_LOADER (mpg123_tell , off_t (* )( mpg123_handle * mh ))
0 commit comments