Changeset 168 for sbliveos2/trunk


Ignore:
Timestamp:
Mar 23, 2001, 6:14:13 PM (24 years ago)
Author:
sandervl
Message:

Updates + fixes for DirectAudio interface

Location:
sbliveos2/trunk/drv16
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sbliveos2/trunk/drv16/dwavestrm.cpp

    r167 r168  
    3333#include "malloc.h"
    3434
    35 
    3635void cdecl HookHandler(ULONG ulSysFileNum)
    3736{
     
    5756        DevHelp_VMFree((LIN)temp->pBuffptr);
    5857        DevHelp_VMUnLock(temp->linLock);
    59         free(temp->pLock);
    6058        delete temp;
     59
     60        temp = (PSTREAMBUFFEREX)pStream->qhReturn.PopHead();
    6161    }
    6262    return;
     
    6767{
    6868    PSTREAMBUFFEREX pStreamBuf;
    69     LIN   linAddr;
    70     PULONG pLock;
    71     ULONG PageListCount;
    72     LIN   linLock;
    73     int   rc;
     69    LIN             linAddr;
     70    PULONG          pLock;
     71    ULONG           PageListCount;
     72    LIN             linLock;
     73    int             rc;
    7474
    75     pLock = (PULONG)malloc(12);
    76     if(pLock == NULL) {
     75    pStreamBuf = new STREAMBUFFEREX(uLength, (PSTREAMBUF)0);
     76    if(pStreamBuf == NULL) {
    7777        DebugInt3();
    7878        return 1;
    7979    }
    8080
     81    pLock = &pStreamBuf->lock[0];
     82
    8183    rc = DevHelp_VirtToLin(SELECTOROF(pLock), OFFSETOF(pLock), &linLock);
    8284    if(rc) {
    8385        DebugInt3();
     86        delete pStreamBuf;
    8487        return rc;
    8588    }
     
    8891    if(rc) {
    8992        DebugInt3();
    90         DevHelp_VMFree(linAddr);
     93        delete pStreamBuf;
    9194        return rc;
    9295    }
     
    9598    if(rc) {
    9699        DebugInt3();
     100        DevHelp_VMUnLock(linLock);
     101        delete pStreamBuf;
    97102        return rc;
    98103    }
    99 
    100     pStreamBuf = new STREAMBUFFEREX(uLength, (PSTREAMBUF)linAddr, linLock, pLock);
     104    pStreamBuf->pBuffptr = (PSTREAMBUF)linAddr;
     105    pStreamBuf->linLock  = linLock;
    101106
    102107    return WAVESTREAM::Write((PSTREAMBUFFER)pStreamBuf);
     
    111116        if(ulStreamState == STREAM_STREAMING) {//means we're called during an interrupt
    112117            qhReturn.PushOnTail((PQUEUEELEMENT)temp);
    113             DevHelp_ArmCtxHook(hCtxHook, ulSysFileNum);
     118            DevHelp_ArmCtxHook(ulSysFileNum, hCtxHook);
    114119        }
    115120        else {
    116121            DevHelp_VMFree((LIN)temp->pBuffptr);
    117122            DevHelp_VMUnLock(temp->linLock);
    118             free(temp->pLock);
    119123            delete temp;
    120124        }
  • sbliveos2/trunk/drv16/header.c

    r142 r168  
    3434
    3535DEV_HEADER header[2] = {
    36    {  -1,
     36   {  sizeof(DEV_HEADER),
    3737      DA_CHAR | DA_IDCSET | DA_NEEDOPEN | DA_USESCAP,
    3838      (PFNENTRY) StrategyHandler,
     
    4141      0,0,
    4242      DC_INITCPLT | DC_IOCTL2 | DC_32BIT
     43   },
     44   {  -1,
     45      DA_CHAR | DA_IDCSET | DA_NEEDOPEN | DA_USESCAP,
     46      (PFNENTRY) StrategyHandler2,
     47      (PFNENTRY) 0,
     48      {'D','A','U','D','I','O','1','$'},
     49      0,0,
     50      DC_INITCPLT | DC_IOCTL2 | DC_32BIT
    4351   }
    4452};
  • sbliveos2/trunk/drv16/strmbuff.hpp

    r167 r168  
    4848{
    4949public:
    50     STREAMBUFFEREX(ULONG bufsize, PSTREAMBUF bufptr, ULONG linLock, PULONG pLock):
     50    STREAMBUFFEREX(ULONG bufsize, PSTREAMBUF bufptr):
    5151    STREAMBUFFER(bufsize, bufptr), fDone(FALSE)
    5252    {
    53        this->linLock = linLock;
    54        this->pLock = pLock;
    5553    };
    5654
     55    ULONG  lock[3];     //lock handle
    5756    ULONG  linLock;
    58     PULONG pLock;
    5957    BOOL   fDone;
    6058
  • sbliveos2/trunk/drv16/wavestrm.cpp

    r166 r168  
    326326{
    327327   qhInProcess.PushOnTail((PQUEUEELEMENT)pStreamBuf);
    328    dprintf2(("WAVESTREAM::Write: Push on tail %lx %d", ((PSTREAMBUFFER)qhInProcess.Head())->pBuffptr, ((PSTREAMBUFFER)qhInProcess.Head())->ulBuffsz));
     328   dprintf2(("WAVESTREAM::Write: Push on tail %lx %ld", ((PSTREAMBUFFER)qhInProcess.Tail())->pBuffptr, ((PSTREAMBUFFER)qhInProcess.Tail())->ulBuffsz));
    329329   if(fUnderrun) {
    330330        fUnderrun = FALSE;
Note: See TracChangeset for help on using the changeset viewer.