Changeset 266
- Timestamp:
- Nov 4, 2007, 8:19:50 PM (18 years ago)
- Location:
- OCO/trunk
- Files:
-
- 6 edited
-
drv16/commdbg.c (modified) (2 diffs)
-
drv16/ossidc16.cpp (modified) (1 diff)
-
drv16/waveplay.cpp (modified) (12 diffs)
-
drv16/wavestrm.cpp (modified) (2 diffs)
-
include/ossidc.h (modified) (1 diff)
-
include/ossidc16.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
OCO/trunk/drv16/commdbg.c
r33 r266 228 228 229 229 //------------------------- PrintfOut - 230 ULONG DBGCALLCONV _cdecl OSS16_DebugString(char FAR *debstr,ULONG bufsize); 231 230 232 void cdecl far PrintfOut(char far *DbgStr , ...) 231 233 { … … 332 334 333 335 *BuildPtr=0; // cauterize the string 334 StringOut((char far *) BuildString); // print to comm port 336 //PS+++ StringOut((char far *) BuildString); // print to comm port 337 //PS++ if want can add option like /Ox and set this if(comport) StringOut((char far *) BuildString); 338 OSS16_DebugString((char far *) BuildString,0); // print to Uniaud32 alsahlp$ 335 339 } 336 340 -
OCO/trunk/drv16/ossidc16.cpp
r259 r266 645 645 } 646 646 //****************************************************************************** 647 //PS++ Debug string to uniaud32 648 //****************************************************************************** 649 #pragma off (unreferenced) 650 extern "C" OSSRET DBGCALLCONV _cdecl OSS16_DebugString(char FAR *debstr,ULONG bufsize) 651 #pragma on (unreferenced) 652 { 653 IDC32_PACKET idcpacket; 654 ULONG buffer; 655 656 _fmemset(&idcpacket, 0, sizeof(idcpacket)); 657 658 if (DevHelp_VirtToLin(SELECTOROF(debstr),OFFSETOF(debstr),&buffer)) 659 return OSSERR_INVALID_PARAMETER; 660 661 662 idcpacket.buffer.buffer = (ULONG)buffer; 663 idcpacket.buffer.size = bufsize; 664 return CallOSS32(IDC32_DEBUG_STRING, &idcpacket); 665 } 647 666 //****************************************************************************** 648 667 #ifdef DEBUG -
OCO/trunk/drv16/waveplay.cpp
r253 r266 140 140 StreamId = 0UL; 141 141 open_strategy = 0UL; 142 #ifdef DEBUG 143 dprintf(("OSS16_WAVECLOSE: Success\n")); 144 #endif /* DEBUG */ 142 145 return TRUE; 143 146 } else 147 #ifdef DEBUG 148 dprintf(("OSS16_WAVECLOSE: Error\n")); 149 #endif /* DEBUG */ 144 150 return FALSE; 145 151 } … … 188 194 #ifdef DEBUG 189 195 dprintf(("WAVEPLAY::ConfigDev1 SampleRate %d", pConfigInfo->ulHwSampleRate)); 196 dprintf(("WAVEPLAY::ConfigDev1 ulFirstBufSize %d", ulFirstBufSize)); 197 dprintf(("WAVEPLAY::ConfigDev1 ulFragsize %d", pConfigInfo->ulFragsize)); 190 198 #endif 191 199 … … 195 203 DebugInt3(); 196 204 ulFirstBufSize = 8192; //should never happen! 205 #ifdef DEBUG 206 dprintf(("Arg - shouldn't happen")); 207 #endif /* DEBUG */ 197 208 } 198 209 } … … 200 211 //convert size of first buffer 201 212 ulFirstBufSize = ConvertLength(ulFirstBufSize, pConfigInfo); 213 #ifdef DEBUG 214 dprintf(("WAVEPLAY::ConfigDev2 ulFirstBufSize %d", ulFirstBufSize)); 215 #endif /* DEBUG */ 202 216 } 203 217 204 218 //Must call this method (i.e. resets sample rate conversion position) 205 219 WAVEAUDIO::ConfigDev(StreamId, pConfigInfo, ulFirstBufSize); 220 #ifdef DEBUG 221 dprintf(("WAVEPLAY::ConfigDev3 ulFirstBufSize %d", ulFirstBufSize)); 222 #endif /* DEBUG */ 206 223 207 224 //get real sample format used to program the audio hardware (taking conversion into account) 208 225 QuerySampleFormat(OPERATION_PLAY, pConfigInfo); 226 #ifdef DEBUG 227 dprintf(("WAVEPLAY::ConfigDev4 ulFirstBufSize %d", ulFirstBufSize)); 228 #endif /* DEBUG */ 209 229 210 230 //convert consume rate 211 231 ulPCMConsumeRate = ConvertLength(pConfigInfo->ulPCMConsumeRate, pConfigInfo); 212 213 dprintf(("WAVEPLAY::ConfigDev: cons rate %d, buf size %d init rate %d", ulPCMConsumeRate, ulFirstBufSize, pConfigInfo->ulHwSampleRate)); 232 #ifdef DEBUG 233 dprintf(("WAVEPLAY::ConfigDev5 ulFirstBufSize %d", ulFirstBufSize)); 234 dprintf(("WAVEPLAY::ConfigDev5 ulPCMConsumeRate %d", ulPCMConsumeRate)); 235 236 dprintf(("WAVEPLAY::ConfigDev: cons rate %d buf size %d init rate %d", ulPCMConsumeRate, ulFirstBufSize, pConfigInfo->ulHwSampleRate)); 237 dprintf(("WAVEPLAY::ConfigDev6 ulFirstBufSize %d", ulFirstBufSize)); 238 #endif /* DEBUG */ 214 239 215 240 fragsize = ulPCMConsumeRate/64; //start with 64 irqs/sec … … 240 265 #ifdef DEBUG 241 266 dprintf(("WAVEPLAY::ConfigDev: SampleRate %d", pConfigInfo->ulHwSampleRate)); 267 dprintf(("WAVEPLAY::ConfigDev2 fragsize %d", fragsize)); 242 268 #endif 243 269 hwparam.ulSampleRate = pConfigInfo->ulHwSampleRate; … … 245 271 hwparam.ulNumChannels = pConfigInfo->ulHwNumChannels; 246 272 hwparam.ulDataType = QueryOSSDataFormat(OPERATION_PLAY, pConfigInfo->ulDataType, pConfigInfo->ulHwBitsPerSample); 247 if((rc = (int)OSS16_WaveSetFormat(StreamId, &hwparam)) != OSSERR_SUCCESS) {248 #ifdef DEBUG 249 dprintf(("WAVEPLAY:ConfigDev:OSS16_WaveSetFormat error. rc = %d",rc));273 rc = (int)OSS16_WaveSetFormat(StreamId, &hwparam); 274 #ifdef DEBUG 275 dprintf(("WAVEPLAY:ConfigDev:OSS16_WaveSetFormat . rc = %d",rc)); 250 276 dprintf(("WAVEPLAY:ConfigDev:samp rate %d",hwparam.ulSampleRate)); 251 277 dprintf(("WAVEPLAY:ConfigDev:bits per sample %d",hwparam.ulBitsPerSample)); … … 254 280 255 281 #endif 282 if( rc != OSSERR_SUCCESS) { 256 283 // DevHelp_Beep(500, 100); 257 284 DebugInt3(); … … 290 317 if(pConfigInfo->usConversion == CONVERT_NONE) 291 318 { 319 #ifdef DEBUG 320 dprintf(("Transfer. NoConv ulB %d",ulBytesToTransfer)); 321 #endif /* DEBUG */ 292 322 if(AddBuffer(StreamId, pConfigInfo, pUserBuffer, ulBytesToTransfer, pulBytesTransferred) == FALSE) 293 323 { … … 365 395 pConfigInfo->ulSRatePosition -= pConfigInfo->ulSRateIncrement; 366 396 } 367 dprintf2(("WAVEPLAY::AddBuffer %lx %lx %lx -> nothing left", ulBytesToTransfer, pConfigInfo->ulSRatePosition, pConfigInfo->ulSRateIncrement)); 397 #ifdef DEBUG 398 dprintf(("WAVEPLAY::AddBuffer %lx %lx %lx -> nothing left", ulBytesToTransfer, pConfigInfo->ulSRatePosition, pConfigInfo->ulSRateIncrement)); 399 #endif /* DEBUG */ 368 400 return TRUE; 369 401 } … … 377 409 dprintf2(("WAVEPLAY::AddBuffer; OSS16_WaveAddBuffer %lx %x failed due to full buffer", ulCvtBufferSize, (USHORT)rc)); 378 410 } 379 // else dprintf(("WAVEPLAY::AddBuffer; OSS16_WaveAddBuffer %lx %x failed", ulCvtBufferSize, (USHORT)rc)); 411 #ifdef DEBUG 412 else dprintf(("WAVEPLAY::AddBuffer; OSS16_WaveAddBuffer %lx %x failed", ulCvtBufferSize, (USHORT)rc)); 413 #endif /* DEBUG */ 380 414 *pulBytesTransferred = 0; 381 415 return FALSE; … … 423 457 if(OSS16_WaveGetPos(StreamId, &ulCurBytesProcessed) != OSSERR_SUCCESS) { 424 458 *pulStreamPosition = 0; 459 #ifdef DEBUG 460 dprintf(("OSS16_WAVEPLAY::GetPosition: Failed")); 461 #endif /* DEBUG */ 425 462 return FALSE; 426 463 } … … 442 479 if(OSS16_WaveGetSpace(StreamId, &space) != OSSERR_SUCCESS) { 443 480 *pulStreamSpace = 0; 481 #ifdef DEBUG 482 dprintf(("OSS16_WAVEPLAY::GetSpace: Failed")); 483 #endif /* DEBUG */ 444 484 return FALSE; 445 485 } -
OCO/trunk/drv16/wavestrm.cpp
r33 r266 208 208 } 209 209 if(!pTemp) { 210 dprintf4(("AddBuffer: pTemp == NULL")); 210 #ifdef DEBUG 211 dprintf(("AddBuffer: pTemp == NULL")); 212 #endif /* DEBUG */ 211 213 return (ULONG)-1; 212 214 } … … 320 322 ulStreamPos &= ~(_configinfo.ulSampleSize - 1); 321 323 322 // dprintf(("WARNING: Process: Current pos %lx pos %lx incr %lx", ulCurBytesProcessed, _ulBytesProcessed, bytesinc)); 324 #ifdef DEBUG 325 dprintf(("WARNING: Process: Current pos %ld pos %d incr %d", ulCurBytesProcessed, _ulBytesProcessed, bytesinc)); 323 326 // dprintf(("WARNING: hw pos %lx, streampos %lx", ulCurBytesProcessed, ulStreamPos)); 327 #endif /* DEBUG */ 324 328 } 325 329 _ulBytesProcessed = ulCurBytesProcessed; -
OCO/trunk/include/ossidc.h
r221 r266 152 152 #define IDC32_MIDI_PITCH_BEND 0x3A 153 153 #define IDC32_MIDI_CLOSE 0x3B 154 #define IDC32_DEBUG_STRING 0x3C 154 155 155 156 #define IDC16_INIT 0 -
OCO/trunk/include/ossidc16.h
r33 r266 78 78 OSSRET DBGCALLCONV OSS16_MixGetProperty(OSSSTREAMID StreamId, USHORT usProperty, ULONG FAR *pValue); 79 79 OSSRET DBGCALLCONV OSS16_MixQueryCaps(OSSSTREAMID Streamid, OSS32_MIXCAPS FAR *pCaps); 80 OSSRET DBGCALLCONV _cdecl _OSS16_DebugString(char FAR *debstr,ULONG bufsize); //PS++ 80 81 81 82 OSSRET DBGCALLCONV OSS16_MidiOpen(ULONG devicenr, MIDITYPE midiType, OSSSTREAMID FAR *pStreamid);
Note:
See TracChangeset
for help on using the changeset viewer.
