Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:
Ambiera Forum > irrKlang
Checking if any sound is playing: C Net (Net 2)
Author Text

guppy
Registered User
Quote
2020-07-22 06:04:06

Hi,

I'm using C .Net. (I have to use Version 2 of .dot net).

I have a lot of sounds, hundreds of them.

But I don't want them to play on top of each other ever.


How exactly would I code this in C Net.

if (no other sound is playing)
{
engine.Play2D("bang.wav);
}


Thank from a C begginer!


erik
Registered User
Quote
2020-07-22 08:43:12

You can use
engine.IsCurrentlyPlaying(soundfilename)



guppy
Guest
Quote
2020-07-22 15:35:42

Problem is I'm dealing with 100's of possible file names.

The code seems to suggest I need to specify a specific filename.

Please advise.


erik
Registered User
Quote
2020-07-23 06:45:30

When you play your sound, put the name you play in an array. When you check if there is anything still played, check for all the names in the array. If the engine returns false for such a name, remove the name from that array.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "I?ternational" (you are not logged in)


Text:

 

  

Forum 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