| 1 | /* $Id: DSOUND.CPP,v 1.3 1999-06-10 17:09:29 phaller Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | /*
|
|---|
| 4 | * DirectSound exported APIs
|
|---|
| 5 | *
|
|---|
| 6 | * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
|
|---|
| 7 | *
|
|---|
| 8 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 9 | *
|
|---|
| 10 | */
|
|---|
| 11 |
|
|---|
| 12 | /*@Const************************************************************************
|
|---|
| 13 | * Defined Constants *
|
|---|
| 14 | *******************************************************************************/
|
|---|
| 15 | #define WIN32SDK_NOPOSTWRAPPER
|
|---|
| 16 |
|
|---|
| 17 | /*@Header***********************************************************************
|
|---|
| 18 | * Header Files *
|
|---|
| 19 | *******************************************************************************/
|
|---|
| 20 | #include <os2win.h>
|
|---|
| 21 | #include <stdlib.h>
|
|---|
| 22 | #include <string.h>
|
|---|
| 23 |
|
|---|
| 24 | #include "no.h"
|
|---|
| 25 | #include <w_windows.h>
|
|---|
| 26 | #include <dsound.h>
|
|---|
| 27 | #include "os2dsound.h"
|
|---|
| 28 | #include <Win32SDKPostWrapper.h>
|
|---|
| 29 |
|
|---|
| 30 | #include "misc.h"
|
|---|
| 31 |
|
|---|
| 32 | //******************************************************************************
|
|---|
| 33 | //******************************************************************************
|
|---|
| 34 | HRESULT WIN32API OS2DirectSoundCreate(const GUID *lpGUID,
|
|---|
| 35 | LPDIRECTSOUND * ppDS,
|
|---|
| 36 | IUnknown FAR *pUnkOuter)
|
|---|
| 37 | {
|
|---|
| 38 | OS2IDirectSound *newsound = new OS2IDirectSound(lpGUID);
|
|---|
| 39 | HRESULT rc;
|
|---|
| 40 |
|
|---|
| 41 | dprintf(("DirectSoundCreate %X %X %X\n", lpGUID, ppDS, pUnkOuter));
|
|---|
| 42 | #if 0
|
|---|
| 43 | if(newsound == NULL) return(DSERR_OUTOFMEMORY);
|
|---|
| 44 |
|
|---|
| 45 | rc = newsound->GetLastError();
|
|---|
| 46 | if(rc != DS_OK) {
|
|---|
| 47 | *ppDS = NULL;
|
|---|
| 48 | delete newsound;
|
|---|
| 49 | }
|
|---|
| 50 | else *ppDS = (LPDIRECTSOUND)newsound;
|
|---|
| 51 | return(rc);
|
|---|
| 52 | #else
|
|---|
| 53 | return(DSERR_NODRIVER);
|
|---|
| 54 | #endif
|
|---|
| 55 | }
|
|---|
| 56 | //******************************************************************************
|
|---|
| 57 | //******************************************************************************
|
|---|
| 58 | HRESULT WIN32API OS2DirectSoundEnumerateA(LPDSENUMCALLBACKA lpCallback,
|
|---|
| 59 | LPVOID lpContext)
|
|---|
| 60 | {
|
|---|
| 61 | dprintf(("DirectSoundEnumerateA\n"));
|
|---|
| 62 |
|
|---|
| 63 | lpCallback(NULL, "DART DirectSound for OS/2", "DirectSound/2 v0.1",
|
|---|
| 64 | lpContext);
|
|---|
| 65 | return(DS_OK);
|
|---|
| 66 | }
|
|---|
| 67 | //******************************************************************************
|
|---|
| 68 | //******************************************************************************
|
|---|