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

Last change on this file since 22012 was 21358, checked in by rlwalsh, 16 years ago

add FlashWaveOut class to winmm - see Ticket #2

File size: 2.0 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
9#ifndef __DWAVEIN_H__
10#define __DWAVEIN_H__
11
12#include "waveinoutbase.h"
13
14#define PREFILLBUF_DART_REC 8
15#define DART_BUFSIZE_REC 16384
16
17#ifdef OS2_ONLY
18#include "winmmtype.h"
19#endif
20#include "vmutex.h"
21
22#ifdef _OS2WIN_H
23#define MCI_MIX_BUFFER DWORD
24#define PMCI_MIX_BUFFER MCI_MIX_BUFFER *
25#define MCI_MIXSETUP_PARMS DWORD
26#define MCI_BUFFER_PARMS DWORD
27#define MCI_PLAY_PARMS DWORD
28#endif
29
30// this should be defined in some #included .h file, but it isn't
31typedef LONG (APIENTRY MIXERPROC)(ULONG ulHandle, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags);
32
33class DartWaveIn : public WaveInOut
34{
35public:
36 DartWaveIn(LPWAVEFORMATEX pwfx, DWORD fdwOpen,
37 ULONG nCallback, ULONG dwInstance);
38 virtual ~DartWaveIn();
39
40 MMRESULT open();
41 MMRESULT addBuffer(LPWAVEHDR pwh, UINT cbwh);
42 MMRESULT start();
43 MMRESULT stop();
44 MMRESULT reset();
45 ULONG getPosition();
46
47 static int getNumDevices();
48 static BOOL queryFormat(ULONG formatTag, ULONG nChannels,
49 ULONG nSamplesPerSec, ULONG sampleSize);
50
51protected:
52 static void mciError(ULONG rc);
53 void handler(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer,
54 ULONG ulFlags);
55
56private:
57 USHORT DeviceId;
58 ULONG ulBufSize;
59 BOOL fMixerSetup;
60 BOOL fOverrun;
61 ULONG mixHandle;
62 MIXERPROC * pmixReadProc;
63 MCI_MIX_BUFFER * MixBuffer;
64 MCI_BUFFER_PARMS * BufferParms;
65
66#ifndef _OS2WIN_H
67 friend LONG APIENTRY WaveInHandler(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer,
68 ULONG ulFlags);
69#endif
70};
71
72#endif
Note: See TracBrowser for help on using the repository browser.