Ejemplo n.º 1
0
 public BassStreamPool(int capacity, Form baseForm)
 {
     m_capacity = capacity;
     for (int i = 0; i < capacity; i++) {
         BassStream stream = new BassStream(i, baseForm);
         m_freeStreams.Add(i, stream);
         m_freeStreamStack.Push(stream);
     }
 }
Ejemplo n.º 2
0
 public void Free(BassStream stream)
 {
     lock (this) { // [?Thread] ensure local invariants when altering pool contents
         HoloDebug.Assert(!m_freeStreams.ContainsKey(stream.IdUniqueWithinPool));
         HoloDebug.Assert(m_reservedStreams.ContainsKey(stream.IdUniqueWithinPool));
         m_reservedStreams.Remove(stream.IdUniqueWithinPool);
         // BUGBUG: failure to re-add existing stream here
         m_freeStreams.Add(stream.IdUniqueWithinPool, stream);
         m_freeStreamStack.Push(stream);
     }
 }
Ejemplo n.º 3
0
 public void StreamPoolFree(BassStream bs)
 {
     m_asio.StreamPool.Free(bs);
 }
Ejemplo n.º 4
0
 public void Free(BassStream bassStream)
 {
     m_asio.StreamPool.Free(bassStream);
 }