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