source: trunk/src/dsound/DSOUND.CPP@ 2013

Last change on this file since 2013 was 1744, checked in by hugh, 26 years ago

Implemented fake soundcard
The Bufferpos will be advanced based on the elapsed time
since start playing

File size: 1.9 KB
Line 
1/* $Id: DSOUND.CPP,v 1.6 1999-11-14 22:12:14 hugh 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/*@Header***********************************************************************
13* Header Files *
14*******************************************************************************/
15#include <os2win.h>
16#include <stdlib.h>
17#include <string.h>
18
19#define INITGUID
20#include <dsound.h>
21#include "os2dsound.h"
22
23#include <misc.h>
24
25//******************************************************************************
26//******************************************************************************
27HRESULT WIN32API OS2DirectSoundCreate(const GUID *lpGUID,
28 LPDIRECTSOUND * ppDS,
29 IUnknown *pUnkOuter)
30{
31 OS2IDirectSound *newsound = new OS2IDirectSound(lpGUID);
32 HRESULT rc;
33
34 dprintf(("DirectSoundCreate %X %X %X\n", lpGUID, ppDS, pUnkOuter));
35 if(newsound == NULL)
36 return(DSERR_OUTOFMEMORY);
37
38 rc = newsound->GetLastError();
39 if(rc != DS_OK) {
40 *ppDS = NULL;
41 delete newsound;
42 }
43 else
44 *ppDS = (LPDIRECTSOUND)newsound;
45 return(rc);
46}
47//******************************************************************************
48//******************************************************************************
49HRESULT WIN32API OS2DirectSoundEnumerateA(LPDSENUMCALLBACKA lpCallback,
50 LPVOID lpContext)
51{
52 dprintf(("DirectSoundEnumerateA\n"));
53
54 lpCallback(NULL, "DART DirectSound for OS/2", "DirectSound/2 v0.1",
55 lpContext);
56 return(DS_OK);
57}
58//******************************************************************************
59//******************************************************************************
Note: See TracBrowser for help on using the repository browser.