Changeset 483 for OCO/trunk/drv16/dwavestrm.cpp
- Timestamp:
- May 6, 2010, 3:08:34 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OCO/trunk/drv16/dwavestrm.cpp
r478 r483 44 44 45 45 pStream = (PDWAVESTREAM)FindStream_fromFile(ulSysFileNum); 46 if (pStream == NULL) 46 if (pStream == NULL) 47 47 { 48 48 dprintf(("HookHandler stream %lx not found!", (ULONG) ulSysFileNum)); … … 124 124 if(temp) 125 125 { 126 if(ulStreamState == STREAM_STREAMING) 126 if(ulStreamState == STREAM_STREAMING) 127 127 {//means we're called during an interrupt 128 128 qhReturn.PushOnTail((PQUEUEELEMENT)temp); 129 129 DevHelp_ArmCtxHook(ulSysFileNum, hCtxHook); 130 130 } 131 else 131 else 132 132 { 133 133 DevHelp_VMFree((LIN)temp->pBuffptr); … … 143 143 hSem = pReg->hStream; 144 144 145 #ifdef DEBUG 145 146 dprintf(("DWAVESTREAM::Register")); 147 #endif 146 148 if(DevHelp_OpenEventSem(hSem) != 0) { 147 149 dprintf(("DevHlp_OpenEventSem %lx failed!", hSem)); … … 166 168 ULONG DWAVESTREAM::StartStream(void) 167 169 { 168 dprintf(("DWAVESTREAM::StartStream")); 169 return WAVESTREAM::StartStream(); 170 #ifdef DEBUG 171 dprintf(("DWAVESTREAM::StartStream")); 172 #endif 173 return WAVESTREAM::StartStream(); 170 174 } 171 175 //***************************************************************************** … … 176 180 ULONG space, Buff_left, byteswritten; 177 181 178 // dprintf(("DW::AddBuffers")); 182 #ifdef DEBUG 183 dprintf(("DW::AddBuffers")); 184 #endif 179 185 if (!pTemp) pTemp = (PSTREAMBUFFER)qhInProcess.Tail(); 180 186 181 if (ulStreamType & STREAM_WRITE && pTemp && pTemp->looping) 187 if (ulStreamType & STREAM_WRITE && pTemp && pTemp->looping) 182 188 { 183 189 Buff_left = pTemp->ulBuffsz - pTemp->ulBuffpos; 184 if (pahw->GetPosition(StreamId, &_configinfo, &space) != OSSERR_SUCCESS) 190 if (pahw->GetPosition(StreamId, &_configinfo, &space) != OSSERR_SUCCESS) 185 191 { 186 192 dprintf(("DWAVESTREAM::AddBuffers GetPositions")); … … 188 194 return; 189 195 } 190 if(fFirst) 196 if(fFirst) 191 197 { 192 198 space = min(space, 4*_configinfo.ulFragsize); 193 199 } 194 200 else 195 { 201 { 196 202 space = min(space, _configinfo.ulFragsize); 197 203 } 198 if (space) 199 { 200 if (space >= Buff_left) 204 if (space) 205 { 206 if (space >= Buff_left) 201 207 { 202 208 byteswritten = AddBuffer(Buff_left); 203 if (byteswritten == Buff_left) 209 if (byteswritten == Buff_left) 204 210 { 205 211 pTemp->ulBuffpos = 0; //reset fill position … … 207 213 } 208 214 } 209 else 215 else 210 216 { 211 217 AddBuffer(space); … … 214 220 pTemp->ulDonepos = 0; //make sure it ::Process never thinks it's done 215 221 } 216 else 222 else 217 223 { 218 224 WAVESTREAM::AddBuffers(fFirst); 219 225 } 220 // dprintf(("DW::AddBuffers End"));221 226 } 222 227 //***************************************************************************** … … 252 257 //***************************************************************************** 253 258 //***************************************************************************** 254 ULONG DWAVESTREAM::GetProperty(int type) 259 ULONG DWAVESTREAM::GetProperty(int type) 255 260 { 256 261 switch(type) { … … 279 284 WAVESTREAM(streamtype, pinit, filesysnum, mixerStreamId), fError(FALSE), hCtxHook(0), hSem(0) 280 285 { 281 dprintf(("DWS::DWS Init")); 282 if (DevHelp_AllocateCtxHook((NPFN)HookHandlerAsm, &hCtxHook)) 286 #ifdef DEBUG 287 dprintf(("DWS::DWS Init")); 288 #endif 289 if (DevHelp_AllocateCtxHook((NPFN)HookHandlerAsm, &hCtxHook)) 283 290 { 284 291 dprintf(("DWAVESTREAM::DWAVESTREAM AllocCtx"));
Note:
See TracChangeset
for help on using the changeset viewer.