Exemplo n.º 1
0
 protected AudioBuffer(Resource resource)
 {
     _Resource = resource;
     _isPaused = false;
     _isLooping = false;
     _volume = 0;
 }
Exemplo n.º 2
0
 public SoundProcess(Resource resource, SoundType type, int volume, bool looping)
 {
     _soundResource = resource;
     _volume = volume;
     _isLooping = looping;
     AudioType = type;
     InitializeVolume();
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 5
0
 protected void ResourceLoaded(int size, int item, Resource resource)
 {
     var percent = (int)(((float)item / (float)size) * 100);
     Console.Write(percent + "%");
 }
Exemplo n.º 6
0
 public abstract IAudioBuffer InitAudioBuffer(Resource handle);