Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
Can't Multithread irrKlang

User
Guest
Quote
2023-05-24 20:48:25

I'm trying to build a music player. I've got most of the things sorted out except for autoplay. I want to use the End events irrKlang offers, but if I set the engine to multithreaded, start it and play a song, I hear silence and occasional hisses or beeps.

I just use the following to start it:
`ISoundEngine* engine = CreateIrrKlangDevice(ESOD_AUTO_DETECT, ESEO_MULTI_THREADED);`


User
Guest
Quote
2023-05-24 21:25:18

Edit: Sometimes it does play, sometimes it does not. Creating end events seems to also crash it though.


erik
Registered User
Quote
2023-05-25 09:32:05

From what I remember, you need to access all irrKlang functionaliy from the same thread from where you called CreateIrrKlangDevice()


User
Guest
Quote
2023-05-25 12:58:46

The program itself is single-threaded, so I'm calling everything from the main thread. It's just the engine that's multi-threaded on creation.


User
Guest
Quote
2023-05-25 12:59:45

And even then, I have called irrKlang from other threads before and it worked just fine. The engine wasn't multithreaded when I was doing that though.


User
Guest
Quote
2023-05-25 13:07:15

I solved the end event crash issue by adding the if statement that I removed because I thought it was unnecessary. The playback bug is still there though.


User
Guest
Quote
2023-05-26 13:11:09

Update: WAV files play fine.


Create reply:


Posted by: (you are not logged in)


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