예제 #1
0
 protected AudioBuffer(Resource resource)
 {
     _Resource = resource;
     _isPaused = false;
     _isLooping = false;
     _volume = 0;
 }
예제 #2
0
 public SoundProcess(Resource resource, SoundType type, int volume, bool looping)
 {
     _soundResource = resource;
     _volume = volume;
     _isLooping = looping;
     AudioType = type;
     InitializeVolume();
 }
예제 #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);
 }
예제 #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;
 }
예제 #5
0
 protected void ResourceLoaded(int size, int item, Resource resource)
 {
     var percent = (int)(((float)item / (float)size) * 100);
     Console.Write(percent + "%");
 }
예제 #6
0
파일: Audio.cs 프로젝트: makesj/vienna
 public abstract IAudioBuffer InitAudioBuffer(Resource handle);