Changeset 524
- Timestamp:
- Jul 22, 2010, 8:20:48 PM (15 years ago)
- Location:
- OCO/branches/DAZ
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified OCO/branches/DAZ/drv16/audiohw.cpp ¶
r486 r524 227 227 PAUDIOHW pEle = (PAUDIOHW)pAudioHWList->Head(); 228 228 while (pEle != NULL) { 229 #ifdef DEBUG 230 // dprintf(("dev type: %d",pEle->ulDeviceType)); 231 #endif 229 //dprintf(("dev type: %d",pEle->ulDeviceType)); 232 230 if (pEle->ulDeviceType == Devicetype) 233 231 return(pEle); -
TabularUnified OCO/branches/DAZ/drv16/dwavestrm.cpp ¶
r513 r524 46 46 if (pStream == NULL) 47 47 { 48 dprintf(("HookHandler stream %lx not found!", (ULONG) ulSysFileNum));48 rprintf(("HookHandler stream %lx not found!", (ULONG) ulSysFileNum)); 49 49 DebugInt3(); 50 50 return; … … 56 56 rc = DevHelp_PostEventSem(pStream->hSem); 57 57 if(rc != 0) { 58 dprintf(("DevHlp_PostEventSem returned %d", rc));58 rprintf(("DevHlp_PostEventSem returned %d", rc)); 59 59 } 60 60 } … … 80 80 pStreamBuf = new STREAMBUFFER(uLength, (PSTREAMBUF)0, fLooping); 81 81 if(pStreamBuf == NULL) { 82 dprintf(("DWAVESTREAM::Write StreamBuf"));82 rprintf(("DWAVESTREAM::Write StreamBuf")); 83 83 DebugInt3(); 84 84 return 1; … … 89 89 rc = DevHelp_VirtToLin(SELECTOROF(pLock), OFFSETOF(pLock), &linLock); 90 90 if(rc) { 91 dprintf(("DWAVESTREAM::Write VirtToLin"));91 rprintf(("DWAVESTREAM::Write VirtToLin")); 92 92 DebugInt3(); 93 93 delete pStreamBuf; … … 97 97 rc = DevHelp_VMLock(VMDHL_LONG | VMDHL_WRITE, (LIN)pbuf, uLength, -1L, linLock, (PULONG)&PageListCount); 98 98 if(rc) { 99 dprintf(("DWAVESTREAM::Write VMLock"));99 rprintf(("DWAVESTREAM::Write VMLock")); 100 100 DebugInt3(); 101 101 delete pStreamBuf; … … 105 105 rc = DevHelp_VMProcessToGlobal(VMDHGP_WRITE, (LIN)pbuf, uLength, (PLIN)&linAddr); 106 106 if(rc) { 107 dprintf(("DWAVESTREAM::Write ProcToGlob"));107 rprintf(("DWAVESTREAM::Write ProcToGlob")); 108 108 DebugInt3(); 109 109 DevHelp_VMUnLock(linLock); … … 143 143 hSem = pReg->hStream; 144 144 145 #ifdef DEBUG146 145 dprintf(("DWAVESTREAM::Register")); 147 #endif148 146 if(DevHelp_OpenEventSem(hSem) != 0) { 149 dprintf(("DevHlp_OpenEventSem %lx failed!", hSem));147 rprintf(("DevHlp_OpenEventSem %lx failed!", hSem)); 150 148 hSem = 0; 151 149 return 1; … … 158 156 { 159 157 if(DevHelp_CloseEventSem(hSem) != 0) { 160 dprintf(("DevHlp_CloseEventSemaphore %lx failed!", hSem));158 rprintf(("DevHlp_CloseEventSemaphore %lx failed!", hSem)); 161 159 return; 162 160 } … … 186 184 if (pahw->GetPosition(StreamId, &_configinfo, &space) != OSSERR_SUCCESS) 187 185 { 188 dprintf(("DWAVESTREAM::AddBuffers GetPositions"));186 rprintf(("DWAVESTREAM::AddBuffers GetPositions")); 189 187 DebugInt3(); 190 188 return; … … 280 278 WAVESTREAM(streamtype, pinit, filesysnum, mixerStreamId), fError(FALSE), hCtxHook(0), hSem(0) 281 279 { 282 #ifdef DEBUG283 280 dprintf(("DWS::DWS Init")); 284 #endif285 281 if (DevHelp_AllocateCtxHook((NPFN)HookHandlerAsm, &hCtxHook)) 286 282 { 287 dprintf(("DWAVESTREAM::DWAVESTREAM AllocCtx"));283 rprintf(("DWAVESTREAM::DWAVESTREAM AllocCtx")); 288 284 DebugInt3(); 289 285 fError = TRUE; … … 303 299 APIRET rc = DevHelp_PostEventSem(hSem); 304 300 if(rc != 0) { 305 dprintf(("DevHlp_PostEventSem returned %d", rc));301 rprintf(("DevHlp_PostEventSem returned %d", rc)); 306 302 } 307 303 if(DevHelp_CloseEventSem(hSem) != 0) { 308 dprintf(("DevHlp_CloseEventSemaphore %lx failed!", hSem));304 rprintf(("DevHlp_CloseEventSemaphore %lx failed!", hSem)); 309 305 } 310 306 } -
TabularUnified OCO/branches/DAZ/drv16/fmsynth.cpp ¶
r483 r524 48 48 if(OSS16_MidiOpen(current_device, FM_SEND, pStreamId) != OSSERR_SUCCESS) 49 49 { 50 dprintf(("FMSYNTH::Open: OSS16_MidiOpen failed!!"));50 rprintf(("FMSYNTH::Open: OSS16_MidiOpen failed!!")); 51 51 DebugInt3(); 52 52 midiOutStreamId = 0; … … 69 69 #if 0 70 70 if(OSS16_MidiClose(StreamId) != OSSERR_SUCCESS) { 71 dprintf(("FMSYNTH::close: OSS16_MidiClose failed!!"));71 rprintf(("FMSYNTH::close: OSS16_MidiClose failed!!")); 72 72 DebugInt3(); 73 73 return FALSE; … … 121 121 { 122 122 if(MixerSetVolume(mixerStreamId, OSS32_MIX_VOLUME_MIDI, ulVolume) != TRUE) { 123 dprintf(("FMSYNTH::SetVolume: MixerSetVolume failed!!"));123 rprintf(("FMSYNTH::SetVolume: MixerSetVolume failed!!")); 124 124 //not necessarily fatal; maybe there is no volume control for midi 125 125 } -
TabularUnified OCO/branches/DAZ/drv16/init.cpp ¶
r483 r524 110 110 //functions have been moved into a seperate code segment) 111 111 if(DevHelp_Lock(SELECTOROF(dbgptr), LOCKTYPE_LONG_ANYMEM, 0, &lockhandle)) { 112 dprintf(("DevHelp_Lock failed on debug selector"));112 rprintf(("DevHelp_Lock failed on debug selector")); 113 113 DebugInt3(); 114 114 return; -
TabularUnified OCO/branches/DAZ/drv16/ioctl.cpp ¶
r486 r524 202 202 ULONG ulDevicetype; 203 203 204 #ifdef DEBUG205 204 dprintf(("IACapability: src type: 0x%lx, op %d",p->ulDataType, (USHORT)p->ulOperation)); 206 #endif207 205 208 206 // get the hardware device type based on the datatype and operation 209 207 ulDevicetype = GetHardwareType((USHORT)p->ulDataType,(USHORT)p->ulOperation,LDev); 210 208 211 #ifdef DEBUG 212 // dprintf(("IACapability: dev type: %ld, ldev %d",ulDevicetype, LDev)); 213 #endif 209 //dprintf(("IACapability: dev type: %ld, ldev %d",ulDevicetype, LDev)); 214 210 215 211 // Tell the caller we support this IOCTL … … 231 227 p->ulSamplingRate = HZ_44100; 232 228 // 233 dprintf(("IACapability: Error support"));229 rprintf(("IACapability: Error support")); 234 230 prp->usStatus |= RPERR; 235 231 } 236 232 } 237 233 else { 238 #ifdef DEBUG 239 // dprintf(("IACapability: Error get HW obj")); 240 #endif 234 //dprintf(("IACapability: Error get HW obj")); 241 235 //PS+++ filling to our parameters as say mmpm2.inf for returning error in this call 242 236 // (for HDA only!!!!!) … … 270 264 if (p->usIOCtlRequest != AUDIO_CHANGE) 271 265 { 272 dprintf(("IAudioControl: Error support req:%x",p->usIOCtlRequest));266 rprintf(("IAudioControl: Error support req:%x",p->usIOCtlRequest)); 273 267 p->sReturnCode = INVALID_REQUEST; 274 268 prp->usStatus |= RPERR | RPBADCMD; … … 284 278 if(addr >= 0x10000UL) 285 279 { 286 dprintf(("Invalid MCI_AUDIO_CHANGE pnt %lx!!", (ULONG)pAudChange));280 rprintf(("Invalid MCI_AUDIO_CHANGE pnt %lx!!", (ULONG)pAudChange)); 287 281 p->sReturnCode = INVALID_REQUEST; 288 282 prp->usStatus |= RPERR | RPBADCMD; … … 296 290 if(addr >= 0x10000UL) 297 291 { 298 dprintf(("Invalid MCI_TRACK_INFO pnt %lx!!", (ULONG)pMasterVol));292 rprintf(("Invalid MCI_TRACK_INFO pnt %lx!!", (ULONG)pMasterVol)); 299 293 p->sReturnCode = INVALID_REQUEST; 300 294 prp->usStatus |= RPERR | RPBADCMD; … … 304 298 pStream = FindStream_fromFile((ULONG) prp->s.ioctl.usSysFileNum); 305 299 if(pStream == NULL) { 306 dprintf(("IAudioControl stream %lx not found!", (ULONG) prp->s.ioctl.usSysFileNum));300 rprintf(("IAudioControl stream %lx not found!", (ULONG) prp->s.ioctl.usSysFileNum)); 307 301 DebugInt3(); 308 302 return; … … 316 310 volume = pAudChange->lVolume >> 16UL; 317 311 volume = (volume*OSS32_MAX_VOLUME)/0x7FFFUL; 318 //dprintf(("Set stream volume of %x to %d", prp->s.ioctl.usSysFileNum, volume));312 //dprintf(("Set stream volume of %x to %d", prp->s.ioctl.usSysFileNum, volume)); 319 313 pStream->SetProperty(PROPERTY_VOLUME, MAKE_VOLUME_LR(volume, volume)); 320 314 } … … 390 384 if(DevHelp_VerifyAccess(SELECTOROF(pInit), sizeof(MCI_AUDIO_INIT), OFFSETOF(pInit), VERIFY_READWRITE)) 391 385 { 392 dprintf(("Invalid MCI_AUDIO_INIT pnt %lx!!", (ULONG)pInit));386 rprintf(("Invalid MCI_AUDIO_INIT pnt %lx!!", (ULONG)pInit)); 393 387 prp->usStatus |= RPERR | RPBADCMD; 394 388 return; … … 411 405 if (audioCaps.ulSupport != SUPPORT_SUCCESS) 412 406 { 413 dprintf(("IDirectAudio: DevCaps failed"));407 rprintf(("IDirectAudio: DevCaps failed")); 414 408 pInit->sReturnCode = INVALID_REQUEST; 415 409 prp->usStatus |= RPERR; … … 419 413 else 420 414 { 421 dprintf(("IDirectAudio: HW DevCaps failed"));415 rprintf(("IDirectAudio: HW DevCaps failed")); 422 416 pInit->sReturnCode = INVALID_REQUEST; 423 417 prp->usStatus |= RPERR; … … 427 421 pStream = new DWAVESTREAM(AUDIOHW_WAVE_PLAY, pInit, prp->s.ioctl.usSysFileNum, MixerStreamId); 428 422 if(pStream == NULL) { 429 //dprintf(("IDirectAudio: pStream"));423 //dprintf(("IDirectAudio: pStream")); 430 424 DebugInt3(); 431 425 pInit->sReturnCode = INVALID_REQUEST; … … 437 431 { 438 432 delete pStream; 439 //dprintf(("IlDirectAudio: IsEverythingOk"));433 //dprintf(("IlDirectAudio: IsEverythingOk")); 440 434 DebugInt3(); 441 435 pInit->sReturnCode = INVALID_REQUEST; … … 463 457 if(DevHelp_VerifyAccess(SELECTOROF(pInit), sizeof(MCI_AUDIO_INIT), OFFSETOF(pInit), VERIFY_READWRITE)) 464 458 { 465 dprintf(("Invalid MCI_AUDIO_INIT pnt %lx!!", (ULONG)pInit));459 rprintf(("Invalid MCI_AUDIO_INIT pnt %lx!!", (ULONG)pInit)); 466 460 prp->usStatus |= RPERR | RPBADCMD; 467 461 return; … … 484 478 if (audioCaps.ulSupport != SUPPORT_SUCCESS) 485 479 { 486 dprintf(("IlDirectAudio: DevCaps failed"));480 rprintf(("IlDirectAudio: DevCaps failed")); 487 481 prp->usStatus |= RPERR; 488 482 pInit->sReturnCode = INVALID_REQUEST; 489 483 return; 490 484 } 491 //dprintf(("IoctlDirectAudio ret0"));485 //dprintf(("IoctlDirectAudio ret0")); 492 486 pInit->sReturnCode = 0; 493 487 return; 494 488 } 495 489 else { 496 dprintf(("IoctlDirectAudio err req"));490 rprintf(("IoctlDirectAudio err req")); 497 491 pInit->sReturnCode = INVALID_REQUEST; 498 492 prp->usStatus |= RPERR; … … 508 502 if(DevHelp_VerifyAccess(SELECTOROF(lpCaps), sizeof(OSS32_DEVCAPS), OFFSETOF(lpCaps), VERIFY_READWRITE)) 509 503 { 510 dprintf(("Invalid OSS32_DEVCAPS pnt %lx!!", (ULONG)lpCaps));504 rprintf(("Invalid OSS32_DEVCAPS pnt %lx!!", (ULONG)lpCaps)); 511 505 prp->usStatus |= RPERR | RPBADCMD; 512 506 return; … … 519 513 { 520 514 pHWobj->DevCaps(lpCaps); 521 //dprintf(("IoctlDirectAudio ret1"));515 //dprintf(("IoctlDirectAudio ret1")); 522 516 return; 523 517 } … … 525 519 { 526 520 prp->usStatus |= RPERR; 527 //dprintf(("IoctlDirectAudio ret err1"));521 //dprintf(("IoctlDirectAudio ret err1")); 528 522 return; 529 523 } … … 534 528 if(pStream == NULL) 535 529 { 536 dprintf(("IDirectAudio stream %lx not found!", (ULONG) prp->s.ioctl.usSysFileNum));530 rprintf(("IDirectAudio stream %lx not found!", (ULONG) prp->s.ioctl.usSysFileNum)); 537 531 DebugInt3(); 538 532 prp->usStatus |= RPERR | RPBADCMD; … … 545 539 if(DevHelp_VerifyAccess(SELECTOROF(pDAudioCmd), sizeof(DAUDIO_CMD), OFFSETOF(pDAudioCmd), VERIFY_READWRITE)) 546 540 { 547 dprintf(("Invalid DAUDIO_CMD pnt %lx!!", (ULONG)pDAudioCmd));541 rprintf(("Invalid DAUDIO_CMD pnt %lx!!", (ULONG)pDAudioCmd)); 548 542 prp->usStatus |= RPERR | RPBADCMD; 549 543 return; … … 553 547 { 554 548 case DAUDIO_CLOSE: 555 //dprintf(("ID close"));549 //dprintf(("ID close")); 556 550 delete pStream; 557 551 break; … … 559 553 case DAUDIO_SETVOLUME: 560 554 { 561 //dprintf(("ID SetVolume"));555 //dprintf(("ID SetVolume")); 562 556 pStream->SetProperty(PROPERTY_VOLUME, MAKE_VOLUME_LR(pDAudioCmd->Vol.VolumeL, pDAudioCmd->Vol.VolumeR)); 563 557 break; … … 566 560 case DAUDIO_GETVOLUME: 567 561 { 568 //dprintf(("ID GetVolume"));562 //dprintf(("ID GetVolume")); 569 563 pDAudioCmd->Vol.VolumeL = GET_VOLUME_L(pStream->GetProperty(PROPERTY_VOLUME)); 570 564 pDAudioCmd->Vol.VolumeR = GET_VOLUME_R(pStream->GetProperty(PROPERTY_VOLUME)); … … 582 576 else 583 577 { 584 dprintf(("ID Start rc1"));578 rprintf(("ID Start rc1")); 585 579 rc = 1; //fail 586 580 } … … 616 610 case DAUDIO_GETPOS: 617 611 { 618 //dprintf(("ID GetPos"));612 //dprintf(("ID GetPos")); 619 613 pDAudioCmd->Pos.ulCurrentPos = pStream->GetCurrentPos(); 620 614 pDAudioCmd->Pos.ulWritePos = pStream->GetCurrentWritePos(); … … 624 618 case DAUDIO_ADDBUFFER: 625 619 { 626 //dprintf(("ID AddBuffer"));620 //dprintf(("ID AddBuffer")); 627 621 rc = pStream->Write((PSTREAMBUF)pDAudioCmd->Buffer.lpBuffer, pDAudioCmd->Buffer.ulBufferLength); 628 622 break; … … 631 625 case DAUDIO_SETPROPERTY: 632 626 { 633 //dprintf(("ID SetProp"));627 //dprintf(("ID SetProp")); 634 628 rc = pStream->SetProperty((USHORT)pDAudioCmd->SetProperty.type, pDAudioCmd->SetProperty.value); 635 629 break; … … 640 634 DDCMDREGISTER reg; 641 635 642 //dprintf(("ID Reg"));636 //dprintf(("ID Reg")); 643 637 reg.ulFunction = DDCMD_REG_STREAM; 644 638 reg.hStream = pDAudioCmd->Thread.hSemaphore; … … 651 645 case DAUDIO_DEREGISTER_THREAD: 652 646 { 653 //dprintf(("ID DeReg"));647 //dprintf(("ID DeReg")); 654 648 pStream->DeRegister(); 655 649 break; … … 657 651 658 652 case DAUDIO_QUERYVERSION: 659 //dprintf(("ID qVer"));653 //dprintf(("ID qVer")); 660 654 pDAudioCmd->Version.ulVersion = DAUDIO_VERSION; 661 655 break; … … 664 658 if(rc) 665 659 { 666 //dprintf(("IoctlDirectAudio ret err rc=%ld",rc));660 //dprintf(("IoctlDirectAudio ret err rc=%ld",rc)); 667 661 prp->usStatus |= RPERR | RPBADCMD; 668 662 return; 669 663 } 670 //dprintf(("IoctlDirectAudio ret Ok"));664 //dprintf(("IoctlDirectAudio ret Ok")); 671 665 return; 672 666 } … … 687 681 extern "C" void StrategyIoctl(PREQPACKET prp, USHORT LDev) 688 682 { 689 #ifdef DEBUG690 683 dprintf(("StrategyIoctl:cat:0x%x, code:0x%x cd %d gd %d", prp->s.ioctl.bCategory, prp->s.ioctl.bCode, current_device, LDev)); 691 #endif692 684 switch (prp->s.ioctl.bCategory) { 693 685 case DAUDIO_IOCTL_CAT: /* 0x91 */ … … 721 713 } 722 714 723 #ifdef DEBUG 724 dprintf(("StrategyIoctl:ret:0x%x", (USHORT)prp->usStatus)); 725 #endif 715 //dprintf(("StrategyIoctl:ret:0x%x", (USHORT)prp->usStatus)); 726 716 return; 727 717 } -
TabularUnified OCO/branches/DAZ/drv16/maudio.cpp ¶
r468 r524 3 3 /* SCCSID = %W% %E% */ 4 4 /**************************************************************************** 5 * 6 * Copyright (c) IBM Corporation 1994 - 1997. 7 * 8 * The following IBM OS/2 source code is provided to you solely for the 5 * * 6 * Copyright (c) IBM Corporation 1994 - 1997. * 7 * * 8 * The following IBM OS/2 source code is provided to you solely for the * 9 9 * the purpose of assisting you in your development of OS/2 device drivers. * 10 * You may use this code in accordance with the IBM License Agreement 11 * provided in the IBM Device Driver Source Kit for OS/2. 12 * 10 * You may use this code in accordance with the IBM License Agreement * 11 * provided in the IBM Device Driver Source Kit for OS/2. * 12 * * 13 13 ****************************************************************************/ 14 14 /**@internal %W% 15 * 15 * MIDI audio hardware object implementation. 16 16 * @version %I% 17 17 * @context 18 * 18 * Unless otherwise noted, all interfaces are Ring-0, 16-bit, kernel stack. 19 19 * @notes 20 20 * @history … … 25 25 #include <os2medef.h> 26 26 #include <audio.h> 27 #include "midi_idc.h" 27 #include "midi_idc.h" // RTMIDI interfaces 28 28 #include "maudio.hpp" 29 29 #include <dbgos2.h> … … 37 37 { 38 38 39 pCaps->ulSupport 39 pCaps->ulSupport = SUPPORT_SUCCESS; 40 40 pCaps->ulDataSubType = SUBTYPE_NONE; 41 41 pCaps->ulResourceUnits = 1; 42 42 pCaps->ulResourceClass = 1; 43 pCaps->fCanRecord 44 pCaps->ulFlags = INPUT |// Input select is supported45 OUTPUT |// Output select is supported46 MONITOR |// Monitor is supported47 VOLUME;// Volume control is supported43 pCaps->fCanRecord = FALSE; 44 pCaps->ulFlags = INPUT | // Input select is supported 45 OUTPUT | // Output select is supported 46 MONITOR | // Monitor is supported 47 VOLUME; // Volume control is supported 48 48 } 49 49 //****************************************************************************** … … 59 59 { 60 60 for (int iChannel=0; iChannel<16; iChannel++) { 61 writeByte(StreamId, (BYTE) (0xB0 + iChannel));// channel mode62 writeByte(StreamId, 123);// all notes off63 61 writeByte(StreamId, (BYTE) (0xB0 + iChannel)); // channel mode 62 writeByte(StreamId, 123); // all notes off 63 writeByte(StreamId, 0); 64 64 } 65 65 … … 72 72 int MIDIAUDIO::writeByte(OSSSTREAMID StreamId, BYTE b) 73 73 { 74 return 0; 74 return 0; // Failure. 75 75 } 76 76 //****************************************************************************** … … 78 78 int MIDIAUDIO::readByte(OSSSTREAMID StreamId) 79 79 { 80 return -1; 80 return -1; // Failure. 81 81 } 82 82 //****************************************************************************** … … 108 108 BOOL MIDIAUDIO::SetVolume(OSSSTREAMID StreamId, OSSSTREAMID mixerStreamId, ULONG ulVolume) 109 109 { 110 110 return FALSE; 111 111 } 112 112 //****************************************************************************** 113 113 //****************************************************************************** 114 int MIDIAUDIO::Pause(OSSSTREAMID StreamId) 114 int MIDIAUDIO::Pause(OSSSTREAMID StreamId) // Pause the operation 115 115 { 116 //dprintf(("DUMMY MIDIAUDIO::Pause"));117 118 116 //dprintf(("DUMMY MIDIAUDIO::Pause")); 117 DebugInt3(); 118 return 0; 119 119 } 120 120 //****************************************************************************** 121 121 //****************************************************************************** 122 int MIDIAUDIO::Resume(OSSSTREAMID StreamId) 122 int MIDIAUDIO::Resume(OSSSTREAMID StreamId) // Resume the operation 123 123 { 124 //dprintf(("DUMMY MIDIAUDIO::Resume"));125 126 124 //dprintf(("DUMMY MIDIAUDIO::Resume")); 125 DebugInt3(); 126 return 0; 127 127 } 128 128 //****************************************************************************** … … 130 130 void MIDIAUDIO::noteOff(OSSSTREAMID StreamId, BYTE mchan, BYTE note, BYTE velocity ) 131 131 { 132 //dprintf2(("MIDIAUDIO::noteOff %d %d %d", mchan, note, velocity));133 134 135 132 //dprintf2(("MIDIAUDIO::noteOff %d %d %d", mchan, note, velocity)); 133 if(OSS16_MidiNoteOff(StreamId, mchan, note, velocity) != OSSERR_SUCCESS) { 134 DebugInt3(); 135 } 136 136 } 137 137 //****************************************************************************** … … 139 139 void MIDIAUDIO::noteOn(OSSSTREAMID StreamId, BYTE mchan, BYTE note, BYTE velocity ) 140 140 { 141 //dprintf2(("MIDIAUDIO::noteOn %d %d %d", mchan, note, velocity));142 143 144 141 //dprintf2(("MIDIAUDIO::noteOn %d %d %d", mchan, note, velocity)); 142 if(OSS16_MidiNoteOn(StreamId, mchan, note, velocity) != OSSERR_SUCCESS) { 143 DebugInt3(); 144 } 145 145 } 146 146 //****************************************************************************** … … 148 148 void MIDIAUDIO::polyphonicPressure(OSSSTREAMID StreamId, BYTE mchan, BYTE note, BYTE value ) 149 149 { 150 //dprintf2(("MIDIAUDIO::polyphonicPressure %d %d %d", mchan, note, value));151 152 153 150 //dprintf2(("MIDIAUDIO::polyphonicPressure %d %d %d", mchan, note, value)); 151 if(OSS16_MidiKeyPressure(StreamId, mchan, note, value) != OSSERR_SUCCESS) { 152 DebugInt3(); 153 } 154 154 } 155 155 //****************************************************************************** … … 157 157 void MIDIAUDIO::controlChange(OSSSTREAMID StreamId, BYTE mchan, BYTE control_number, BYTE value ) 158 158 { 159 //dprintf2(("MIDIAUDIO::controlChange %d %d %d", mchan, control_number, value));160 161 162 159 //dprintf2(("MIDIAUDIO::controlChange %d %d %d", mchan, control_number, value)); 160 if(OSS16_MidiControlChange(StreamId, mchan, control_number, value) != OSSERR_SUCCESS) { 161 DebugInt3(); 162 } 163 163 } 164 164 //****************************************************************************** … … 166 166 void MIDIAUDIO::programChange(OSSSTREAMID StreamId, BYTE mchan, BYTE program_number ) 167 167 { 168 //dprintf2(("MIDIAUDIO::programChange %d %d", mchan, program_number));169 170 171 168 //dprintf2(("MIDIAUDIO::programChange %d %d", mchan, program_number)); 169 if(OSS16_MidiProgramChange(StreamId, mchan, program_number) != OSSERR_SUCCESS) { 170 DebugInt3(); 171 } 172 172 } 173 173 //****************************************************************************** … … 175 175 void MIDIAUDIO::channelPressure(OSSSTREAMID StreamId, BYTE mchan, BYTE value ) 176 176 { 177 //dprintf2(("MIDIAUDIO::channelPressure %d %d", mchan, value));178 179 180 177 //dprintf2(("MIDIAUDIO::channelPressure %d %d", mchan, value)); 178 if(OSS16_MidiChannelPressure(StreamId, mchan, value) != OSSERR_SUCCESS) { 179 DebugInt3(); 180 } 181 181 } 182 182 //****************************************************************************** … … 184 184 void MIDIAUDIO::pitchBend(OSSSTREAMID StreamId, BYTE mchan, BYTE value_lsb, BYTE value_msb) 185 185 { 186 //dprintf2(("MIDIAUDIO::pitchBend %d %d %d", mchan, value_lsb, value_msb));187 188 189 186 //dprintf2(("MIDIAUDIO::pitchBend %d %d %d", mchan, value_lsb, value_msb)); 187 if(OSS16_MidiKeyPressure(StreamId, mchan, value_lsb, value_msb) != OSSERR_SUCCESS) { 188 DebugInt3(); 189 } 190 190 } 191 191 //****************************************************************************** -
TabularUnified OCO/branches/DAZ/drv16/midistrm.cpp ¶
r468 r524 3 3 /* SCCSID = %W% %E% */ 4 4 /**************************************************************************** 5 * 6 * Copyright (c) IBM Corporation 1994 - 1997. 7 * 8 * The following IBM OS/2 source code is provided to you solely for the 5 * * 6 * Copyright (c) IBM Corporation 1994 - 1997. * 7 * * 8 * The following IBM OS/2 source code is provided to you solely for the * 9 9 * the purpose of assisting you in your development of OS/2 device drivers. * 10 * You may use this code in accordance with the IBM License Agreement 11 * provided in the IBM Device Driver Source Kit for OS/2. 12 * 10 * You may use this code in accordance with the IBM License Agreement * 11 * provided in the IBM Device Driver Source Kit for OS/2. * 12 * * 13 13 ****************************************************************************/ 14 14 /**@internal %W% 15 15 * @notes 16 * 17 * 16 * MIDISTREAM class implementation. The Midi Stream class is derived 17 * from the Stream class. 18 18 * @version %I% 19 19 * @context Unless otherwise noted, all interfaces are Ring-0, 16-bit, 20 * 20 * kernel stack. 21 21 * @history 22 22 * 23 23 */ 24 24 #define INCL_NOPMAPI 25 #define INCL_DOSERRORS 25 #define INCL_DOSERRORS // for ERROR_INVALID_FUNCTION 26 26 #include <os2.h> 27 27 #include <os2me.h> 28 #include <audio.h> 28 #include <audio.h> // for #define MIDI 29 29 30 30 #include <include.h> … … 39 39 USHORT MIDISTREAM::_usBitNumber[ NUM_MidiChannels ] = 40 40 { 0x0001, 0x0002, 0x0004, 0x0008, 41 42 43 41 0x0010, 0x0020, 0x0040, 0x0080, 42 0x0100, 0x0200, 0x0400, 0x0800, 43 0x1000, 0x2000, 0x4000, 0x8000 }; 44 44 45 45 46 46 /**@internal CalcDelay 47 * @param 48 * @return 47 * @param None 48 * @return None 49 49 * @notes 50 * 51 *---------------------------------------------------------- == 52 * 53 * 54 * 55 * 56 * 57 * 50 * 600,000,000 microseconds/10 minutes 51 *---------------------------------------------------------- == X microseconds/clock 52 * usCPQNnum 53 * (ulTempo beats/10 min) * ( 24 * ------------- clocks/beat ) 54 * usCPQNden 55 * 56 * 57 * 25,000,000 * usCPQNden 58 58 *== -------------------------- 59 * 59 * ulTempo * usCPQNnum 60 60 * 61 61 * where 62 62 * usCPQNden = ((usCPQN & 0x3F) + 1) * 3 63 * usCPQNnum = 1 64 * 65 * 63 * usCPQNnum = 1 if bit 6 of usCPQN is set 64 * 65 * or 66 66 * 67 67 * usCPQNden = 1 68 * usCPQNnum = usCPQN + 1 68 * usCPQNnum = usCPQN + 1 if bit 6 is not set 69 69 */ 70 70 void MIDISTREAM::CalcDelay(void) … … 72 72 ULONG ul; 73 73 74 if (usCPQN & 0x40) { 75 76 77 74 if (usCPQN & 0x40) { // bit 6 is set if it's a denominator 75 ul = 25000000 * ((usCPQN & 0x3F) + 1); 76 ulPerClock = ul / ulTempo; 77 ulPerClock *= 3; 78 78 } else { 79 80 79 ul = ulTempo * (usCPQN+1); 80 ulPerClock = 25000000 / ul; 81 81 } 82 82 } … … 84 84 85 85 /**@external MIDISTRM::Process 86 * 87 * 86 * Consume MIDI bytes from the MMPM/2 stream buffers and send 87 * them off to the MIDI parser to be interpreted. 88 88 * @param void 89 89 * @return void 90 90 * @notes Runs at Task time on a global context hook; does not run 91 * on an interrupt level.Interacts with the Timer object defined92 * 93 * 91 * on an interrupt level. Interacts with the Timer object defined 92 * for this stream to obtain current time and to request next Stream 93 * time to be scheduled. 94 94 */ 95 95 void MIDISTREAM::Process( void ) 96 96 { 97 ULONG ulNewTime; 98 ULONG ulElapsedTime; 97 ULONG ulNewTime; // Time, in mSec, on entry. 98 ULONG ulElapsedTime; // Elapsed time, last tick to this one. 99 99 100 100 // Update time variables. 101 101 ulNewTime = ((MIDIAUDIO*) pahw)->getTimer()->ulGetTime(); 102 102 if ( ulNewTime > _ulLastProcess ) 103 103 ulElapsedTime = ulNewTime - _ulLastProcess; 104 104 else 105 105 ulElapsedTime = 0; 106 106 107 107 _ulLastProcess = ulNewTime; 108 108 ulCurrentTime = ulNewTime; 109 109 110 if (qhInProcess.IsElements() == 0) 111 112 113 if (ulStreamState == STREAM_PAUSED) 114 110 if (qhInProcess.IsElements() == 0) // no buffers to process? 111 return; 112 113 if (ulStreamState == STREAM_PAUSED) // is the stream paused? 114 return; 115 115 116 116 ProcessEvents(); … … 123 123 124 124 while (lWait <= 0 && qhInProcess.IsElements()) { 125 126 127 128 129 130 131 132 125 parse(*(pbuff + (pstreambuff->ulBuffpos)++)); 126 127 if (pstreambuff->ulBuffpos >= buffsz) { 128 qhDone.PushOnTail(qhInProcess.PopHead()); 129 pstreambuff = (PSTREAMBUFFER) qhInProcess.Head(); 130 pbuff = pstreambuff->pBuffptr; 131 buffsz = pstreambuff->ulBuffsz; 132 } 133 133 } 134 134 while (qhDone.IsElements()) 135 135 ReturnBuffer(); 136 136 137 137 // Determine next time to run. If we submit a time that has already … … 163 163 } 164 164 /**@internal MIDISTREAM::_allNotesOff 165 * 165 * Shut off all notes that are currently playing. 166 166 * @param None. 167 167 * @return void 168 168 * @notes This function walks the _notesOn array and shuts off any note 169 * 169 * that is flagged as being actively played. 170 170 */ 171 171 void MIDISTREAM::_allNotesOff( void ) 172 172 { 173 173 for ( USHORT noteNum=0; noteNum < NUM_MidiNotes; ++noteNum) 174 175 176 177 178 179 pahw->noteOff(StreamId,(BYTE)mchan, (BYTE)noteNum, 0 );180 181 174 if (_notesOn[noteNum]) 175 // This note number is playing on one or more channels. 176 // Shut the note off on all channels on which it is playing. 177 for ( USHORT mchan=0; mchan < NUM_MidiChannels; ++mchan) 178 if (_notesOn[noteNum] & _usBitNumber[mchan]) { 179 pahw->noteOff(StreamId, (BYTE)mchan, (BYTE)noteNum, 0 ); 180 _notesOn[noteNum] &= ~(_usBitNumber[mchan]); 181 } 182 182 } 183 183 //****************************************************************************** … … 185 185 ULONG MIDISTREAM::StartStream(void) 186 186 { 187 //dprintf(("MIDISTREAM::StartStream %lx %lx", (void far *)this, StreamId));188 189 state = S_Init;// Reset parser state.190 message.clear();// Clear current message.191 192 193 194 195 196 197 198 199 200 201 187 //dprintf(("MIDISTREAM::StartStream %lx %lx", (void far *)this, StreamId)); 188 189 state = S_Init; // Reset parser state. 190 message.clear(); // Clear current message. 191 lWait = 0; //SvL, reset this too 192 193 pahw->getTimer()->vSetTime(ulCurrentTime); 194 if (!pahw->Start(StreamId)) { 195 DebugInt3(); 196 return ERROR_START_STREAM; 197 } 198 199 ulStreamState = STREAM_STREAMING; 200 pahw->SetVolume(StreamId, getMixerStreamId(), volume); 201 return NO_ERROR; 202 202 } 203 203 //****************************************************************************** … … 205 205 ULONG MIDISTREAM::StopStream(PCONTROL_PARM pControl) 206 206 { 207 208 //dprintf(("MIDISTREAM::StopStream %lx (already stopped)", StreamId));209 210 211 212 213 //dprintf(("MIDISTREAM::StopStream %lx %lx", (void far *)this, StreamId));214 215 216 217 218 219 207 if(ulStreamState == STREAM_STOPPED) { 208 //dprintf(("MIDISTREAM::StopStream %lx (already stopped)", StreamId)); 209 pControl->ulTime = GetCurrentTime(); 210 return NO_ERROR; 211 } 212 213 //dprintf(("MIDISTREAM::StopStream %lx %lx", (void far *)this, StreamId)); 214 ulStreamState = STREAM_STOPPED; 215 pahw->Stop(StreamId); 216 _allNotesOff(); 217 ReturnBuffers(); 218 pControl->ulTime = GetCurrentTime(); 219 return NO_ERROR; 220 220 } 221 221 //****************************************************************************** … … 223 223 ULONG MIDISTREAM::PauseStream(PCONTROL_PARM pControl) 224 224 { 225 //dprintf(("MIDISTREAM::PauseStream %lx %lx", (void far *)this, StreamId));226 if (ulStreamState == STREAM_PAUSED) {// is the stream paused?227 228 229 230 231 232 233 234 235 225 //dprintf(("MIDISTREAM::PauseStream %lx %lx", (void far *)this, StreamId)); 226 if (ulStreamState == STREAM_PAUSED) { // is the stream paused? 227 DebugInt3(); 228 return ERROR_INVALID_SEQUENCE; 229 } 230 231 pahw->Stop(StreamId); 232 _allNotesOff(); 233 pControl->ulTime = GetCurrentTime(); 234 ulStreamState = STREAM_PAUSED; 235 return NO_ERROR; 236 236 } 237 237 //****************************************************************************** … … 239 239 ULONG MIDISTREAM::ResumeStream(void) 240 240 { 241 //dprintf(("MIDISTREAM::ResumeStream %lx %lx", (void far *)this, StreamId));242 if (ulStreamState != STREAM_PAUSED) {// is the stream paused?243 244 245 246 247 state = S_Init;// Reset parser state.248 message.clear();// Clear current message.249 250 251 252 253 241 //dprintf(("MIDISTREAM::ResumeStream %lx %lx", (void far *)this, StreamId)); 242 if (ulStreamState != STREAM_PAUSED) { // is the stream paused? 243 DebugInt3(); 244 return ERROR_INVALID_SEQUENCE; 245 } 246 247 state = S_Init; // Reset parser state. 248 message.clear(); // Clear current message. 249 pahw->getTimer()->vSetTime(ulCurrentTime); 250 pahw->Start(StreamId); 251 pahw->SetVolume(StreamId, getMixerStreamId(), volume); 252 ulStreamState = STREAM_STREAMING; 253 return NO_ERROR; 254 254 } 255 255 //****************************************************************************** … … 257 257 BOOL MIDISTREAM::SetProperty(int type, ULONG value, ULONG reserved) 258 258 { 259 260 261 volume = value; 262 263 264 265 266 267 268 269 270 259 switch(type) { 260 case PROPERTY_VOLUME: 261 volume = value; 262 if(ulStreamState == STREAM_STREAMING) { 263 pahw->SetVolume(StreamId, getMixerStreamId(), volume); 264 } 265 break; 266 267 default: 268 return STREAM::SetProperty(type, value, reserved); 269 } 270 return TRUE; 271 271 } 272 272 //****************************************************************************** … … 275 275 STREAM(streamtype, filesysnum, mixerStreamId) 276 276 { 277 //dprintf(("MIDISTREAM::ctor"));278 279 280 281 282 283 // 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 277 //dprintf(("MIDISTREAM::ctor")); 278 279 // get the pointer to the hardware object 280 pahw = (MIDIAUDIO *)GetHardwareDevice(streamtype); 281 if(pahw) { 282 if(pahw->Open(0, streamtype, filesysnum, &StreamId) == FALSE) { 283 // dprintf(("MIDISTREAM ctor: open failed!!")); 284 DebugInt3(); 285 } 286 } 287 else DebugInt3(); 288 289 // Initialize tempo & scheduling information. 290 ulTempo = 1200; 291 usCPQN = 0; 292 CalcDelay(); 293 lWait = 0; 294 _ulLastProcess = 0; 295 296 // Reset the parser. 297 state = S_Init; 298 message.clear(); 299 300 // Reset our tracking of which notes are currently on. 301 for (int i=0; i<NUM_MidiNotes; ++i) 302 _notesOn[ i ] = 0; 303 303 } 304 304 //****************************************************************************** … … 306 306 MIDISTREAM::~MIDISTREAM() 307 307 { 308 309 310 311 } 312 //****************************************************************************** 313 //****************************************************************************** 314 308 if(StreamId && pahw) { 309 pahw->Close(StreamId); 310 } 311 } 312 //****************************************************************************** 313 //****************************************************************************** 314 -
TabularUnified OCO/branches/DAZ/drv16/mixer.cpp ¶
r513 r524 116 116 if(DevHelp_VerifyAccess(SELECTOROF(pMixStruct), sizeof(MIXSTRUCT), OFFSETOF(pMixStruct), VERIFY_READWRITE)) 117 117 { 118 dprintf(("Invalid IOCTL90 pointer %lx!!", (ULONG)pMixStruct));118 rprintf(("Invalid IOCTL90 pointer %lx!!", (ULONG)pMixStruct)); 119 119 prp->usStatus |= RPERR | RPBADCMD; 120 120 return; … … 144 144 if(DevHelp_VerifyAccess(SELECTOROF(pMixStruct), sizeof(MIXSTRUCT), OFFSETOF(pMixStruct), VERIFY_READONLY)) 145 145 { 146 dprintf(("Invalid IOCTL90 pointer %lx!!", (ULONG)pMixStruct));146 rprintf(("Invalid IOCTL90 pointer %lx!!", (ULONG)pMixStruct)); 147 147 prp->usStatus |= RPERR | RPBADCMD; 148 148 return; … … 192 192 // case I90SRC_RES6: 193 193 default: 194 dprintf(("IoctlMixer: Unk VolL:%lx", (ULONG)pMixStruct->VolumeL));194 rprintf(("IoctlMixer: Unk VolL:%lx", (ULONG)pMixStruct->VolumeL)); 195 195 break; 196 196 } … … 253 253 if(DevHelp_VerifyAccess(SELECTOROF(pIoctlData), sizeof(ULONG), OFFSETOF(pIoctlData), VERIFY_READWRITE)) 254 254 { 255 dprintf(("Invalid IOCTL90 pointer %lx!!", (ULONG)pIoctlData));255 rprintf(("Invalid IOCTL90 pointer %lx!!", (ULONG)pIoctlData)); 256 256 prp->usStatus |= RPERR | RPBADCMD; 257 257 return; … … 263 263 if(DevHelp_VerifyAccess(SELECTOROF(pIoctlMap), sizeof(ALSAIOCTLMap), OFFSETOF(pIoctlMap), VERIFY_READWRITE)) 264 264 { 265 dprintf(("Invalid IOCTL90 pointer %lx!!", (ULONG)pMixStruct));265 rprintf(("Invalid IOCTL90 pointer %lx!!", (ULONG)pMixStruct)); 266 266 prp->usStatus |= RPERR | RPBADCMD; 267 267 return; … … 277 277 if(DevHelp_VerifyAccess(SELECTOROF(pIoctlData), sizeof(ULONG), OFFSETOF(pIoctlData), VERIFY_READONLY)) 278 278 { 279 dprintf(("Invalid IOCTL90 pointer %lx!!", (ULONG)pIoctlData));279 rprintf(("Invalid IOCTL90 pointer %lx!!", (ULONG)pIoctlData)); 280 280 prp->usStatus |= RPERR | RPBADCMD; 281 281 return; … … 286 286 if(hMixerNotifySem != 0) { 287 287 if(DevHelp_OpenEventSem(hMixerNotifySem) != 0) { 288 dprintf(("CALLBACKREG: DevHlp_OpenEventSem %lx failed!", hMixerNotifySem));288 rprintf(("CALLBACKREG: DevHlp_OpenEventSem %lx failed!", hMixerNotifySem)); 289 289 prp->usStatus |= RPERR | RPBADCMD; 290 290 return; … … 294 294 if(oldsem) { 295 295 if(DevHelp_CloseEventSem(oldsem) != 0) { 296 dprintf(("CALLBACKREG: DevHlp_OpenEventSem %lx failed!", oldsem));296 rprintf(("CALLBACKREG: DevHlp_OpenEventSem %lx failed!", oldsem)); 297 297 prp->usStatus |= RPERR | RPBADCMD; 298 298 return; … … 304 304 // case MSGBUF: 305 305 default: 306 dprintf(("IoctlMixer: bad code:%lx", (ULONG)prp->s.ioctl.bCode));306 rprintf(("IoctlMixer: bad code:%lx", (ULONG)prp->s.ioctl.bCode)); 307 307 prp->usStatus |= RPERR | RPBADCMD; 308 308 return; … … 359 359 360 360 if(OSS16_MixSetVolume(mixerStreamId, (USHORT)ulControl, ulVolume) != OSSERR_SUCCESS) { 361 dprintf(("MixerSetVolume: OSS16_MixSetVolume failed!!"));361 rprintf(("MixerSetVolume: OSS16_MixSetVolume failed!!")); 362 362 return FALSE; 363 363 } … … 507 507 508 508 if(OSS16_MixSetProperty(mixerStreamId, (USHORT)ulControl, ulALSAValue) != OSSERR_SUCCESS) { 509 dprintf(("MixerSetProperty: OSS16_MixSetProperty failed!!"));509 rprintf(("MixerSetProperty: OSS16_MixSetProperty failed!!")); 510 510 return FALSE; 511 511 } … … 593 593 rc = DevHelp_PostEventSem(hMixerNotifySem); 594 594 if(rc != 0) { 595 dprintf(("MixerNotifyChange: DevHlp_PostEventSem returned %d", rc));595 rprintf(("MixerNotifyChange: DevHlp_PostEventSem returned %d", rc)); 596 596 } 597 597 rc = DevHelp_VirtToLin(SELECTOROF(pNumPosts), OFFSETOF(pNumPosts), &linaddr); … … 603 603 rc = DevHelp_ResetEventSem(hMixerNotifySem, linaddr); 604 604 if(rc != 0) { 605 dprintf(("MixerNotifyChange: DevHelp_ResetEventSem returned %d", rc));605 rprintf(("MixerNotifyChange: DevHelp_ResetEventSem returned %d", rc)); 606 606 } 607 607 } … … 652 652 } 653 653 if(mixcaps.fuCtrlCaps & OSS32_MIX_FLAG(OSS32_MIX_VOLUME_MIDI)) { 654 dprintf(("MixerInit: MIX_VOLUME_MIDI not processed"));654 rprintf(("MixerInit: MIX_VOLUME_MIDI not processed")); 655 655 } 656 656 if(mixcaps.fuCtrlCaps & OSS32_MIX_FLAG(OSS32_MIX_VOLUME_LINEIN)) { … … 730 730 mixinfo.VolumeR = mixinfo.VolumeL = 80; 731 731 IoctlMixer(&rp, LDev); 732 //dprintf(("MixerInit: MIX_VOLUME_HEADPHONE not processed"));732 //dprintf(("MixerInit: MIX_VOLUME_HEADPHONE not processed")); 733 733 } 734 734 if(mixcaps.fuCtrlCaps & OSS32_MIX_FLAG(OSS32_MIX_VOLUME_AUX)) { -
TabularUnified OCO/branches/DAZ/drv16/mpu401.cpp ¶
r478 r524 61 61 strcpy( szRTMIDI_Name, szName ); // Setup instance name. 62 62 strcat( szRTMIDI_Name, szSuffix ); // Append ASCII number to instance name. 63 //dprintf(("rtmidi name [%s]",szRTMIDI_Name));63 //dprintf(("rtmidi name [%s]",szRTMIDI_Name)); 64 64 ulRTMIDI_Caps = MIDICAPSA_INPUT | MIDICAPSA_OUTPUT; // Set RTMIDI caps. 65 65 midiOutStreamId = 0; … … 72 72 { 73 73 // dprintf(("MPU_401::open")); 74 if(midiOutStreamId == 0) 74 if(midiOutStreamId == 0) 75 75 { 76 76 //vladest if(OSS16_MidiOpen(OSS32_DEFAULT_MPU401_DEVICE, MPU401_SEND, pStreamId) != OSSERR_SUCCESS) -
TabularUnified OCO/branches/DAZ/drv16/rtmidi.cpp ¶
r483 r524 61 61 62 62 if (DevHelp_AttachDD((NPSZ) "MIDI$ ", (NPBYTE) &DDTable)) { 63 dprintf(("rtmidi: error attaching to MIDI.SYS"));63 rprintf(("rtmidi: error attaching to MIDI.SYS")); 64 64 return; 65 65 } … … 74 74 DDTable.pfn( ® ); 75 75 if (SELECTOROF(reg.pfnRegisterA) != SELECTOROF(DDTable.pfn)) { 76 dprintf(("rtmidi: invalid selector for pfnRegisterA"));76 rprintf(("rtmidi: invalid selector for pfnRegisterA")); 77 77 return; 78 78 } … … 136 136 return MIDIERRA_HW_FAILED; 137 137 } 138 #ifdef DEBUG139 138 // dprintf(("rtmidi: Open. Mode: %d",usMode)); 140 #endif141 139 switch (usMode) { 142 140 case MIDIMODE_OPEN_RECEIVE: … … 144 142 pma->midiOutStreamId = pma->RTMIDI_OpenReceive(); 145 143 if(!pma->midiOutStreamId) return MIDIERRA_HW_FAILED; 146 #ifdef DEBUG147 144 // dprintf(("rtmidi: Receive openened. stream: %d",pma->midiOutStreamId)); 148 #endif149 145 return 0; 150 146 } … … 153 149 pma->midiInStreamId = pma->RTMIDI_OpenSend(); 154 150 if(!pma->midiInStreamId) return MIDIERRA_HW_FAILED; 155 #ifdef DEBUG156 151 // dprintf(("rtmidi: Send openened. stream: %d",pma->midiInStreamId)); 157 #endif158 152 return 0; 159 153 } -
TabularUnified OCO/branches/DAZ/drv16/strategy.cpp ¶
r497 r524 3 3 /* SCCSID = %W% %E% */ 4 4 /**************************************************************************** 5 * 6 * Copyright (c) IBM Corporation 1994 - 1997. 7 * 8 * The following IBM OS/2 source code is provided to you solely for the 5 * * 6 * Copyright (c) IBM Corporation 1994 - 1997. * 7 * * 8 * The following IBM OS/2 source code is provided to you solely for the * 9 9 * the purpose of assisting you in your development of OS/2 device drivers. * 10 * You may use this code in accordance with the IBM License Agreement 11 * provided in the IBM Device Driver Source Kit for OS/2. 12 * 10 * You may use this code in accordance with the IBM License Agreement * 11 * provided in the IBM Device Driver Source Kit for OS/2. * 12 * * 13 13 ****************************************************************************/ 14 14 /**@internal %W% … … 17 17 * @version %I% 18 18 * @context Unless otherwise noted, all interfaces are Ring-0, 16-bit, 19 * 19 * kernel stack. 20 20 * @history 21 21 * 22 22 */ 23 extern "C" { 23 extern "C" { // 16-bit header files are not C++ aware 24 24 #define INCL_NOPMAPI 25 25 #define INCL_DOSINFOSEG … … 33 33 #include <devhelp.h> 34 34 #include "strategy.h" 35 #include "rtmidi.hpp" 35 #include "rtmidi.hpp" // Object definition 36 36 #include "end.h" 37 37 … … 84 84 extern "C" char szAZX[]; 85 85 86 static char *pszIntelICH 86 static char *pszIntelICH = (char *)szINTEL_ICH; 87 87 static char *pszSigmatel9721_23 = (char *)szSIGMATEL_9721_23; 88 static char *pszSBLive 89 static char *pszCMedia 90 static char *pszCrystal4281 91 static char *pszALS4000 92 static char *pszCrystal46XX 93 static char *pszVIA82XX 94 static char *pszESS1938 95 static char *pszVORTEX 96 static char *pszES1371 97 static char *pszES1370 98 static char *pszYAMAHA 99 static char *pszMAESTRO 100 static char *pszMAESTRO3 101 static char *pszALLEGRO 102 static char *pszALI5451 103 static char *pszSI7012 104 static char *pszALI5455 105 static char *pszNVIDIA 106 static char *pszAMD 107 static char *pszTRIDENT 108 static char *pszNEOMAGIC 109 static char *pszFM801 110 static char *pszATIIXP 111 static char *pszAUDIGYLS 112 static char *pszBT87X 113 static char *pszAZX 88 static char *pszSBLive = (char *)szSBLIVE; 89 static char *pszCMedia = (char *)szCMEDIA; 90 static char *pszCrystal4281 = (char *)szCS4281; 91 static char *pszALS4000 = (char *)szALS4000; 92 static char *pszCrystal46XX = (char *)szCS46XX; 93 static char *pszVIA82XX = (char *)szVIA82XX; 94 static char *pszESS1938 = (char *)szESS1938; 95 static char *pszVORTEX = (char *)szVORTEX; 96 static char *pszES1371 = (char *)szES1371; 97 static char *pszES1370 = (char *)szES1370; 98 static char *pszYAMAHA = (char *)szYAMAHA; 99 static char *pszMAESTRO = (char *)szMAESTRO; 100 static char *pszMAESTRO3 = (char *)szMAESTRO3; 101 static char *pszALLEGRO = (char *)szALLEGRO; 102 static char *pszALI5451 = (char *)szALI5451; 103 static char *pszSI7012 = (char *)szSI7012; 104 static char *pszALI5455 = (char *)szALI5455; 105 static char *pszNVIDIA = (char *)szNVIDIA; 106 static char *pszAMD = (char *)szAMD; 107 static char *pszTRIDENT = (char *)szTRIDENT; 108 static char *pszNEOMAGIC = (char *)szNEOMAGIC; 109 static char *pszFM801 = (char *)szFM801; 110 static char *pszATIIXP = (char *)szATIIXP; 111 static char *pszAUDIGYLS = (char *)szAUDIGYLS; 112 static char *pszBT87X = (char *)szBT87X; 113 static char *pszAZX = (char *)szAZX; 114 114 #endif /* ENABLE_HW_CERTIFICATION */ 115 115 116 BOOL fNoHardware= FALSE;116 BOOL fNoHardware = FALSE; 117 117 118 118 extern void DBGCALLCONV APM_Init(); … … 126 126 int d; 127 127 for (;;) 128 129 // 130 131 132 133 134 128 { 129 // d = (int)(unsigned char)*string1 - (int)(unsigned char)(*string2 ^ 0x81); 130 d = (int)(unsigned char)*string1 - (int)(unsigned char)*string2; 131 if (d != 0 || *string1 == 0 || *string2 == 0) 132 return d; 133 ++string1; ++string2; 134 } 135 135 } 136 136 //****************************************************************************** … … 141 141 142 142 while (count != 0) 143 144 //d = (int)(unsigned char)*string1 - (int)(unsigned char)(*string2 ^ 0x81);145 146 147 148 149 150 143 { 144 // d = (int)(unsigned char)*string1 - (int)(unsigned char)(*string2 ^ 0x81); 145 d = (int)(unsigned char)*string1 - (int)(unsigned char)*string2; 146 if (d != 0 || *string1 == 0 || *string2 == 0) 147 return d; 148 ++string1; ++string2; 149 --count; 150 } 151 151 return 0; 152 152 } … … 160 160 if(OSS16_AttachToPdd() != OSSERR_SUCCESS) 161 161 { 162 163 // 164 162 DebugInt3(); 163 // DevHelp_Beep(500, 100); 164 goto failure; 165 165 } 166 166 … … 168 168 if(OSS16_QueryDevCaps(current_device, &devCaps[0]) != OSSERR_SUCCESS) 169 169 { 170 171 //DevHelp_Beep(2000, 100);172 170 DebugInt3(); 171 // DevHelp_Beep(2000, 100); 172 goto failure; 173 173 } 174 174 dprintf(("Device 0 name: %s", (char FAR *)devCaps[0].szDeviceName)); 175 175 if(devCaps[0].nrDevices > OSS32_MAX_AUDIOCARDS) 176 176 { 177 178 177 DebugInt3(); 178 devCaps[0].nrDevices = OSS32_MAX_AUDIOCARDS; 179 179 } 180 180 //Get caps of other devices (if present) 181 181 for(i=1;i<devCaps[0].nrDevices;i++) 182 182 { 183 184 185 186 183 if(OSS16_QueryDevCaps(i, &devCaps[i]) != OSSERR_SUCCESS) { 184 DebugInt3(); 185 goto failure; 186 } 187 187 } 188 188 … … 191 191 //Check for certified audiocard/chipsets 192 192 if(!xorstrncmp(devCaps[0].szDeviceName, pszIntelICH, 6) || 193 194 195 196 197 { 198 193 !xorstrcmp(devCaps[0].szDeviceName, pszSI7012) || 194 !xorstrcmp(devCaps[0].szDeviceName, pszALI5455) || 195 !xorstrncmp(devCaps[0].szDeviceName, pszNVIDIA, 6) || 196 !xorstrcmp(devCaps[0].szDeviceName, pszAMD)) 197 { 198 soundCard = INTELICH; 199 199 } 200 200 else 201 201 if(!xorstrcmp(devCaps[0].szDeviceName, pszSBLive)) 202 202 { 203 203 soundCard = SBLIVE; 204 204 } 205 205 else 206 206 if(!xorstrncmp(devCaps[0].szDeviceName, pszCMedia, 11)) 207 207 { 208 208 soundCard = CMEDIA; 209 209 } 210 210 else 211 211 if(!xorstrcmp(devCaps[0].szDeviceName, pszCrystal4281)) 212 212 { 213 213 soundCard = CS4281; 214 214 } 215 215 else 216 216 if(!xorstrcmp(devCaps[0].szDeviceName, pszALS4000)) 217 217 { 218 219 220 221 222 218 //hardware not completely full duplex; sample rates must be identical if 219 //both playback & recording active 220 devCaps[0].waveInCaps.ulRateFlags |= OSS32_CAPS_PCM_RATE_HALFDUPLEX; 221 devCaps[0].waveOutCaps.ulRateFlags |= OSS32_CAPS_PCM_RATE_HALFDUPLEX; 222 soundCard = ALS4000; 223 223 } 224 224 else 225 225 if(!xorstrcmp(devCaps[0].szDeviceName, pszCrystal46XX)) 226 226 { 227 227 soundCard = CS46XX; 228 228 } 229 229 else 230 230 if(!xorstrncmp(devCaps[0].szDeviceName, pszVIA82XX, 6)) 231 231 { 232 232 soundCard = VIA82XX; 233 233 } 234 234 else 235 235 if(!xorstrcmp(devCaps[0].szDeviceName, pszESS1938)) 236 236 { 237 237 soundCard = ESS1938; 238 238 } 239 239 else 240 240 if(!xorstrncmp(devCaps[0].szDeviceName, pszVORTEX, 6)) 241 241 { 242 242 soundCard = VORTEX; 243 243 } 244 244 else 245 245 if(!xorstrncmp(devCaps[0].szDeviceName, pszYAMAHA,6)) 246 246 { 247 247 soundCard = YAMAHA; 248 248 } 249 249 else 250 250 if(!xorstrcmp(devCaps[0].szDeviceName, pszMAESTRO)) 251 251 { 252 253 } 254 else 255 256 257 { 258 259 } 260 else 261 262 263 { 264 252 soundCard = MAESTRO; 253 } 254 else 255 if(!xorstrcmp(devCaps[0].szDeviceName, pszMAESTRO3) || 256 !xorstrcmp(devCaps[0].szDeviceName, pszALLEGRO)) 257 { 258 soundCard = MAESTRO3; 259 } 260 else 261 if(!xorstrncmp(devCaps[0].szDeviceName, pszES1371, 6) || 262 !xorstrncmp(devCaps[0].szDeviceName, pszES1370, 6)) 263 { 264 soundCard = ENSONIQ; 265 265 } 266 266 else 267 267 if(!xorstrcmp(devCaps[0].szDeviceName, pszALI5451)) 268 268 { 269 269 soundCard = ALI5451; 270 270 } 271 271 else 272 272 if(!xorstrncmp(devCaps[0].szDeviceName, pszTRIDENT,7)) 273 273 { 274 274 soundCard = TRIDENT; 275 275 } 276 276 else 277 277 if(!xorstrncmp(devCaps[0].szDeviceName, pszNEOMAGIC,5)) 278 278 { 279 279 soundCard = NEOMAGIC; 280 280 } 281 281 else 282 282 if(!xorstrncmp(devCaps[0].szDeviceName, pszFM801,5)) 283 283 { 284 284 soundCard = FM801; 285 285 } 286 286 else 287 287 if(!xorstrncmp(devCaps[0].szDeviceName, pszATIIXP,7)) 288 288 { 289 289 soundCard = ATIIXP; 290 290 } 291 291 else 292 292 if(!xorstrncmp(devCaps[0].szDeviceName, pszAUDIGYLS,6)) 293 293 { 294 294 soundCard = AUDIGYLS; 295 295 } 296 296 else 297 297 if(!xorstrncmp(devCaps[0].szDeviceName, pszBT87X,5)) 298 298 { 299 299 soundCard = BT87X; 300 300 } 301 301 else 302 302 if(!xorstrncmp(devCaps[0].szDeviceName, pszAZX,9)) 303 303 { 304 304 soundCard = AZX; 305 305 } 306 306 else { 307 // printk("Soundcard %s not supported", (char FAR *)devCaps[0].szDeviceName); 308 dprintf(("Soundcard %s not supported", (char FAR *)devCaps[0].szDeviceName)); 309 // DevHelp_Beep(1000, 50); 310 DebugInt3(); 311 goto failure; 307 rprintf(("Soundcard %s not supported", (char FAR *)devCaps[0].szDeviceName)); 308 //DevHelp_Beep(1000, 50); 309 DebugInt3(); 310 goto failure; 312 311 } 313 312 #endif /* ENABLE_HW_CERTIFICATION */ … … 315 314 316 315 failure: 317 // 318 319 316 // DevHelp_Beep(1000, 50); 317 fNoHardware = TRUE; 318 return FALSE; 320 319 } 321 320 … … 329 328 { 330 329 if(InitializeAudio() == FALSE) { 331 330 return; 332 331 } 333 332 if(fNoHardware) return; … … 338 337 if(devCaps[0].ulCaps & OSS32_CAPS_FMSYNTH_PLAYBACK) 339 338 { 340 341 342 343 344 345 346 347 348 349 350 351 339 dprintf(("Creating FM Synthesizer device")); 340 341 // Build a FMSYNTH object. First create a timer, then the HW object. 342 TIMER* pFMSynthTimer = 343 new TIMER( NULL, MIDI_TimerInterval, STREAM_FMSYNTH_PLAY ); 344 if (pFMSynthTimer->eState() != TIMER_Disabled) 345 new FMSYNTH( pFMSynthTimer ); 346 347 SetHardwareType(AUDIOHW_FMSYNTH_PLAY, MIDI, OPERATION_PLAY, 1); 348 SetHardwareType(AUDIOHW_FMSYNTH_PLAY, DATATYPE_MIDI, OPERATION_PLAY, 1); 349 // MIDI on Warp 3 350 SetHardwareType(AUDIOHW_FMSYNTH_PLAY, DATATYPE_NULL, OPERATION_PLAY, 1); 352 351 } 353 352 354 353 if((devCaps[0].ulCaps & OSS32_CAPS_MPU401_PLAYBACK) && 355 356 { 357 358 359 360 361 // vladestnew TIMER(NULL, MIDI_TimerInterval, STREAM_MPU401_PLAY );362 363 364 365 366 367 // 368 // 369 370 371 372 373 354 (devCaps[0].ulCaps & OSS32_CAPS_MPU401_CAPTURE)) 355 { 356 dprintf(("Creating MPU401 device")); 357 358 // Build the MPU401 object. First create a timer, then the HW object. 359 TIMER* pMPUTimer = 360 // vladest new TIMER(NULL, MIDI_TimerInterval, STREAM_MPU401_PLAY ); 361 new TIMER(NULL, MIDI_TimerInterval, STREAM_MPU401_CAPTURE ); 362 363 if (pMPUTimer->eState() != TIMER_Disabled) 364 new MPU_401(pMPUTimer); 365 366 // SetHardwareType(AUDIOHW_MPU401_PLAY, MIDI, OPERATION_PLAY, 0); 367 // SetHardwareType(AUDIOHW_MPU401_PLAY, DATATYPE_MIDI, OPERATION_PLAY, 0); 368 369 SetHardwareType(AUDIOHW_MPU401_CAPTURE, MIDI, OPERATION_RECORD, 0); 370 SetHardwareType(AUDIOHW_MPU401_CAPTURE, DATATYPE_MIDI, OPERATION_RECORD, 0); 371 372 RTMIDI::vConnect(); 374 373 } 375 374 APM_Init(); … … 380 379 * Purpose: Worker rountine for the Strategy Open function. 381 380 * 382 * Notes: 383 * and the function is treated as a NOP.The first allocation of384 * 385 * 386 * 387 * 388 * 389 * 381 * Notes: The Strategy Open doesn't require allocation of any resources, 382 * and the function is treated as a NOP. The first allocation of 383 * resources happens at Strategy IOCtl time, in the handler for 384 * the AudioInit IOCtl. 385 * Check to see if the VDD has claimed the hardware and return with 386 * the busy bit on the the request packet. 387 * Increment the InUseCount so we know that an OS/2 app has an 388 * instance open and we don't let the VDD take the hardware.. 390 389 * 391 390 * … … 395 394 { 396 395 if (usVDDHasHardware) { 397 396 prp->usStatus = RPDONE | RPERR | RPBUSY; 398 397 } 399 398 else { 400 399 ++usInUseCount; 401 400 } 402 401 } … … 405 404 void StrategyClose(PREQPACKET prp) 406 405 { 407 408 409 410 411 412 dprintf(("Close NULL stream"));;//### Log unexpected condition.406 --usInUseCount; 407 PSTREAM pstream = FindStream_fromFile( prp->s.open_close.usSysFileNum ); 408 if (pstream) 409 delete pstream; 410 else 411 dprintf(("Close NULL stream"));; //### Log unexpected condition. 413 412 } 414 413 //****************************************************************************** … … 416 415 void StrategyDeinstall(PREQPACKET prp) 417 416 { 418 419 417 while (pAudioHWList->IsElements()) 418 pAudioHWList->DestroyElement(pAudioHWList->PopHead()); 420 419 } 421 420 //****************************************************************************** … … 423 422 void StrategyShutdown(PREQPACKET prp) 424 423 { 425 424 dprintf(("StrategyShutdown %d", prp->s.shutdown.Function)); 426 425 } 427 426 //****************************************************************************** … … 446 445 447 446 if(fNoHardware) { 448 449 447 prp->usStatus = RPDONE | RPERR | RPGENFAIL; 448 return; 450 449 } 451 450 … … 455 454 456 455 switch (prp->bCommand) { 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 dprintf(("Strategy Unk:0x%x", prp->bCommand));480 456 case STRATEGY_INIT: 457 StrategyInit(prp); 458 break; 459 case STRATEGY_OPEN: 460 StrategyOpen(prp); 461 break; 462 case STRATEGY_CLOSE: 463 StrategyClose(prp); 464 break; 465 case STRATEGY_GENIOCTL: 466 StrategyIoctl(prp, 0); 467 break; 468 case STRATEGY_DEINSTALL: 469 StrategyDeinstall(prp); 470 break; 471 case STRATEGY_INITCOMPLETE: 472 StrategyInitComplete(prp); 473 break; 474 case STRATEGY_SHUTDOWN: 475 StrategyShutdown(prp); 476 break; 477 default: 478 rprintf(("Strategy Unk:0x%x", prp->bCommand)); 479 prp->usStatus = RPDONE | RPERR | RPGENFAIL; 481 480 } 482 481 #ifdef DEBUG … … 493 492 494 493 if(fNoHardware) { 495 496 497 498 499 500 494 prp->usStatus = RPDONE | RPERR | RPGENFAIL; 495 if(prp->bCommand == STRATEGY_INIT) { 496 prp->s.init_out.usCodeEnd = 0; 497 prp->s.init_out.usDataEnd = 0; 498 } 499 return; 501 500 } 502 501 … … 506 505 507 506 switch (prp->bCommand) { 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 507 case STRATEGY_INIT: 508 prp->usStatus = RPDONE; 509 prp->s.init_out.usCodeEnd = (USHORT) &end_of_text; 510 prp->s.init_out.usDataEnd = (USHORT) &end_of_heap; 511 break; 512 case STRATEGY_OPEN: 513 StrategyOpen(prp); 514 break; 515 case STRATEGY_CLOSE: 516 StrategyClose(prp); 517 break; 518 case STRATEGY_GENIOCTL: 519 StrategyIoctl(prp, 1); 520 break; 521 case STRATEGY_DEINSTALL: 522 StrategyDeinstall(prp); 523 break; 524 case STRATEGY_INITCOMPLETE: 525 prp->usStatus = RPDONE; 526 break; 527 default: 528 prp->usStatus = RPDONE | RPERR | RPGENFAIL; 530 529 } 531 530 #ifdef DEBUG -
TabularUnified OCO/branches/DAZ/drv16/waudio.cpp ¶
r513 r524 407 407 408 408 default: 409 dprintf(("DataFormat wrong:%x",ulBitsPerSample));409 rprintf(("DataFormat wrong:%x",ulBitsPerSample)); 410 410 DebugInt3(); 411 411 return 0; … … 829 829 { 830 830 pConfigInfo->ulHwSampleRate = pConfigInfo->ulFixedSampleRate; 831 #ifdef DEBUG832 831 dprintf(("WA::QuerySampleFormat: SampleRate1 %d", pConfigInfo->ulHwSampleRate)); 833 #endif834 832 } 835 833 else 836 834 { 837 835 pConfigInfo->ulHwSampleRate = pConfigInfo->ulSampleRate; 838 #ifdef DEBUG839 836 dprintf(("WA::QuerySampleFormat: SampleRate2 %d", pConfigInfo->ulHwSampleRate)); 840 #endif841 837 } 842 838 -
TabularUnified OCO/branches/DAZ/drv16/waveplay.cpp ¶
r513 r524 71 71 if((ret = OSS16_WaveOpen(ulDevice, ulStreamType, ulSysFileNum, pStreamId)) != OSSERR_SUCCESS) 72 72 { 73 dprintf(("OSS16_WaveOpen failed!!"));73 rprintf(("OSS16_WaveOpen failed!!")); 74 74 DebugInt3(); 75 75 //StreamId = 0; … … 163 163 if (StreamId == NULL) 164 164 { 165 dprintf(("WAVEPLAY::ConfigDev. Error reopening stream"));165 rprintf(("WAVEPLAY::ConfigDev. Error reopening stream")); 166 166 return FALSE; 167 167 } … … 177 177 DebugInt3(); 178 178 ulFirstBufSize = 8192; //should never happen! 179 dprintf(("Arg - shouldn't happen"));179 rprintf(("Arg - shouldn't happen")); 180 180 } 181 181 } … … 268 268 if (AddBuffer(StreamId, pConfigInfo, pUserBuffer, ulBytesToTransfer, pulBytesTransferred) == FALSE) 269 269 { 270 dprintf(("Transfer.False. NoConv ulB %ld tr:%ld",ulBytesToTransfer,*pulBytesTransferred));270 rprintf(("Transfer failed. NoConv ulB %ld tr:%ld",ulBytesToTransfer,*pulBytesTransferred)); 271 271 *pulBytesTransferred = 0; 272 272 return FALSE; … … 309 309 else 310 310 { 311 dprintf(("Transfer Zero pConfigInfo->pfnConvert"));311 rprintf(("Transfer Zero pConfigInfo->pfnConvert")); 312 312 //DebugInt3(); 313 313 return FALSE; … … 372 372 if(rc == OSSERR_BUFFER_FULL) { 373 373 GetSpace(StreamId, pConfigInfo, &Space); 374 dprintf(("WPLAY::AddBuffer; %ld %x failed due to full buffer free space:%ld", ulCvtBufferSize, (USHORT)rc,Space));374 rprintf(("WPLAY::AddBuffer; %ld %x failed due to full buffer free space:%ld", ulCvtBufferSize, (USHORT)rc,Space)); 375 375 } else { 376 dprintf(("WPLAY::AddBuffer; %ld rc=%x failed", ulCvtBufferSize, (USHORT)rc));376 rprintf(("WPLAY::AddBuffer; %ld rc=%x failed", ulCvtBufferSize, (USHORT)rc)); 377 377 } 378 378 *pulBytesTransferred = 0; … … 410 410 { 411 411 *pulBytesTransferred = 0; 412 dprintf(("WPLAY::AddBuffer; OSS16_WaveAddBuffer failed due to an error rc=%x",(USHORT)rc));412 rprintf(("WPLAY::AddBuffer; OSS16_WaveAddBuffer failed due to an error rc=%x",(USHORT)rc)); 413 413 dprintf(("StreamID:%x PUB:%lx BtTr:%ld",(USHORT)StreamId, pUserBuffer, ulBytesToTransfer)); 414 414 return FALSE; … … 428 428 if(OSS16_WaveGetPos(StreamId, &ulCurBytesProcessed) != OSSERR_SUCCESS) { 429 429 *pulStreamPosition = 0; 430 dprintf(("WAVEPLAY::GetPosition: Failed"));430 rprintf(("WAVEPLAY::GetPosition: Failed")); 431 431 return FALSE; 432 432 } … … 449 449 { 450 450 *pulStreamSpace = 0; 451 dprintf(("WAVEPLAY::GetSpace: Failed"));451 rprintf(("WAVEPLAY::GetSpace: Failed")); 452 452 return FALSE; 453 453 } … … 469 469 { 470 470 *pulHwPtr = 0; 471 dprintf(("WAVEPLAY::WaveGetHwPtr: Failed"));471 rprintf(("WAVEPLAY::WaveGetHwPtr: Failed")); 472 472 return FALSE; 473 473 } -
TabularUnified OCO/branches/DAZ/drv16/waverec.cpp ¶
r483 r524 45 45 if(OSS16_WaveOpen(ulDevice, ulStreamType, ulSysFileNum, pStreamId) != OSSERR_SUCCESS) 46 46 { 47 dprintf(("OSS16_WaveOpen failed!!"));47 rprintf(("OSS16_WaveOpen failed!!")); 48 48 DebugInt3(); 49 49 StreamId = 0; … … 139 139 hwparam.ulDataType = QueryOSSDataFormat(OPERATION_RECORD, pConfigInfo->ulDataType, pConfigInfo->ulHwBitsPerSample); 140 140 if(OSS16_WaveSetFormat(StreamId, &hwparam) != OSSERR_SUCCESS) { 141 dprintf(("WAVEREC::ConfigDev: WaveSetFormat failed"));141 rprintf(("WAVEREC::ConfigDev: WaveSetFormat failed")); 142 142 DebugInt3(); 143 143 return FALSE; … … 152 152 ULONG FAR *pulBytesTransferred) 153 153 { 154 #ifdef DEBUG155 154 //dprintf(("WAVEREC::Transfer %lx bytes", ulBytesToTransfer)); 156 #endif157 155 if(pConfigInfo->usConversion == CONVERT_NONE) 158 156 { … … 308 306 if(OSS16_WaveGetHwPtr(StreamId, &space) != OSSERR_SUCCESS) { 309 307 *pulHwPtr = 0; 310 #ifdef DEBUG 311 dprintf(("OSS16_WAVEREC::WaveGetHwPtr: Failed")); 312 #endif /* DEBUG */ 308 rprintf(("OSS16_WAVEREC::WaveGetHwPtr: Failed")); 313 309 return FALSE; 314 310 } -
TabularUnified OCO/branches/DAZ/drv16/wavestrm.cpp ¶
r513 r524 188 188 // if this is a write stream call _vFillAudioBuf 189 189 //****************************************************************************** 190 s hort sDbgInProcess = 0;191 s hort sDbgSave;190 static short sAddBuffersInProcess = 0; 191 static short sDbgSave; 192 192 #pragma off (unreferenced) 193 193 void WAVESTREAM::AddBuffers(SHORT sFirst) … … 200 200 //dprintf(("WS:AddBuffers First=%d, SampleSize=%lx", sFirst, _configinfo.ulSampleSize)); 201 201 202 if (sDbgInProcess) { 202 if (sAddBuffersInProcess) { 203 // This routine cannot be reentered 204 // Some systems generate an extra interrupt causing this routine to be reentered 205 // so we ignore the call that causes us to be reentered 203 206 rprintf(("WS::ABS InProcess Now=%x Save=%x", sFirst, sDbgSave)); 204 207 return; 205 208 } 206 s DbgInProcess++;209 sAddBuffersInProcess++; 207 210 sDbgSave = sFirst; 208 211 … … 258 261 // } 259 262 } 260 s DbgInProcess--;263 sAddBuffersInProcess--; 261 264 } 262 265 -
TabularUnified OCO/branches/DAZ/drv16/wtsynth.cpp ¶
r252 r524 42 42 { 43 43 if(OSS16_MidiOpen(current_device, WAVETABLE_SEND, pStreamId) != OSSERR_SUCCESS) { 44 dprintf(("WTSYNTH::Open: OSS16_MidiOpen failed!!"));44 rprintf(("WTSYNTH::Open: OSS16_MidiOpen failed!!")); 45 45 DebugInt3(); 46 46 return FALSE; … … 53 53 { 54 54 if(OSS16_MidiClose(StreamId) != OSSERR_SUCCESS) { 55 dprintf(("WTSYNTH::Close: OSS16_MidiClose failed!!"));55 rprintf(("WTSYNTH::Close: OSS16_MidiClose failed!!")); 56 56 DebugInt3(); 57 57 return FALSE; … … 65 65 //****************************************************************************** 66 66 int WTSYNTH::writeByte(OSSSTREAMID StreamId, BYTE b) 67 { 68 int dummy = b; 69 return 0; 67 { 68 int dummy = b; 69 return 0; 70 70 } 71 71 //****************************************************************************** … … 76 76 //****************************************************************************** 77 77 int WTSYNTH::readByte(OSSSTREAMID StreamId) 78 { 78 { 79 79 DebugInt3(); 80 return -1; 80 return -1; 81 81 } 82 82 //****************************************************************************** … … 102 102 { 103 103 if(MixerSetVolume(mixerStreamId, OSS32_MIX_VOLUME_MIDI, ulVolume) != TRUE) { 104 dprintf(("WTSYNTH::SetVolume: MixerSetVolume failed!!"));104 rprintf(("WTSYNTH::SetVolume: MixerSetVolume failed!!")); 105 105 //not necessarily fatal; maybe there is no volume control for midi 106 106 } -
TabularUnified OCO/branches/DAZ/install/control.scr ¶
r513 r524 25 25 ssgroup=0 26 26 ssname="mmbase" 27 ssversion="1.9.3-BETA SVNr51 2"27 ssversion="1.9.3-BETA SVNr513" 28 28 sstermdll="ITERM.DLL" 29 29 sstermdllentry="ITermEntry" … … 43 43 ssgroup=17 44 44 ssname="OS/2 Universal Audio: Wave" 45 ssversion="1.9.3-BETA SVNr51 2"45 ssversion="1.9.3-BETA SVNr513" 46 46 sssize=680 47 47 ssdll="genin.dll"
Note:
See TracChangeset
for help on using the changeset viewer.