示例#1
0
 public ALAudioClip(string id, ISoundData soundData, IALAudioSystem system, IAudioErrors errors, IAudioBackend backend,
                    IBlockingEvent <ISound> onSoundStarted, IBlockingEvent <ISound> onSoundCompleted)
 {
     OnSoundStarted   = onSoundStarted;
     OnSoundCompleted = onSoundCompleted;
     _soundData       = soundData;
     _errors          = errors;
     _backend         = backend;
     ID             = id;
     _buffer        = new Lazy <int> (() => generateBuffer());
     Duration       = getDuration(soundData.DataLength, soundData.Channels, soundData.BitsPerSample, soundData.SampleRate);
     _playingSounds = new AGSConcurrentHashSet <ISound>();
     Tags           = new AGSConcurrentHashSet <string>();
     _system        = system;
     Volume         = 1f;
     Pitch          = 1f;
 }
示例#2
0
 public AGSAudioSettings(IALAudioSystem system, ICrossFading roomMusicCrossFading)
 {
     _system = system;
     RoomMusicCrossFading = roomMusicCrossFading;
 }