≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Fading
Posted by:
(you are not logged in)
Enter the missing letter in: "Internatio?al"
(you are not logged in)
Text:
[quote][b][/b] wrote: Hi I use the System.Threading.Timer class to fade sounds out. You kick off the timer to invoke a call back function at required intervals e.g. 1/10th second and in the call back function reduce the volume by a small amount each time so that you get a smooth async fade out. Because it is based on timers you can have 10 of them running at same time so get all tracks fading out at the same time. I have encapsulated this functionality into one c class called VolumeController so that can easily implement a fade using just one method: ChangeVolume(ISound audioTrack, float targetVolume, int timeInterval) This will change volume of the ISound object from current value to targetVolume (range 0 to 1.0) in the timeInterval specified (in milliseconds). Can be used to fade volume up and down. Will also fire an event to notify that volume change has completed. I am more than happy to send this code to you - its well tested and might save you some time and effort. Email me at odwyercm@eircom.net and I will send on. Conor[/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