Skip to content

Commit

Permalink
Fix static linking on MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
Macdu committed Feb 14, 2023
1 parent 6a9e00f commit 82767fe
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions C/src/libatrac9.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@
extern "C" {
#endif

#ifdef _MSC_VER
#ifdef COMPILING_DLL
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllimport)
#endif
#else
#define DLLEXPORT
#endif

#define ATRAC9_CONFIG_DATA_SIZE 4

typedef struct {
Expand All @@ -26,13 +16,13 @@ typedef struct {
unsigned char configData[ATRAC9_CONFIG_DATA_SIZE];
} Atrac9CodecInfo;

DLLEXPORT void* Atrac9GetHandle(void);
DLLEXPORT void Atrac9ReleaseHandle(void* handle);
void* Atrac9GetHandle(void);
void Atrac9ReleaseHandle(void* handle);

DLLEXPORT int Atrac9InitDecoder(void* handle, unsigned char *pConfigData);
DLLEXPORT int Atrac9Decode(void* handle, const unsigned char *pAtrac9Buffer, short *pPcmBuffer, int *pNBytesUsed);
int Atrac9InitDecoder(void* handle, unsigned char *pConfigData);
int Atrac9Decode(void* handle, const unsigned char *pAtrac9Buffer, short *pPcmBuffer, int *pNBytesUsed);

DLLEXPORT int Atrac9GetCodecInfo(void* handle, Atrac9CodecInfo *pCodecInfo);
int Atrac9GetCodecInfo(void* handle, Atrac9CodecInfo *pCodecInfo);

#ifdef __cplusplus
}
Expand Down

0 comments on commit 82767fe

Please sign in to comment.