예제 #1
0
파일: Sound.cs 프로젝트: conankzhang/fez
 private void Initialize(byte[] data, ALFormat format, int size, int frequency, float volume, bool looping)
 {
     Sound.InitilizeSoundServices();
     this.bufferID = AL.GenBuffer();
     this.sourceID = AL.GenSource();
     try
     {
         AL.BufferData <byte>(this.bufferID, format, data, size, frequency);
         AL.Source(this.sourceID, ALSourcei.Buffer, this.bufferID);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     this.Volume  = volume;
     this.looping = looping;
 }