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/OS2PrimBuff.cpp

    r3100 r3555  
    1212/*  NOTES:
    1313
    14    1.  I have cheaped out and simply send a DSERR_INVALIDCALL return code
    15        for many calls. I don't know if DSound does the same or not!!
    16        TODO: See if windows returns this in some of the set* functions!!!
    17 
    18    2. The Dart.cpp file is used rather then imbeding code here to avoid
    19       problems with using some of the os2 multimedis headders
    20       I guess I should use the ODIN version of the API's to avoid
    21       the FS reset problem.. This is a TODO!
    22 
    23    3. Here is how the buffers, GetPosition and Lock work:
    24       Dart is allocated 16 buffer of 1kb each. These buffers are filled
    25       when dart has finished playing one of the buffer, from a 16kb buffer
     14      Here is how the buffers, GetPosition and Locking works:
     15      Dart is allocated many little buffers. These buffers are filled
     16      when dart has finished playing one of the buffer, from a 32kb buffer
    2617      that the Win32 program can write to. The GetPosition function will
    2718      determine what buffer is being played, and return the offset to the
    28       end of this buffer. The Lock function will call the GetCurrentPosition
    29       function to determine where the end of the currently playing buffer is
    30       and allow the Win32 program to lock between that location and 15ms from
    31       there (15ms should be past the next buffer).
     19      end of this buffer.
     20
     21      The Lock function will call the GetCurrentPosition function to determine
     22      where the end of the currently playing buffer is and allow the Win32
     23      program to lock between that location and 15ms from there
     24      (15ms should be past the next buffer).
    3225
    3326*/
     
    4235#include <dsound.h>
    4336
    44 #include "DSound.h"
     37//#include "DSound.h"
    4538#include "OS2DSound.h"
    4639#include "OS2SndBuffer.h"
     
    159152      return DS_OK;
    160153   }
     154
     155   // I guess a Notify object should be creaed for the Primary Buffer also..
     156   // Does windows DSound have a notify object for Primary buffer???
    161157
    162158   return E_NOINTERFACE;
     
    528524HRESULT __stdcall PrimBufUnlock(THIS_ LPVOID,DWORD,LPVOID,DWORD )
    529525{
    530    // I don't think we really need any code here.. This may be a handly place to
     526   // I don't think we really need any code here..
    531527
    532528   dprintf(("DSOUND-PrimBuff: Unlock"));
     
    539535HRESULT __stdcall PrimBufRestore(THIS )
    540536{
     537   // This maybe a good place to re-aquire the device if some other process
     538   // has taken the audio focus, but before we do that we need to determine
     539   // if we have lost the device and set the falg in the GetStatus method!
     540
    541541   dprintf(("DSOUND-PrimBuff: Restore"));
    542542
Note: See TracChangeset for help on using the changeset viewer.