103 |
* Returns -1 if command queue or pickup pool is full, 0 on success (will be |
* Returns -1 if command queue or pickup pool is full, 0 on success (will be |
104 |
* called by audio thread within the voice class). |
* called by audio thread within the voice class). |
105 |
*/ |
*/ |
106 |
int DiskThread::OrderNewStream(Stream::reference_t* pStreamRef, ::gig::Sample* pSample, unsigned long SampleOffset, bool DoLoop) { |
int DiskThread::OrderNewStream(Stream::reference_t* pStreamRef, ::gig::DimensionRegion* pDimRgn, unsigned long SampleOffset, bool DoLoop) { |
107 |
dmsg(4,("Disk Thread: new stream ordered\n")); |
dmsg(4,("Disk Thread: new stream ordered\n")); |
108 |
if (CreationQueue->write_space() < 1) { |
if (CreationQueue->write_space() < 1) { |
109 |
dmsg(1,("DiskThread: Order queue full!\n")); |
dmsg(1,("DiskThread: Order queue full!\n")); |
125 |
cmd.OrderID = pStreamRef->OrderID; |
cmd.OrderID = pStreamRef->OrderID; |
126 |
cmd.hStream = pStreamRef->hStream; |
cmd.hStream = pStreamRef->hStream; |
127 |
cmd.pStreamRef = pStreamRef; |
cmd.pStreamRef = pStreamRef; |
128 |
cmd.pSample = pSample; |
cmd.pDimRgn = pDimRgn; |
129 |
cmd.SampleOffset = SampleOffset; |
cmd.SampleOffset = SampleOffset; |
130 |
cmd.DoLoop = DoLoop; |
cmd.DoLoop = DoLoop; |
131 |
|
|
276 |
std::cerr << "No unused stream found (OrderID:" << Command.OrderID << ") - report if this happens, this is a bug!\n" << std::flush; |
std::cerr << "No unused stream found (OrderID:" << Command.OrderID << ") - report if this happens, this is a bug!\n" << std::flush; |
277 |
return; |
return; |
278 |
} |
} |
279 |
newstream->Launch(Command.hStream, Command.pStreamRef, Command.pSample, Command.SampleOffset, Command.DoLoop); |
newstream->Launch(Command.hStream, Command.pStreamRef, Command.pDimRgn, Command.SampleOffset, Command.DoLoop); |
280 |
dmsg(4,("new Stream launched by disk thread (OrderID:%d,StreamHandle:%d)\n", Command.OrderID, Command.hStream)); |
dmsg(4,("new Stream launched by disk thread (OrderID:%d,StreamHandle:%d)\n", Command.OrderID, Command.hStream)); |
281 |
if (pCreatedStreams[Command.OrderID] != SLOT_RESERVED) { |
if (pCreatedStreams[Command.OrderID] != SLOT_RESERVED) { |
282 |
std::cerr << "DiskThread: Slot " << Command.OrderID << " already occupied! Please report this!\n" << std::flush; |
std::cerr << "DiskThread: Slot " << Command.OrderID << " already occupied! Please report this!\n" << std::flush; |