Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
setIsLooped , setIsPaused and isCurrentlyPlaying problems

yaba
Registered User
Quote
2015-04-04 23:39:37

Hello,

I started to use this API in C++ recently and so far i like it so much and its so simple and straight forward to use, however, i'm facing some problems with these functions:

ISound::setIsLooped
ISound::setIsPaused
ISoundEngine:isCurrentlyPlaying


the first two (looped and paused) has no effect when passing false, and the last one (isCurrentlyPlaying) always return true.

There is nothing special in my code its just straight forward, the only things that worth mentioning are:

1. i'm loading sound sources from memory not from file and i'm currently loading wav and mp3 files,

2. i'm using Play3D like this:

loop = true;
irrklang::vec3df position(0, 0, 0);
_soundEngine->play3D(sound->getSoundSource(), position, loop, false, true);

3. I'm playing more than one sound, first i load music and this set to be looped, then i start playing sound effects, when using these functions on sound effects, they behave incorrectly, i'm not sure its because there are multiple sounds played but it shouldnt be since i'm using the corresponding ISound object for the designated effect.

are these known bugs/issues or do i need to make a call to a specific method before calling these functions?

Thanks


erik
Registered User
Quote
2015-04-06 10:20:30

Are you sure you are using it with the correct sound source?
Also, from the docs: "Invoking this method will not have an effect when the sound already has stopped." Maybe that's the problem?

In your sample, you are not getting the ISound pointer, so how are you setting it looped at all?


yaba
Registered User
Quote
2015-04-06 12:46:01

yes i'm sure, i have multimap to fill with name and ISound* which will hold all sound effects, the multimap is populated fine as i can play sounds, but afterwards any operation on any sound will not work even stop().


yaba
Registered User
Quote
2015-04-06 13:03:13

ok fixed this specific problem, the problem was that i start sounds in paused state and in Play method i call Play3D again so this is causing a problem, i changed it to setisPaused(false) to play the sound but now im running into another problem which some sounds are not being able to play when calling setisPaused(false) .

like i start playing some effect then triggering another effect to play, the first effect stops to respond to setisPaused(false) but the second one responds to it fine.


niko
Moderator
Quote
2015-04-08 09:06:39

Hm, I'm not exactly sure what problem is causing this, but be assured that irrKlang is pretty stable as of today, and bugs like this are usually not in there. So I would guess it is likey that your code is causing a problem like this.

Just to be sure: You are aware that the ISound interface is for referencing one, just playing sound? You can influence the sound with that as it is playing, but once it has stopped playing, it is gone and doesn't do anything then anymore. You have to play a new sound for this, and get a new ISound interface for that.


Create reply:


Posted by: (you are not logged in)


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