Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
Isound invalid pointer

klime
Registered User
Quote
2014-10-16 18:53:52

hello all
i'm new with irrklang and i have a probleme with the Isound pointer it's always null here is some code :
void C_reader::loadMusic(QString path)
{
m_sound = m_engine->play2D(path.toStdString().c_str());
if (!m_sound)
{
qDebug()<<"sound not loaded";
}
}

void C_reader::Pause()
{
m_engine->setAllSoundsPaused();
m_pos = m_sound->getPlayPosition();
}

void C_reader::Resume()
{
m_sound->setPlayPosition(m_pos);
}

when loadMusic is called i can hear the sound but when i call Pause() the the program crashes.

debug output :
irrKlang sound library version 1.5.0
Loaded plugin: ikpflac.dll
Loaded plugin: ikpmp3.dll
Using DirectSound8 driver
sound not loaded <<<<<<---- why ??


erik
Registered User
Quote
2014-10-16 19:33:50

Use play2D(path.toStdString().c_str(), false, false, true); instead, otherwise play2D will always return null.


klime
Registered User
Quote
2014-10-16 19:49:29

thanks a lot


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internat?onal" (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