Commit da398fa8 authored by mercury233's avatar mercury233

fix

parent 1375e5f0
diff -r ikpmp3/CIrrKlangAudioStreamMP3.cpp ikpmp3-static/CIrrKlangAudioStreamMP3.cpp
10a11
> #include <algorithm>
diff -r ikpmp3/ikpMP3.cpp ikpmp3-static/ikpMP3.cpp
9,14d8
< // this is the only function needed to be implemented for the plugin, it gets
< // called by irrKlang when loaded.
< // In this plugin, we create an audiostream loader class and register
< // it at the engine, but a plugin can do anything.
< // Be sure to name the function 'irrKlangPluginInit' and let the dll start with 'ikp'.
<
17c11
< __declspec(dllexport) void __stdcall irrKlangPluginInit(ISoundEngine* engine, const char* version)
---
> extern "C" __declspec(dllexport) void ikpMP3Init(ISoundEngine* engine)
20c14
< void irrKlangPluginInit(ISoundEngine* engine, const char* version)
---
> extern "C" void ikpMP3Init(ISoundEngine* engine)
23,32d16
< // do some version security check to be sure that this plugin isn't begin used
< // by some newer irrKlang version with changed interfaces which could possibily
< // cause crashes.
<
< if (strcmp(version, IRR_KLANG_VERSION))
< {
< printf("This MP3 plugin only supports irrKlang version %s, mp3 playback disabled.\n", IRR_KLANG_VERSION);
< return;
< }
<
diff -ur ikpmp3/CIrrKlangAudioStreamMP3.cpp ikpmp3-static/CIrrKlangAudioStreamMP3.cpp
--- ikpmp3/CIrrKlangAudioStreamMP3.cpp 2009-01-02 07:33:40.000000000 +0800
+++ ikpmp3-static/CIrrKlangAudioStreamMP3.cpp 2017-11-27 19:18:34.295546800 +0800
@@ -8,6 +8,7 @@
#include <memory.h>
#include <stdlib.h> // free, malloc and realloc
#include <string.h>
+#include <algorithm>
namespace irrklang
{
diff -ur ikpmp3/ikpMP3.cpp ikpmp3-static/ikpMP3.cpp
--- ikpmp3/ikpMP3.cpp 2007-10-28 18:14:00.000000000 +0800
+++ ikpmp3-static/ikpMP3.cpp 2017-11-27 19:49:02.119092400 +0800
@@ -6,30 +6,14 @@
using namespace irrklang;
-// this is the only function needed to be implemented for the plugin, it gets
-// called by irrKlang when loaded.
-// In this plugin, we create an audiostream loader class and register
-// it at the engine, but a plugin can do anything.
-// Be sure to name the function 'irrKlangPluginInit' and let the dll start with 'ikp'.
-
#ifdef WIN32
// Windows version
-__declspec(dllexport) void __stdcall irrKlangPluginInit(ISoundEngine* engine, const char* version)
+extern "C" __declspec(dllexport) void ikpMP3Init(ISoundEngine* engine)
#else
// Linux version
-void irrKlangPluginInit(ISoundEngine* engine, const char* version)
+extern "C" void ikpMP3Init(ISoundEngine* engine)
#endif
{
- // do some version security check to be sure that this plugin isn't begin used
- // by some newer irrKlang version with changed interfaces which could possibily
- // cause crashes.
-
- if (strcmp(version, IRR_KLANG_VERSION))
- {
- printf("This MP3 plugin only supports irrKlang version %s, mp3 playback disabled.\n", IRR_KLANG_VERSION);
- return;
- }
-
// create and register the loader
CIrrKlangAudioStreamLoaderMP3* loader = new CIrrKlangAudioStreamLoaderMP3();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment