1 #pragma once
2 #define ZMUSIC_INTERNAL
3 
4 #ifdef _MSC_VER
5 #define DLL_EXPORT __declspec(dllexport)
6 #define DLL_IMPORT __declspec(dllexport)	// without this the compiler complains.
7 #else // !_MSC_VER
8 #define DLL_EXPORT
9 #define DLL_IMPORT
10 #endif // _MSC_VER
11 
12 typedef class MIDISource *ZMusic_MidiSource;
13 typedef class MusInfo *ZMusic_MusicStream;
14 
15 // Build two configurations - lite and full.
16 // Lite only  uses FluidSynth for MIDI playback and is licensed under the LGPL v2.1
17 // Full uses all MIDI synths and is licensed under the GPL v3.
18 
19 #ifndef ZMUSIC_LITE
20 #define HAVE_GUS		// legally viable but not really useful
21 #define HAVE_TIMIDITY	// GPL v2.0
22 #define HAVE_OPL		// GPL v3.0
23 #define HAVE_ADL		// GPL v3.0
24 #define HAVE_OPN		// GPL v3.0
25 #define HAVE_WILDMIDI	// LGPL v3.0
26 #endif
27 
28 #include "zmusic.h"
29 #include "fileio.h"
30 
31 void SetError(const char *text);
32 
33 struct CustomFileReader : public MusicIO::FileInterface
34 {
35 	ZMusicCustomReader* cr;
36 
CustomFileReaderCustomFileReader37 	CustomFileReader(ZMusicCustomReader* zr) : cr(zr) {}
getsCustomFileReader38 	virtual char* gets(char* buff, int n) { return cr->gets(cr, buff, n); }
readCustomFileReader39 	virtual long read(void* buff, int32_t size) { return cr->read(cr, buff, size); }
seekCustomFileReader40 	virtual long seek(long offset, int whence) { return cr->seek(cr, offset, whence); }
tellCustomFileReader41 	virtual long tell() { return cr->tell(cr); }
closeCustomFileReader42 	virtual void close()
43 	{
44 		cr->close(cr);
45 		delete this;
46 	}
47 
48 };
49 
50 
51 void ZMusic_Printf(int type, const char* msg, ...);
52