Ignore:
Timestamp:
May 18, 2000, 10:37:10 PM (25 years ago)
Author:
mike
Message:

Updated and slightly fixed DSOUND

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dsound/OS2DSOUND.CPP

    r3099 r3555  
    1 /* $Id: OS2DSOUND.CPP,v 1.6 2000-03-13 12:47:46 sandervl Exp $ */
     1/* $Id: OS2DSOUND.CPP,v 1.7 2000-05-18 20:37:08 mike Exp $ */
    22
    33/*
     
    1717#include <stdlib.h>
    1818#include <string.h>
     19
     20
     21
     22#include <stdio.h> /****** DEBUGGING ********/
     23
     24
    1925
    2026#define INITGUID
     
    6167   OS2IDirectSound::fDSExists = TRUE;
    6268
     69   // Create the primary buffer
     70   primary = new OS2PrimBuff(this, /*lpDSBufferDesc*/NULL);
     71   if (primary == NULL){
     72      lastError = DSERR_OUTOFMEMORY;
     73      return ;
     74   }
     75   if ( primary->GetLastError() != DS_OK ){
     76      ULONG lastErr = primary->GetLastError();
     77      dprintf(("LastErr = %d\n", lastErr));
     78      delete primary;
     79      lastError = lastErr;
     80      return;
     81   }
     82   primary->Vtbl.AddRef(primary);
     83
    6384   dprintf(("Sound init OK\n"));
    6485}
     
    150171
    151172   if (lpDSBufferDesc->dwFlags & DSBCAPS_PRIMARYBUFFER) {
     173
     174/*
     175
     176      // The Primary buffer is now created by the Constructor.. This only
     177      // makes sence becuse you can really only have one primary buffer and
     178      // you need it before you can to do anything.
     179
    152180      OS2PrimBuff *primbuff;
    153181      primbuff = new OS2PrimBuff(me, lpDSBufferDesc);
     
    166194      primbuff->Vtbl.AddRef(primbuff);
    167195      dprintf(("Created PrimBuff... Exiting Create Buffer function\n"));
    168 
     196*/
     197
     198      *lplpDirectSoundBuffer = (LPDIRECTSOUNDBUFFER)me->primary;
    169199      return DS_OK;
    170200   }
Note: See TracChangeset for help on using the changeset viewer.