X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Finclude%2Fraop.h;h=01d03eab8b56a177cd0e835ade69a0f1d15284e3;hb=e4169f77f892fefc66a97439d295d3e09ef3e2f0;hp=4eb045c4a7ac9ff3d59798da265cdb37557236b2;hpb=406e97773573c7f8b4d019025e2694b914aca830;p=deb_shairplay.git diff --git a/src/include/raop.h b/src/include/raop.h index 4eb045c..01d03ea 100644 --- a/src/include/raop.h +++ b/src/include/raop.h @@ -1,5 +1,12 @@ #ifndef RAOP_H #define RAOP_H + +#if defined (WIN32) && defined(DLL_EXPORT) +# define RAOP_API __declspec(dllexport) +#else +# define RAOP_API +#endif + #ifdef __cplusplus extern "C" { #endif @@ -8,7 +15,7 @@ typedef struct raop_s raop_t; struct raop_callbacks_s { void* cls; - void (*audio_init)(void *cls, void **session, int bits, int channels, int samplerate); + void* (*audio_init)(void *cls, int bits, int channels, int samplerate); void (*audio_set_volume)(void *cls, void *session, float volume); void (*audio_process)(void *cls, void *session, const void *buffer, int buflen); void (*audio_flush)(void *cls, void *session); @@ -16,13 +23,13 @@ struct raop_callbacks_s { }; typedef struct raop_callbacks_s raop_callbacks_t; -raop_t *raop_init(raop_callbacks_t *callbacks, const char *pemkey); -raop_t *raop_init_from_keyfile(raop_callbacks_t *callbacks, const char *keyfile); +RAOP_API raop_t *raop_init(raop_callbacks_t *callbacks, const char *pemkey); +RAOP_API raop_t *raop_init_from_keyfile(raop_callbacks_t *callbacks, const char *keyfile); -int raop_start(raop_t *raop, unsigned short *port, const char *hwaddr, int hwaddrlen); -void raop_stop(raop_t *raop); +RAOP_API int raop_start(raop_t *raop, unsigned short *port, const char *hwaddr, int hwaddrlen, const char *password); +RAOP_API void raop_stop(raop_t *raop); -void raop_destroy(raop_t *raop); +RAOP_API void raop_destroy(raop_t *raop); #ifdef __cplusplus }