source: trunk/src/winmm/waveindart.h@ 10367

Last change on this file since 10367 was 5358, checked in by sandervl, 24 years ago

Rewrite for DirectAudio interface

File size: 1.8 KB
Line 
1/* $Id: waveindart.h,v 1.1 2001-03-23 16:23:44 sandervl Exp $ */
2
3/*
4 * Wave playback class
5 * Copyright 2001 Sander van Leeuwen (sandervl@xs4all.nl)
6 * Project Odin Software License can be found in LICENSE.TXT
7 */
8#ifndef __DWAVEIN_H__
9#define __DWAVEIN_H__
10
11#include "waveinoutbase.h"
12
13#define PREFILLBUF_DART_REC 8
14#define DART_BUFSIZE_REC 16384
15
16#ifdef OS2_ONLY
17#include "winmmtype.h"
18#endif
19#include "vmutex.h"
20
21#ifdef _OS2WIN_H
22#define MCI_MIX_BUFFER DWORD
23#define PMCI_MIX_BUFFER MCI_MIX_BUFFER *
24#define MCI_MIXSETUP_PARMS DWORD
25#define MCI_BUFFER_PARMS DWORD
26#define MCI_PLAY_PARMS DWORD
27#endif
28
29class DartWaveIn : public WaveInOut
30{
31public:
32 DartWaveIn(LPWAVEFORMATEX pwfx, DWORD fdwOpen, ULONG nCallback, ULONG dwInstance);
33 virtual ~DartWaveIn();
34
35 MMRESULT addBuffer(LPWAVEHDR pwh, UINT cbwh);
36 MMRESULT start();
37 MMRESULT stop();
38 int getState() { return State; };
39 MMRESULT reset();
40 ULONG getPosition();
41
42
43 static int getNumDevices();
44
45 static BOOL queryFormat(ULONG formatTag, ULONG nChannels,
46 ULONG nSamplesPerSec, ULONG sampleSize);
47
48protected:
49 static void mciError(ULONG ulError);
50 void handler(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags);
51
52private:
53 USHORT DeviceId;
54 ULONG ulBufferCount; /* Current file buffer */
55 ULONG ulBufSize;
56
57 MCI_MIX_BUFFER *MixBuffer; /* Device buffers */
58 MCI_MIXSETUP_PARMS *MixSetupParms; /* Mixer parameters */
59 MCI_BUFFER_PARMS *BufferParms; /* Device buffer parms */
60
61
62 BOOL fMixerSetup;
63 BOOL fOverrun;
64
65#ifndef _OS2WIN_H
66 friend LONG APIENTRY WaveInHandler(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags);
67#endif
68};
69
70#endif
Note: See TracBrowser for help on using the repository browser.