protected AudioBuffer(Resource resource) { _Resource = resource; _isPaused = false; _isLooping = false; _volume = 0; }
public SoundProcess(Resource resource, SoundType type, int volume, bool looping) { _soundResource = resource; _volume = volume; _isLooping = looping; AudioType = type; InitializeVolume(); }
public OpenAlAudioBuffer(Int32 bufferId, Int32 sourceId, float length, Resource resource) : base(resource) { BufferId = bufferId; SourceId = sourceId; _length = length; Logger.Debug("OpenAlAudioBuffer Bid:{0}, Sid:{1}", BufferId, SourceId); }
public Resource[] LoadMany(string[] names, Action<int, int, Resource> loadFinish = null, Action<string> startLoad = null) { var size = names.Length; var items = new Resource[size]; for (var i = 0; i < names.Length; i++) { if (startLoad != null) startLoad(names[i]); var resource = Load(names[i]); if (loadFinish != null) loadFinish(size, i + 1, resource); items[i] = resource; } return items; }
protected void ResourceLoaded(int size, int item, Resource resource) { var percent = (int)(((float)item / (float)size) * 100); Console.Write(percent + "%"); }
public abstract IAudioBuffer InitAudioBuffer(Resource handle);