≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
play multiple sound in different time
Posted by:
(you are not logged in)
Enter the missing letter in: "I?ternational"
(you are not logged in)
Text:
[quote][b][/b] wrote: [quote][b]newprogrammer24[/b] wrote: hi i use irrKlang for the first time and i have some problems. i want to playing multi sounds in different time . i mean in my game i create engine starting in background .also create interface for winning and loss and for both of them i create new engine . my question is how can i stopped the engine in the background and start another one if the user winning or loss and again stopped the winning or loss engins if the user want to play again !! i did code somthing like this [code] include "include/irrKlang.h" using namespace std; using namespace irrklang; pragma comment(lib, "irrKlang.lib") ISoundEngine* engine = createIrrKlangDevice(); ISoundEngine* engine2 = createIrrKlangDevice(); ISoundEngine* engine3 = createIrrKlangDevice(); void winscreen() { engine->removeSoundSource("pp.mp3"); engine2->play2D("ww.mp3", true, false, true); } void gameoverscreen() { engine->removeSoundSource("pp.mp3"); engine3->play2D("oo.mp3", true, false, true); } void specialKeys(unsigned char key, int x, int y) { if (key == 27) exit(0); else if (key == 'p') {//ask user to play again press p engine3->removeSoundSource("oo.mp3"); engine2->removeSoundSource("ww.mp3"); engine->play2D("pp.mp3", true, false, true); } glutPostRedisplay(); } int main() { glutDisplayFunc(myDisplay); if (!engine) return 0; // error starting up the engine // play sound in the background engine->play2D("pp.mp3", true, false, true); glutMainLoop(); } [/code] the code is run but not very good .it creates Disturbing and interlocking sounds!! any one can help me please ..thanks and sorry for bad english*sad*[/quote][/quote]
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