Base class for asynchronous loading operations. Request a loading operation from the GATAudioLoader singleton, configure, and add to it's operation queue ( QueueOperation method ). One operation can load multiple files. Operation objects are one use only.
Example #1
0
 /// <summary>
 /// The operation queue is serial: queued operations
 /// will be executed one by one.
 /// </summary>
 public void EnqueueOperation(AGATLoadingOperation operation)
 {
     if (_bw == null)
     {
         SetupWorker();
         _currentOperation = ( LoadingOperation )operation;
         _currentOperation.OperationWillStart();
         _bw.RunWorkerAsync(_currentOperation);
     }
     else
     {
         _pendingOperations.Enqueue(( LoadingOperation )operation);
     }
 }
Example #2
0
 /// <summary>
 /// The operation queue is serial: queued operations
 /// will be executed one by one.
 /// </summary>
 public void EnqueueOperation( AGATLoadingOperation operation )
 {
     if( _bw == null )
     {
         SetupWorker();
         _currentOperation = ( LoadingOperation )operation;
         _currentOperation.OperationWillStart();
         _bw.RunWorkerAsync( _currentOperation );
     }
     else
     {
         _pendingOperations.Enqueue( ( LoadingOperation )operation );
     }
 }