Changeset 507


Ignore:
Timestamp:
Jul 11, 2010, 5:31:02 PM (15 years ago)
Author:
David Azarewicz
Message:

Debug output changes

Location:
OCO/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • OCO/trunk/drv16/ssm_idc.cpp

    r483 r507  
    3333extern "C" int open_strategy;
    3434
     35#ifdef DEBUG
     36unsigned long DbgU16IdcCnt = 0;
     37extern "C" void dumpheap(void);
     38#endif
     39
    3540extern "C" ULONG __far __loadds __cdecl DDCMD_EntryPoint(PDDCMDCOMMON pCommon)
    3641{
    37    ULONG ulReturnCode = NO_ERROR;
    38    PSTREAM pstream=FindStream(pCommon->hStream);
     42        ULONG ulReturnCode = NO_ERROR;
     43        PSTREAM pstream=FindStream(pCommon->hStream);
     44
     45        if(!pstream && (pCommon->ulFunction != DDCMD_REG_STREAM)) {
     46                dprintf(("DDCMD_EntryPoint: invalid stream handle %x for cmd %ld", (USHORT)pCommon->hStream, pCommon->ulFunction));
     47                return ERROR_INVALID_STREAM;
     48        }
    3949
    4050#ifdef DEBUG
    41    if(pstream == NULL && pCommon->ulFunction != DDCMD_REG_STREAM) {
    42        dprintf(("DDCMD_EntryPoint: invalid stream handle %x for cmd %ld", (USHORT)pCommon->hStream, pCommon->ulFunction));
    43    }
     51        DbgU16IdcCnt++;
    4452#endif
    45    switch (pCommon->ulFunction) {
    4653
    47       case DDCMD_SETUP: {
    48          ddprintf(("DDCMD_SETUP"));
    49          if (!pstream)
    50          {
    51              dprintf(("DDCMD_SETUP err pstream"));
    52              return ERROR_INVALID_STREAM;
    53          }
    54          PDDCMDSETUP p = (PDDCMDSETUP) pCommon;
    55          SETUP_PARM __far *psp = (SETUP_PARM __far *) p->pSetupParm;
    56          pstream->SetCurrentTime(psp->ulStreamTime);
     54        switch (pCommon->ulFunction) {
     55        case DDCMD_SETUP: {
     56                PDDCMDSETUP p = (PDDCMDSETUP) pCommon;
     57                SETUP_PARM __far *psp = (SETUP_PARM __far *) p->pSetupParm;
    5758
    58          // if there is a flags field in the SETUP_PARM
    59          // the tell MMPM it can send us 'RECURRING' events....
    60          if (p->ulSetupParmSize > sizeof(ULONG))
    61          {
     59                dprintf(("DDCMD_SETUP"));
     60                pstream->SetCurrentTime(psp->ulStreamTime);
     61
     62                // if there is a flags field in the SETUP_PARM
     63                // the tell MMPM it can send us 'RECURRING' events....
     64                if (p->ulSetupParmSize > sizeof(ULONG)) {
    6265                        // dprintf(("DDCMD_SETUP ParmSize %ld", p->ulSetupParmSize));
    63             psp->ulFlags = SETUP_RECURRING_EVENTS;
    64          }
    65          break;
    66       }
    67       case DDCMD_READ: {
    68          ddprintf(("DDCMD_READ"));
    69          PDDCMDREADWRITE p=(PDDCMDREADWRITE) pCommon;
     66                        psp->ulFlags = SETUP_RECURRING_EVENTS;
     67                }
     68                break;
     69        }
     70        case DDCMD_READ: {
     71                dprintf(("DDCMD_READ"));
     72                PDDCMDREADWRITE p=(PDDCMDREADWRITE) pCommon;
    7073
    71          if (!pstream)
    72             return ERROR_INVALID_STREAM;
    73          ulReturnCode =
    74             pstream->Read((PSTREAMBUF) p->pBuffer,(unsigned) p->ulBufferSize);
    75          if (ulReturnCode)
    76             return ulReturnCode;
    77          break;
    78       }
    79       // Task time
    80       case DDCMD_WRITE:
    81       {
    82            PDDCMDREADWRITE p=(PDDCMDREADWRITE) pCommon;
     74                ulReturnCode = pstream->Read((PSTREAMBUF) p->pBuffer,(unsigned) p->ulBufferSize);
     75                break;
     76        }
     77        // Task time
     78        case DDCMD_WRITE: {
     79                PDDCMDREADWRITE p=(PDDCMDREADWRITE) pCommon;
    8380
    84            if (!pstream)
    85            {
    86               dprintf(("DDCMD_WRITE err stream %x", (USHORT)pstream));
    87               return ERROR_INVALID_STREAM;
    88            }
    89            ulReturnCode = pstream->Write((PSTREAMBUF) p->pBuffer,(unsigned) p->ulBufferSize);
    90            ddprintf(("DDCMD_WRITE %lx %lx rc=%ld", p->pBuffer, p->ulBufferSize, ulReturnCode));
    91            if (ulReturnCode)
    92               return ulReturnCode;
    93          break;
    94       }
    95       case DDCMD_STATUS: {
     81                ulReturnCode = pstream->Write((PSTREAMBUF) p->pBuffer,(unsigned) p->ulBufferSize);
     82                dprintf(("DDCMD_WRITE %lx %lx rc=%ld", p->pBuffer, p->ulBufferSize, ulReturnCode));
     83                break;
     84        }
     85        case DDCMD_STATUS: {
    9686                PDDCMDSTATUS p = (PDDCMDSTATUS) pCommon;
    9787                PSTATUS_PARM p2 = (PSTATUS_PARM) p->pStatus;
    98                 if (!pstream)
    99                         return ERROR_INVALID_STREAM;
     88
    10089                p2->ulTime = pstream->GetCurrentTime();
    101                 ddprintf(("DDCMD_STATUS time:%lx", p2->ulTime));
     90                //dprintf(("DDCMD_STATUS time:%lx", p2->ulTime));
    10291                break;
    103       }
    104       case DDCMD_CONTROL:
    105       {
    106          PDDCMDCONTROL p = (PDDCMDCONTROL) pCommon;
    107          if (!pstream)
    108          {
    109              dprintf(("DDCMD_CONTROL err stream %x", (USHORT)pstream));
    110              return ERROR_INVALID_STREAM;
    111          }
     92        }
     93        case DDCMD_CONTROL: {
     94                PDDCMDCONTROL p = (PDDCMDCONTROL) pCommon;
    11295
    113          switch (p->ulCmd)
    114          {
    115          case DDCMD_START:
    116              ddprintf(("DDCMD_START"));
    117              ulReturnCode = pstream->StartStream();
    118              //ddprintf(("DDCMD_START End rc=%ld",ulReturnCode));
    119              return ulReturnCode;
    120          case DDCMD_STOP:
    121              ddprintf(("DDCMD_STOP"));
     96                switch (p->ulCmd) {
     97                case DDCMD_START:
     98                        dprintf(("DDCMD_START"));
     99                        ulReturnCode = pstream->StartStream();
     100                        //dprintf(("DDCMD_START End rc=%ld",ulReturnCode));
     101                        break;
     102                case DDCMD_STOP:
     103                        dprintf(("DDCMD_STOP"));
    122104                        //DevHelp_ProcBlock ((ULONG)p, 2, 0);
    123              p->ulParmSize=sizeof(ULONG);
    124              return pstream->StopStream((PCONTROL_PARM)p->pParm);
    125          case DDCMD_PAUSE:
    126              ddprintf(("DDCMD_PAUSE"));
    127              p->ulParmSize=sizeof(ULONG);
    128             return pstream->PauseStream((PCONTROL_PARM)p->pParm);
    129          case DDCMD_RESUME:
    130              ddprintf(("DDCMD_RESUME"));
    131              return pstream->ResumeStream();
    132          case DDCMD_ENABLE_EVENT:
    133              ddprintf(("DDCMD_ENABLE_EVENT"));
    134              return pstream->EnableEvent(p);
    135          case DDCMD_DISABLE_EVENT:
    136              ddprintf(("DDCMD_DISABLE_EVENT"));
    137              return pstream->DisableEvent(p);
    138          case DDCMD_PAUSE_TIME:
    139              ddprintf(("DDCMD_PAUSE_TIME"));
    140              return pstream->PauseStreamTime();
    141          case DDCMD_RESUME_TIME:
    142              ddprintf(("DDCMD_RESUME_TIME"));
    143              return pstream->ResumeStreamTime();
    144          default:
    145                 ddprintf(("DDCMD INVALID REQUEST\n"));
    146             return ERROR_INVALID_REQUEST;
    147          } /* endswitch */
    148       }
    149       case DDCMD_REG_STREAM:
    150       {
    151          ddprintf(("DDCMD_REG_STREAM size:%lx countbuf:%lx",((PDDCMDREGISTER) pCommon)->ulBufSize, ((PDDCMDREGISTER) pCommon)->ulNumBufs));
    152          if (pstream)
    153          {
    154              dprintf(("DDCMD_REG_STREAM err stream %x", (USHORT)pstream));
    155              return ERROR_HNDLR_REGISTERED;
    156          }
    157          pstream = FindStream_fromFile(((PDDCMDREGISTER) pCommon)->ulSysFileNum);
    158          if (!pstream)
    159          {
    160              dprintf(("DDCMD_REG_STREAM1 err stream %x", (USHORT)pstream));
    161              return ERROR_STREAM_CREATION;
    162          }
    163          ulReturnCode = pstream->Register((PDDCMDREGISTER) pCommon);
    164          if (ulReturnCode)
    165          {
    166              dprintf(("DDCMD_REG_STREAM err stream %x returned %d", (USHORT)pCommon->hStream, (USHORT)ulReturnCode));
    167              return ERROR_STREAM_CREATION;
    168          }
    169          ddprintf(("DDCMD_REG_STREAM end size:%lx countbuf:%lx",((PDDCMDREGISTER) pCommon)->ulBufSize, ((PDDCMDREGISTER) pCommon)->ulNumBufs));
    170          break;
    171       }
    172       case DDCMD_DEREG_STREAM:
    173          ddprintf(("DDCMD_DEREG_STREAM"));
    174          if (!pstream)
    175              return ERROR_INVALID_STREAM;
    176          if ((USHORT)pCommon->hStream == 1)
    177              open_strategy = 1UL; // close it really
    178          pstream->DeRegister();
    179          //dprintf(("DDCMD_EntryPoint: DDCMD_DEREG_STREAM stream %x, %ld", (USHORT)pCommon->hStream, open_strategy));
    180          break;
    181         default:
    182          ddprintf(("INVALID DDCMD\n"));
    183          return ERROR_INVALID_FUNCTION;
    184    }
     105                        p->ulParmSize=sizeof(ULONG);
     106                        ulReturnCode = pstream->StopStream((PCONTROL_PARM)p->pParm);
     107                        break;
     108                case DDCMD_PAUSE:
     109                        dprintf(("DDCMD_PAUSE"));
     110                        p->ulParmSize=sizeof(ULONG);
     111                        ulReturnCode = pstream->PauseStream((PCONTROL_PARM)p->pParm);
     112                        break;
     113                case DDCMD_RESUME:
     114                        dprintf(("DDCMD_RESUME"));
     115                        ulReturnCode = pstream->ResumeStream();
     116                        break;
     117                case DDCMD_ENABLE_EVENT:
     118                        dprintf(("DDCMD_ENABLE_EVENT"));
     119                        ulReturnCode = pstream->EnableEvent(p);
     120                        break;
     121                case DDCMD_DISABLE_EVENT:
     122                        dprintf(("DDCMD_DISABLE_EVENT"));
     123                        ulReturnCode = pstream->DisableEvent(p);
     124                        break;
     125                case DDCMD_PAUSE_TIME:
     126                        dprintf(("DDCMD_PAUSE_TIME"));
     127                        ulReturnCode = pstream->PauseStreamTime();
     128                        break;
     129                case DDCMD_RESUME_TIME:
     130                        dprintf(("DDCMD_RESUME_TIME"));
     131                        ulReturnCode = pstream->ResumeStreamTime();
     132                        break;
     133                default:
     134                        rprintf(("DDCMD INVALID REQUEST\n"));
     135            ulReturnCode = ERROR_INVALID_REQUEST;
     136                        break;
     137                } /* endswitch */
     138                break;
     139        }
     140        case DDCMD_REG_STREAM: {
     141                dprintf(("DDCMD_REG_STREAM size:%lx countbuf:%lx",((PDDCMDREGISTER) pCommon)->ulBufSize, ((PDDCMDREGISTER) pCommon)->ulNumBufs));
     142                if (pstream) {
     143                        dprintf(("DDCMD_REG_STREAM err stream %x", (USHORT)pstream));
     144                        ulReturnCode = ERROR_HNDLR_REGISTERED;
     145                        break;
     146                }
     147                pstream = FindStream_fromFile(((PDDCMDREGISTER) pCommon)->ulSysFileNum);
     148                if (!pstream) {
     149                        dprintf(("DDCMD_REG_STREAM1 err stream %x", (USHORT)pstream));
     150                        ulReturnCode = ERROR_STREAM_CREATION;
     151                        break;
     152                }
     153                ulReturnCode = pstream->Register((PDDCMDREGISTER) pCommon);
     154                if (ulReturnCode) {
     155                        dprintf(("DDCMD_REG_STREAM err stream %x returned %d", (USHORT)pCommon->hStream, (USHORT)ulReturnCode));
     156                        ulReturnCode = ERROR_STREAM_CREATION;
     157                        break;
     158                }
     159                //dprintf(("DDCMD_REG_STREAM end size:%lx countbuf:%lx",((PDDCMDREGISTER) pCommon)->ulBufSize, ((PDDCMDREGISTER) pCommon)->ulNumBufs));
     160                break;
     161        }
     162        case DDCMD_DEREG_STREAM:
     163                dprintf(("DDCMD_DEREG_STREAM"));
     164                if ((USHORT)pCommon->hStream == 1) open_strategy = 1UL; // close it really
     165                pstream->DeRegister();
     166                //dprintf(("DDCMD_EntryPoint: DDCMD_DEREG_STREAM stream %x, %ld", (USHORT)pCommon->hStream, open_strategy));
     167                break;
     168        default:
     169                rprintf(("INVALID DDCMD\n"));
     170                ulReturnCode = ERROR_INVALID_FUNCTION;
     171                break;
     172        }
    185173
    186    return NO_ERROR;
     174#ifdef DEBUG
     175        DbgU16IdcCnt--;
     176#endif
     177        return ulReturnCode;
    187178}
  • OCO/trunk/drv16/stream.cpp

    r483 r507  
    6666        shdri.pBuffer = temp->pBuffptr;
    6767        shdri.ulStreamTime = GetCurrentTime();
    68                 //ddprintf(("Returning %lx Time=%lx", temp->pBuffptr, shdri.ulStreamTime));
     68                //dprintf(("Returning %lx Time=%lx", temp->pBuffptr, shdri.ulStreamTime));
     69                //dprintf(("Returning %lx", temp->pBuffptr));
    6970        pfnSHD(&shdri);
    7071        delete temp;
     
    174175ULONG STREAM::Register(PDDCMDREGISTER p)
    175176{
    176 //   ddprintf(("STREAM::Register"));
     177//   dprintf(("STREAM::Register"));
    177178   hstream             = p->hStream;
    178179   pfnSHD              = (PFN_SHD) p->pSHDEntryPoint;
  • OCO/trunk/drv16/waveplay.cpp

    r495 r507  
    4646    ULONG open_strategy = 0UL;
    4747    ULONG LastSpace=0;
    48 //    int force_close(void);
     48        //int force_close(void);
    4949}
    5050
     
    6060{
    6161    ULONG ret;
    62 #ifdef DEBUG
    63 //    dprintf(("WAVEPLAY::Open %lx",StreamId));
    64 #endif
     62        //dprintf(("WAVEPLAY::Open %lx",StreamId));
    6563    if (fAPMSuspend)
    6664    {
    67 #ifdef DEBUG
    68 //        dprintf(("WAVEPLAY::Open. Suspend state"));
    69 #endif
     65                //dprintf(("WAVEPLAY::Open. Suspend state"));
    7066        apm_resume();
    71         //return FALSE;
    7267    }
    7368
     
    7671        if((ret = OSS16_WaveOpen(ulDevice, ulStreamType, ulSysFileNum, pStreamId)) != OSSERR_SUCCESS)
    7772        {
    78 #ifdef DEBUG
    7973            dprintf(("OSS16_WaveOpen failed!!"));
    80 #endif
    8174            DebugInt3();
    82 //            StreamId = 0;
    83 //            waveOpened = 0;
     75                        //StreamId = 0;
     76                        //waveOpened = 0;
    8477            return FALSE;
    8578        } else
     
    10699BOOL WAVEPLAY::Close(OSSSTREAMID StreamIdl)
    107100{
    108 #ifdef DEBUG
    109 //    dprintf(("WAVEPLAY::Close stream: %lx, %lx, os: %lx", StreamId, waveOpened,open_strategy));
    110 #endif
     101        //dprintf(("WAVEPLAY::Close stream: %lx, %lx, os: %lx", StreamId, waveOpened,open_strategy));
    111102#if 0 // fixme to be gone?
    112103    //if ((open_strategy & 1))
     
    118109        open_strategy = 0UL;
    119110        force_closed = 0;
    120 #ifdef DEBUG
    121 //        dprintf(("WAVEPLAY::Closed stream: %lx, %lx, os: %lx", StreamId, waveOpened,open_strategy));
    122 #endif
     111                //dprintf(("WAVEPLAY::Closed stream: %lx, %lx, os: %lx", StreamId, waveOpened,open_strategy));
    123112        return TRUE;
    124113    }
     
    126115#endif // fixme to be gone?
    127116    {
    128 
    129117/* Setting DISABLE_STREAM_REUSE will close the open stream here.      */
    130118/* If left unset, the idea is the open stream will be reused instead. */
     
    139127                StreamId = 0UL;
    140128                open_strategy = 0UL;
    141 #ifdef DEBUG
    142 //                dprintf(("OSS16_WAVECLOSE: Success"));
    143 #endif /* DEBUG */
     129                                dprintf(("OSS16_WAVECLOSE: Success"));
    144130                return TRUE;
    145             } else
    146 #ifdef DEBUG
     131            } else {
    147132                dprintf(("OSS16_WAVECLOSE: Error"));
    148 #endif /* DEBUG */
    149133                return FALSE;
     134                        }
    150135        }
    151136        else
    152137#else /* !DISABLE_STREAM_REUSE */
    153         if (StreamIdl == NULL)
    154                 return FALSE;
     138                if (StreamIdl == NULL) return FALSE;
    155139#endif /* DISABLE_STREAM_REUSE */
    156140        return TRUE;
     
    170154    if (fAPMSuspend)
    171155    {
    172 #ifdef DEBUG
    173 //        dprintf(("WAVEPLAY::ConfigDev. Suspend state"));
    174 #endif
     156                //dprintf(("WAVEPLAY::ConfigDev. Suspend state"));
    175157        apm_resume();
    176         //return FALSE;
    177158    }
    178159
     
    182163        if (StreamId == NULL)
    183164        {
    184 #ifdef DEBUG
    185165            dprintf(("WAVEPLAY::ConfigDev. Error reopening stream"));
    186 #endif
    187166            return FALSE;
    188167        }
    189168    }
    190 #ifdef DEBUG
    191169    dprintf4(("WAVEPLAY::ConfigDev SampleRate %ld", pConfigInfo->ulHwSampleRate));
    192170    dprintf4(("WAVEPLAY::ConfigDev ulFirstBufSize=%lx ulFragsize=%lx", ulFirstBufSize, pConfigInfo->ulFragsize));
    193 #endif
    194171
    195172    if(ulFirstBufSize == 0)
     
    200177            DebugInt3();
    201178            ulFirstBufSize = 8192; //should never happen!
    202 #ifdef DEBUG
    203179            dprintf(("Arg - shouldn't happen"));
    204 #endif /* DEBUG */
    205180        }
    206181    }
     
    209184        //convert size of first buffer
    210185        ulFirstBufSize = ConvertLength(ulFirstBufSize, pConfigInfo);
    211 #ifdef DEBUG
    212186        dprintf4(("ulFirstBufSize %lx", ulFirstBufSize));
    213 #endif /* DEBUG */
    214187    }
    215188    //Must call this method (i.e. resets sample rate conversion position)
     
    221194    //convert consume rate
    222195    ulPCMConsumeRate = ConvertLength(pConfigInfo->ulPCMConsumeRate, pConfigInfo);
    223 #ifdef DEBUG
    224196    dprintf4(("cons rate %lx buf size %lx init rate %ld", ulPCMConsumeRate, ulFirstBufSize, pConfigInfo->ulHwSampleRate));
    225 #endif /* DEBUG */
    226197
    227198    fragsize = ulPCMConsumeRate/64; //start with 64 irqs/sec   2756
     
    250221    pConfigInfo->ulFragsize = fragsize;
    251222
    252 #ifdef DEBUG
    253223    dprintf4(("fragsize %lx", fragsize));
    254 #endif
    255224    hwparam.ulSampleRate    = pConfigInfo->ulHwSampleRate;
    256225    hwparam.ulBitsPerSample = pConfigInfo->ulHwBitsPerSample;
     
    258227    hwparam.ulDataType      = QueryOSSDataFormat(OPERATION_PLAY, pConfigInfo->ulDataType, pConfigInfo->ulHwBitsPerSample);
    259228    rc = (USHORT)OSS16_WaveSetFormat(StreamId, &hwparam);
    260 #ifdef DEBUG
    261229        dprintf4(("WAVEPLAY:ConfigDev:OSS16_WaveSetFormat . rc = %d",rc));
    262230        dprintf4(("samp rate=%ld bps=%ld channels=%ld type=%ld", hwparam.ulSampleRate, hwparam.ulBitsPerSample, hwparam.ulNumChannels, hwparam.ulDataType));
    263231
    264 #endif
    265232    if( rc != OSSERR_SUCCESS) {
    266233        dprintf(("WAVEPLAY:ConfigDev: rc %d",rc));
     
    276243//******************************************************************************
    277244//Convert (if required) and write wave data to audio device
     245// Return FALSE on error
    278246//******************************************************************************
    279247BOOL WAVEPLAY::Transfer(OSSSTREAMID StreamId, PWAVECONFIGINFO pConfigInfo,
     
    283251    *pulBytesTransferred = 0;
    284252
    285 #ifdef DEBUG
    286253    //dprintf(("WAVEPLAY::Transfer %ld",ulBytesToTransfer));
    287 #endif
    288 
    289     if (fAPMSuspend)
    290     {
    291 #ifdef DEBUG
    292 //        dprintf(("WAVEPLAY::Transfer. Suspend state"));
    293 #endif
     254
     255    if (fAPMSuspend) {
     256                //dprintf(("WAVEPLAY::Transfer. Suspend state"));
    294257        apm_resume();
    295         //return FALSE;
    296     }
    297 
    298     //PS very strange
    299     if (!ulBytesToTransfer)
    300     {
     258    }
     259
     260    if (!ulBytesToTransfer) {
    301261        return TRUE;
    302262    }
    303263
    304 //    if (!waveOpened) return TRUE;
     264        //if (!waveOpened) return TRUE;
    305265
    306266    if(pConfigInfo->usConversion == CONVERT_NONE)
     
    308268        if (AddBuffer(StreamId, pConfigInfo, pUserBuffer, ulBytesToTransfer, pulBytesTransferred) == FALSE)
    309269        {
    310 #ifdef DEBUG
    311270            dprintf(("Transfer.False. NoConv ulB %ld tr:%ld",ulBytesToTransfer,*pulBytesTransferred));
    312 #endif /* DEBUG */
    313271            *pulBytesTransferred = 0;
    314272            return FALSE;
     
    331289            {
    332290                dprintf(("Transfer New ulBr %ld" , ulBytesToTransfer));
    333 //                DebugInt3();
     291                                //DebugInt3();
    334292                ulBytesToTransfer = ulBytesToTransfer & ~(pConfigInfo->ulSampleSize-1);
    335 #ifdef DEBUG
    336293                dprintf(("Transfer New ulBr %ld" , ulBytesToTransfer));
    337 #endif
    338294            }
    339295            pConfigInfo->pfnConvert(pUserBuffer, ulBytesToTransfer, pConfigInfo->pConversionBuffer);
     
    347303            if(*pulBytesTransferred & (pConfigInfo->ulSampleSize-1))
    348304            {
    349 #ifdef DEBUG
    350305                dprintf(("Transfer New pulBr %ld" , pulBytesTransferred));
    351 #endif
    352 //                DebugInt3();
     306                                //DebugInt3();
    353307            }
    354308        }
     
    356310        {
    357311            dprintf(("Transfer Zero pConfigInfo->pfnConvert"));
    358 //            DebugInt3();
     312                        //DebugInt3();
    359313            return FALSE;
    360314        }
     
    370324    OSSRET rc;
    371325    ULONG  Space;
    372 //    if (!waveOpened) return TRUE;
    373 
    374 //PS Here is inrerrupt time....
    375     if (fAPMSuspend)
    376     {
    377 #ifdef DEBUG
    378 //        dprintf(("WAVEPLAY::AddBuffer. Suspend state"));
    379 #endif
     326        //if (!waveOpened) return TRUE;
     327
     328        //PS Here is inrerrupt time....
     329    if (fAPMSuspend) {
     330                //dprintf(("WAVEPLAY::AddBuffer. Suspend state"));
    380331        apm_resume();
    381332        //return FALSE;
     
    407358        if (ulCvtBufferSize > Space)
    408359        {
    409 #ifdef DEBUG
    410360            dprintf(("WPLAY::AddBuffer need %ld space:%ld", ulCvtBufferSize, Space));
    411 #endif
    412361            if (Space < pConfigInfo->ulBytesPerIRQ)
    413362            {
     
    482431    if(OSS16_WaveGetPos(StreamId, &ulCurBytesProcessed) != OSSERR_SUCCESS) {
    483432        *pulStreamPosition = 0;
    484 #ifdef DEBUG
    485433        dprintf(("WAVEPLAY::GetPosition: Failed"));
    486 #endif /* DEBUG */
    487434        return FALSE;
    488435    }
     
    505452    {
    506453        *pulStreamSpace = 0;
    507 #ifdef DEBUG
    508454        dprintf(("WAVEPLAY::GetSpace: Failed"));
    509 #endif /* DEBUG */
    510455        return FALSE;
    511456    }
     
    527472    {
    528473        *pulHwPtr = 0;
    529         #ifdef DEBUG
    530474        dprintf(("WAVEPLAY::WaveGetHwPtr: Failed"));
    531         #endif /* DEBUG */
    532475        return FALSE;
    533476    }
  • OCO/trunk/include/dbgos2.h

    r496 r507  
    1919#endif
    2020
     21/* rprintf is used to output info to the log for the retail version */
     22#define rprintf(a) PrintfOut a
     23
     24/* dprintf is used to output info into the log for the debug version */
    2125#ifdef DEBUG
    22 #define dprintf(a)  if(dbglevel >= 1) PrintfOut a
     26#define dprintf(a)  PrintfOut a
     27#define dprintf1(a) if(dbglevel >= 1) PrintfOut a
    2328#define dprintf2(a) if(dbglevel >= 2) PrintfOut a
    2429#define dprintf3(a) if(dbglevel >= 3) PrintfOut a
    2530#define dprintf4(a) if(dbglevel >= 4) PrintfOut a
    2631#else
    27 #define dprintf(a)  //if(dbglevel >= 1) PrintfOut a
    28 #define dprintf2(a) //if(dbglevel >= 2) PrintfOut a
    29 #define dprintf3(a) //if(dbglevel >= 3) PrintfOut a
    30 #define dprintf4(a) //if(dbglevel >= 4) PrintfOut a
     32#define dprintf(a)  //
     33#define dprintf1(a) //
     34#define dprintf2(a) //
     35#define dprintf3(a) //
     36#define dprintf4(a) //
    3137#endif
    3238
Note: See TracChangeset for help on using the changeset viewer.