Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
irrKlang with QT. play2D crashes

bfisch1983
Registered User
Quote
2014-05-19 20:12:29

I am trying to use IrrKlang 1.5.0 (32 bit) within Qt Creator 2.4.1 (32 bit) on a core I7 PC with Windows 7 Home premium OS. I am able to create a sound device and call some functions like getDriverName() but calling play2D() causes a crash. My debug output shows the following:

irrKlang sound library version 1.5.0
Loaded plugin: ikpflac.dll
Loaded plugin: ikpmp3.dll
Using DirectSound8 driver
Could not open sound file: ºaغaÀ/‡


My pro file includes the following

LIBS += -L$$PWD/irrKlang_1_5_0/lib/Win32-gcc/ -lirrKlang
INCLUDEPATH += $$PWD/irrKlang_1_5_0/lib/Win32-gcc
INCLUDEPATH += $$PWD/irrKlang_1_5_0/bin/Win32-gcc
INCLUDEPATH += $$PWD/irrKlang_1_5_0/include
HEADERS += \
irrKlang_1_5_0/include/irrKlang.h


my main.cpp is as follows


include <iostream>
include <irrKlang_1_5_0/include/irrKlang.h>
using namespace std;
using namespace irrklang;
int main()
{
char i;
cout << "Hello World!" << endl;
ISoundEngine* engine = createIrrKlangDevice();
if (!engine)
return 0;
engine->play2D("drwhotheme.ogg");
while(i != 'q')
{
std::cin >> i; // wait for user to press some key
}
return 0;
}

I have tried entering the direct path to the music file with formats like “C://text//of//path”, “C:/text/of/path”, “C:\\text\\of\\path”, and “C:\text\of\path” just to be safe. I have tried placing the music in my executable folder and calling it like the above code. I have tried an mp3 file. Finally I tried entering a bogus file name I knew was wrong, and the error is always the same. The error makes me think a pointer went off in the weeds, but I don’t know what would cause that.

When I open a terminal and go here C:\QtSDK\Symbian\tools\sbs\win32\mingw\bin and type gcc –version and mingw-gcc –version. It looks like I have version 3.4.5. This seems to be old even though I checked for updates through the qt creator program. Could the gcc version be my problem or does anyone see something else that I am doing wrong? I had read that newer versions of gcc have caused issues. I should also add that I click on the precompiled demo executables for irrKlang and those programs work fine.


erik
Registered User
Quote
2014-05-19 20:51:11

The developers of the mingw gcc broke binary compatibility, so an old 3.4 gcc will not work anymore with the new irrKlang. Use an older irrKlang version (like 1.4), that should work.


bfisch1983
Registered User
Quote
2014-05-19 23:15:46

Thanks Erik. That fixed things. I had originally started with 1.4 but was having other issues with my library setup and switched to 1.5 in an effort to fix them. Now that I fixed those issues, switching back to 1.4 fixed my current issue as well.

So it looks like an old gcc has to go with 1.4 or before where as the newer gcc has to go with irrklang 1.5. I was hoping since 1.5 was newer it would be backward compatible with older gcc compilers.

Other than 64 bit support is there a strong reason to switch to irrklang 1.5 and try to upgrade my compiler?


niko
Moderator
Quote
2014-05-20 07:11:08

No strong reason. If you can live without unicode support [which 99% of all users have been for the last years :)], then everything should be fine.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inte?national" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact