I have read through various threads on how to add music, crossfading, fading in/out etc, but am not having any luck, alot of the posts use old/obsolete commands, others seem overcomplicated when crossfading sis supposed to be automatic. I thought its best to post my requirements here and see what methods people suggest while I keep trying.
I have 2 main music tracks, 1 is a fading in intro. The 2nd is an infinitely looping version.
Basically, I want seamless music, but to fade in initially so I need to either...
1 - bring in 'aIntro' for a one-shot then seamlessly jump to 'alooping' which will play on repeat. - So far if i set up 1 channel music, have 'aIntro.Play' and 'aLooping.playQueued, it doesnt crossfade, i hear a pop in between where it stops one and plays the next. If I set up 2 audio channels, both tunes play at once.
Once the looping one plays its working seamless, so I know the audio file itself is ok. Also if I combine the looping and intro in my sound editor its perfectly seamless again.
2 - the standard music will be playing permanently, I want to be able to stop it, play an alternate version of 'aIntro' which will be something like 'aShock' (when he walks into a room where the situation requires brief shock and horror type music), then it will seamlessly change back to the regular 'aLooping' - Once the first issue is sorted, this one will use the exact same method.
im using ogg if that has any effect?
**EDIT**Used a temporary fix (still getting slight crackle where the tracks join so if you know a better/proper way to do this please let me know.)
- I used 2 music channels
- added a silent track the exact length of 'aIntro'
- In my audio editor I added the first second of 'aLooping' and faded that extra second out.
Quotefunction room_AfterFadeIn()
{
aIntroFadeOut.PlayQueued();
aSilence.PlayQueued();
aAmbience_loop.PlayQueued();
}