Ignore:
Timestamp:
Mar 10, 2001, 7:21:06 AM (25 years ago)
Author:
mike
Message:

Added DuplicateSoundBuffer support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dsound/OS2SNDBUFFER.H

    r3555 r5292  
    1 /* $Id: OS2SNDBUFFER.H,v 1.7 2000-05-18 20:37:09 mike Exp $ */
     1/* $Id: OS2SNDBUFFER.H,v 1.8 2001-03-10 06:21:06 mike Exp $ */
    22
    33/*
     
    1818#define THIS_ VOID*This,
    1919
     20// simple structure to handle duplicated buffers - the first DWORD of
     21// a sound buffer contains the buffer's usage count (to prevent freeing
     22// of buffers still in use)
     23typedef struct _SOUNDBUF {
     24    DWORD   dwReferences;
     25    char    pData[1];
     26} SOUNDBUF;
     27
    2028// a forward declaration of some classes is needed here!
    2129class OS2IDirectSoundNotify;
     
    3139
    3240    OS2IDirectSoundBuffer(OS2IDirectSound *DSound, const DSBUFFERDESC *lpDSBufferDesc);
     41    OS2IDirectSoundBuffer(OS2IDirectSound *DSound, OS2IDirectSoundBuffer *srcBuf);
    3342    OS2IDirectSoundBuffer() {};
    3443    ~OS2IDirectSoundBuffer();
     
    3948    inline  HRESULT       GetLastError()    { return lastError;    };
    4049    inline  void          SetNotify(OS2IDirectSoundNotify *_notify) {
    41                                     notify = _notify; };
     50                          notify = _notify; };
    4251    inline  void          Set3DBuffer(OS2IDirectSound3DBuffer *_buffer3D) {
    43                                       buffer3D = _buffer3D; };
     52                          buffer3D = _buffer3D; };
    4453 private:
    4554
     
    6170    LONG  frac;                // saved mixer position overflow
    6271
    63     char *lpBuffer;            // sound data
     72    SOUNDBUF *lpSndBuffer;     // sound data + reference count
     73    char     *lpBuffer;        // actual sound data
    6474
    6575    OS2IDirectSoundNotify*   notify;    // pointer to the associated Notify object (if exists)
Note: See TracChangeset for help on using the changeset viewer.