There's no "get channel volume" in XAudio2?!

New releases and general discussions.

Post » Sun Oct 18, 2009 1:03 pm

Really? Isn't that a given? :)

Sorry to be jerky, but isn't that sort of necessary? How do I made any music fade, for instance? I guess a variable , but that's sort of backwards...

I complain a lot.
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Sun Oct 18, 2009 1:47 pm

There's an additional issue I don't know if I'm doing something wrong or not, but with the way I currently did the fade, it fades fine, and I have an action to "stop" that channel when it's quiet anyway. Problem is, then, when I want to start playing that channel again, it was never stopped (rather paused?). So I thought I'd set the position to 0 then, but that in turn seems to disable looping, and there's no action to initiate a loop (but there is one to stop one!)...

Help?
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Sun Oct 18, 2009 2:06 pm

Oops! I actually coded expressions to get a channel's volume, pan and frequency ratio, but didn't add them to the expressions list for some reason! They're added in the next build (or if it's really urgent I can send you the new version).

As for the fade-in - why not just replay the sound again as looping then fade it in from 0?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sun Oct 18, 2009 2:09 pm

The only way to make them restart is to have actions that reload the files into memory again, it seems. It doesn't hiccup the game as it probably remembers the tracks still (or however it works), but I didn't want to do that because of the chance there ARE hiccups (I'm pretty pedantic about it), and it requires an event for each song that can play in a layout. Not a big sacrifice, but a "workaround" nonetheless!

And I'd love to have the file, as I've been planning to enter IGF by Nov 1. That would be awesome!

EDIT: Is it somehow inherent to DirectX to set if a sample loops when you load it, rather than when you play it?
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Sun Oct 18, 2009 5:47 pm

I also found this out a couple of days ago, and I really needed it. Ash, will the new version of the plugin work in 98.9? if so could you pm me the plugin? I'd really appreciate it. :mrgreen:
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests