Changeset 3555 for trunk/src/dsound/OS2PrimBuff.cpp
- Timestamp:
- May 18, 2000, 10:37:10 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dsound/OS2PrimBuff.cpp
r3100 r3555 12 12 /* NOTES: 13 13 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 26 17 that the Win32 program can write to. The GetPosition function will 27 18 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). 32 25 33 26 */ … … 42 35 #include <dsound.h> 43 36 44 #include "DSound.h"37 //#include "DSound.h" 45 38 #include "OS2DSound.h" 46 39 #include "OS2SndBuffer.h" … … 159 152 return DS_OK; 160 153 } 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??? 161 157 162 158 return E_NOINTERFACE; … … 528 524 HRESULT __stdcall PrimBufUnlock(THIS_ LPVOID,DWORD,LPVOID,DWORD ) 529 525 { 530 // I don't think we really need any code here.. This may be a handly place to526 // I don't think we really need any code here.. 531 527 532 528 dprintf(("DSOUND-PrimBuff: Unlock")); … … 539 535 HRESULT __stdcall PrimBufRestore(THIS ) 540 536 { 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 541 541 dprintf(("DSOUND-PrimBuff: Restore")); 542 542
Note:
See TracChangeset
for help on using the changeset viewer.