XAudio2 volume

For questions about using Classic.

Post » Sat Oct 11, 2008 11:43 pm

How does it work? I've been experimenting with sound and I don't quite understand the decibel level settings. I set the volume to 0 and I can still hear the sound :?

I had to set my volume to -100 to mute it, but that seems a little strange. What exactly is the range for the volume on this thing?
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Oct 11, 2008 11:58 pm


Oh its like "Add to private variable"
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Sun Oct 12, 2008 12:49 am

[quote="deadeye":37e6nihv]How does it work? I've been experimenting with sound and I don't quite understand the decibel level settings. I set the volume to 0 and I can still hear the sound :?

I had to set my volume to -100 to mute it, but that seems a little strange. What exactly is the range for the volume on this thing?[/quote:37e6nihv]

Decibels are a logaritmic scale work so that minus inifinte means "no sound"... Or that's what I think. I have no clue how it really works in XAudio2, though :P...
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Sun Oct 12, 2008 1:24 am

[quote="Doppel":7illrodm]Oh its like "Add to private variable"[/quote:7illrodm]

Yeah I thought so after messing with it a bit, but a "Set channel volume to 10" action that's repeated over and over doesn't make it any louder.

http://www.fileshack.us/get_file.php?id ... meTest.cap
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Oct 12, 2008 4:19 am

B
3
G
4
Posts: 21
Reputation: 1,142

Post » Sun Oct 12, 2008 5:15 am

how do you stop a music from playing so you can play a different one? Xaudio isn't complete yet but is there a way to do that?
B
2
S
1
G
4
Posts: 239
Reputation: 1,778

Post » Sun Oct 12, 2008 6:01 am

[quote="flud":2zya1d8p]set volume to 100 its too big[/quote:2zya1d8p]

Uh, no.

I tried 50 and nearly blew my speakers out, thanks.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Oct 12, 2008 2:03 pm

If you've ever seen a mixing desk, the faders range from negative infinity up to zero near the top, then usually up to about +10 so a channel can be slightly boosted too. XAudio2 works similarly: a volume of -10 dB reduces the volume, like moving the fader on a desk down. Directsound actually worked like this, but adding 100 to everything (so 100 became unchanged level, 0 became -100 dB). So an XAudio2 volume of -100 does in fact correspond to Directsound volume 0 (but XAudio2 can go even lower and do boosts too). I think I need to add a 'Set muted' for channels though...

Yeah, and be careful with really high boosts because it'll clip really badly and distort :?

To play a different music, call the 'Play music from file' action again. It should replace the music.
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,228

Post » Sun Oct 12, 2008 2:23 pm

Awesome, thanks Ashley :)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Oct 12, 2008 10:40 pm

when I do the play musuc from resource it just plays both the songs at the same time :(
B
2
S
1
G
4
Posts: 239
Reputation: 1,778

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests