Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Issue with XACT after switching to MonoGame version 3.6.0 (and some other audio questions)

$
0
0

@JamieRollo wrote:

Hey everyone

I recently switched my project over from the development version of Monogame (3.5.1.1679) to the stable release version (3.6.0.1625) and I'm having an issue with the following code:

Cue c = soundBank.GetCue(track);
c.SetVariable("Volume", 0.25); // <---"System.IndexOutOfRangeException"

Since switching to 3.6.0, calling "SetVariable" will trigger a System.IndexOutOfRangeException.

The code worked fine on the previous version, it's used to independently control the audio levels of multiple tracks played at the same time to create effects like cross-fades and other transitions.

The game loads all tracks from a single XACT project containing 23 waves.

I also have some general questions about audio for a large project:
* Is there a way to dynamically load waves from a single XACT project? Currently my project uses 700mb of process memory at runtime because it front-loads all the tracks at the start of the game.
* Is this how XACT should be used? Should I be using a separate XACT project for each track?
* Is there a better way of controlling a cue's individual volume?
* Should I even be using XACT for audio in a project that: Has a lot of music, requires multiple tracks to be played at once (with individual volume control), and aims to be cross platform (including consoles)?

I've been searching for ages for good information about using audio in Monogame correctly and I haven't found anything that's talked about these issues.

I'd really appreciate any help you could offer!
Thanks very much,
-Jamie

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles