≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Trying to make a smooth transition/crossfade
Posted by:
(you are not logged in)
Enter the missing letter in: "Int?rnational"
(you are not logged in)
Text:
[quote][b]Darty[/b] wrote: I've rebuild my code to behave differently. I've removed the VolumeFade timer and removed the code to adapt volume of any irrKlang related object. As the song I want to loop is the same, I've edited the audiofile itself to fade in and out. I changed the code to play the track and close to fadelocation play the next, so they "crossfade" nicely without any damage or even sync problems. I was hoping the fading would work by code, but this works for sure. As I'm not creating a musicplayer with crossfade options but just try to continuously play 1 short "looped" music file, this solution works for me. Final code: private void tCrossFade_Tick(object sender, EventArgs e) // 300ms { if (i == 0) // Start Track and set Current irrPlayer. { if (curirr == bgaudio1) { bgaudio1 = irrEngine.Play2D(sBGAudio, false); curirr = bgaudio2; } else if (curirr == bgaudio2) { bgaudio2 = irrEngine.Play2D(sBGAudio, false); curirr = bgaudio1; } } if (i == 78) // CrossFade. { i = -78; if (curirr == bgaudio1) { bgaudio1 = irrEngine.Play2D(sBGAudio, false); curirr = bgaudio2; } else if (curirr == bgaudio2) { bgaudio2 = irrEngine.Play2D(sBGAudio, false); curirr = bgaudio1; } } i++; }[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact