Пример #1
0
 public SDL2HardwareDeviceSession(SDL2HardwareDeviceDriver driver, IVirtualMemoryManager memoryManager, SampleFormat requestedSampleFormat, uint requestedSampleRate, uint requestedChannelCount, float requestedVolume) : base(memoryManager, requestedSampleFormat, requestedSampleRate, requestedChannelCount)
 {
     _driver = driver;
     _updateRequiredEvent = _driver.GetUpdateRequiredEvent();
     _queuedBuffers       = new ConcurrentQueue <SDL2AudioBuffer>();
     _ringBuffer          = new DynamicRingBuffer();
     _callbackDelegate    = Update;
     _bytesPerFrame       = BackendHelper.GetSampleSize(RequestedSampleFormat) * (int)RequestedChannelCount;
     _nativeSampleFormat  = SDL2HardwareDeviceDriver.GetSDL2Format(RequestedSampleFormat);
     _sampleCount         = uint.MaxValue;
     _started             = false;
     _volume = requestedVolume;
 }