Changeset 529


Ignore:
Timestamp:
Jul 27, 2010, 6:28:57 PM (15 years ago)
Author:
David Azarewicz
Message:

driver xrun changes

Location:
OCO/trunk
Files:
4 edited

Legend:

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

    r526 r529  
    227227         p->ulSamplingRate = HZ_44100;
    228228         //
    229          rprintf(("IACapability: Error support"));
     229         //dprintf(("IACapability: Error support"));
    230230         prp->usStatus |= RPERR;
    231231      }
  • OCO/trunk/drv16/wavestrm.cpp

    r526 r529  
    160160ULONG WAVESTREAM::_vUnderrunStart(void)
    161161{
    162         if (ulStreamState == STREAM_STREAMING) return 0;
     162//      if (ulStreamState == STREAM_STREAMING) return 0;
    163163        rprintf(("Underrun-start"));
    164         PSTREAMBUFFER pTemp = (PSTREAMBUFFER)qhInProcess.Head();
     164//      PSTREAMBUFFER pTemp = (PSTREAMBUFFER)qhInProcess.Head();
    165165//      if(pahw->ConfigDev(StreamId, &_configinfo, (pTemp) ? pTemp->ulBuffsz : 0) == FALSE) {
    166166//              rprintf(("WS::Write: ConfigDev failed"));
     
    198198        ULONG ulStatus;
    199199
    200         //dprintf(("WS:AddBuffers First=%d, SampleSize=%lx", sFirst, _configinfo.ulSampleSize));
    201200
    202201        if (sAddBuffersInProcess) {
     
    223222                }
    224223                ulSpace &= (~(_configinfo.ulSampleSize - 1));
    225 #if 1
    226                 /* DAZ testing -- underrun detection */
     224#if 0
     225                /* DAZ testing -- driver error and stopped */
    227226                if (ulSpace == 0) {
    228                         OSS16_WaveGetStatus(StreamId, &ulStatus);
    229                         rprintf(("WS::ABS ulSpace=0 state=%lx u32status=%lx", ulStreamState, ulStatus));
    230 
    231                         _vUnderrunStop("WS:ABS");
     227                        rprintf(("WS:AddBuffers Space=0"));
    232228                        _vUnderrunStart();
    233229
     
    376372void DBGCALLCONV WAVESTREAM::Process(void)
    377373{
    378         PSTREAMBUFFER pTemp;
    379         ULONG   ulBytes;
    380         ULONG ulDAZ;
    381 
    382         //dprintf(("WAVESTREAM::Process Start"));
    383 
    384         // get the stream position. if we get a bad rc or the position is 0
    385         // then we bail out. Hopefully this will be better next time.
    386         // GetPostiion returns the adjusted hw pointer from the ALSA status ioctl
    387         // This is really a running total of bytes consumed by the hardware.
    388         // DAZ - Note that this is a 32 bit counter and will wrap at sometime. ALSA
    389         // attempts to wrap this counter intelligently. I haven't determined what
    390         // effect, if any, the wrapping of this counter will have playing a stream.
    391         if(pahw->GetPosition(StreamId, &_configinfo, &ulBytes) == FALSE)
    392         {
    393                 //dprintf(("Error No bytes processed"));
    394                 DebugInt3();
    395                 return;
    396         }
    397         _ulBytesProcessed = ulBytes;
    398 
    399374        switch (ulStreamType & STREAM_WRITE)
    400375        {
    401376                case STREAM_WRITE:
     377                        {
     378                        PSTREAMBUFFER pTemp;
     379                        ULONG   ulBytes;
     380
     381                        // get the stream position. if we get a bad rc or the position is 0
     382                        // then we bail out. Hopefully this will be better next time.
     383                        // GetPostiion returns the adjusted hw pointer from the ALSA status ioctl
     384                        // This is really a running total of bytes consumed by the hardware.
     385                        // DAZ - Note that this is a 32 bit counter and will wrap at sometime. ALSA
     386                        // attempts to wrap this counter intelligently. I haven't determined what
     387                        // effect, if any, the wrapping of this counter will have playing a stream.
     388                        if(pahw->GetPosition(StreamId, &_configinfo, &ulBytes) == FALSE) {
     389                                //dprintf(("Error No bytes processed"));
     390                                DebugInt3();
     391                                return;
     392                        }
     393                        _ulBytesProcessed = ulBytes;
     394
    402395                        if(!qhInProcess.IsElements() && !qhDone.IsElements()) {
     396                                //Application underrun
    403397                                _vUnderrunStop("WS:Process");
    404398                                break;
     
    422416                        }
    423417                        break;
     418                        }
    424419                case STREAM_READ:
     420                        {
     421                        ULONG ulDAZ;
     422
    425423                        ulDAZ = 0;
    426424                        while(_vReadAudioBuf()) {
    427                                 if (ulDAZ++ > 20) { /* temporary hack to prevent hangs when uniaud32 stops (overruns) */
     425                                if (ulDAZ++ > 20) { /* temporary hack to prevent hangs if uniaud32 stops */
    428426                                        rprintf(("WS::Process Read DAZ Break"));
    429427                                        break;
     
    431429                        }
    432430                        break;
     431                        }
    433432                default:
    434433                        break;
     
    436435
    437436        ProcessEvents();
    438         //dprintf(("WAVESTREAM::Process End"));
    439437}
    440438//******************************************************************************
     
    444442#pragma on (unreferenced)
    445443{
    446         PSTREAMBUFFER pStreamBuf = new STREAMBUFFER(uLength, pbuf);
     444        PSTREAMBUFFER pStreamBuf;
     445        pStreamBuf = new STREAMBUFFER(uLength, pbuf);
    447446
    448447        return Write(pStreamBuf);
     
    453452{
    454453
    455 #if 1
    456         ULONG ulStatus;
    457 
    458         ulStatus = 0;
    459         if (OSS16_WaveGetStatus(StreamId, &ulStatus) != OSSERR_SUCCESS) ulStatus = SNDRV_PCM_STATE_XRUN;
    460         //dprintf(("WS::Write: status=%lx", ulStatus));
    461         if (ulStatus == SNDRV_PCM_STATE_XRUN) {
    462                 rprintf(("WS::Write: Xrun detect"));
    463                 _vUnderrunStop("WS:Write");
    464                 fUnderrun = TRUE;
    465         }
    466 #endif
    467454        qhInProcess.PushOnTail((PQUEUEELEMENT)pStreamBuf);
    468455        if (fUnderrun) {
     
    686673        pahw->Stop(StreamId);
    687674
    688 #if 0
    689         /* DAZ test code begin */
    690         if (pahw->GetPosition(StreamId, &_configinfo, &ulEndPos2) == FALSE) ulEndPos2 = 0;
    691         if (ulEndPos2 != ulEndPos) {
    692                 dprintf(("WS::PauseStream %lx!=%lx", ulEndPos, ulEndPos2));
    693                 if (ulEndPos2) ulEndPos = ulEndPos2;
    694         }
    695         /* DAZ test code end */
    696 #endif
    697 
    698675        ulStreamState = STREAM_PAUSED;
    699676
  • OCO/trunk/install/control.scr

    r526 r529  
    2525ssgroup=0
    2626ssname="mmbase"
    27 ssversion="1.9.3-SVNr526"
     27ssversion="1.9.4-SVNr529"
    2828sstermdll="ITERM.DLL"
    2929sstermdllentry="ITermEntry"
     
    4343ssgroup=17
    4444ssname="OS/2 Universal Audio: Wave"
    45 ssversion="1.9.3-SVNr526"
     45ssversion="1.9.4-SVNr529"
    4646sssize=680
    4747ssdll="genin.dll"
  • OCO/trunk/uniaud.inc

    r526 r529  
    77# BUILDVERSION must be 3 parts, and only numbers like 5.44.108
    88# It is best that 2nd number is always 2 digits, eg at least 10
    9 BUILDVERSION = 1.9.3
     9BUILDVERSION = 1.9.4
    1010
    1111# Fixpack version
     
    1313# ex RC3  GA  FIXPACK2 beta_47
    1414# Comment out to avoid a fixpack line in bldlevel
    15 FIXPACK = SVNr526
     15FIXPACK = SVNr529
    1616
    1717# ALSA BUILD VERSION
Note: See TracChangeset for help on using the changeset viewer.