Are simultaneous music tracks possible?

Started by antipus, Wed 24/08/2011 03:10:47

Previous topic - Next topic

antipus

I've been toying with a fun idea for a project, and I'm wondering if it's possible to play two music tracks at the same time, synched with each other, on separate channels, say.

On top of that, can I control the volume of each channel independently?

The real idea is to have a major and a minor version of the same song seamlessly fade in and out of each other without restarting the music each time the fade occurs.

I'm using AGS v3.1.2, but I saw that the new version has totally reworked the way music is handled.  Could it do this, perhaps?

The closest I could come is having one track play with "PlayAmbientSound", but any fadeout of the sound volume kills all the other sound effects...   Hrm... :-\
Playing Arden's Vale has been shown to improve morale, revive unconscious kittens, and reverse hair loss.

monkey0506

The new-style audio system actually makes things much nicer I think, but there are functions such as SetChannelVolume and PlaySoundEx which would allow you to achieve what you're looking for (using sounds instead of music files). The new audio system would allow you to change the maximum number of simultaneous music files, or even create an entirely new audio type for those tracks.

Read up on those functions (or if you did want to upgrade, AudioClip.Play and AudioChannel.Volume), and let us know if you still need help figuring things out. It seems like it shouldn't be too difficult though.

Radiant

Yes, this is possible with channel volumes, although it gives some performance issues on older computers.

SMF spam blocked by CleanTalk