source: trunk/src/winmm/waveinoutbase.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: 1.7 KB
Line 
1/* $Id: waveinoutbase.h,v 1.3 2003-01-14 19:38:38 sandervl Exp $ */
2
3/*
4 * Wave playback & recording base class
5 *
6 * Copyright 2001 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 * Project Odin Software License can be found in LICENSE.TXT
9 */
10
11#ifndef __WAVEINOUTBASE_H__
12#define __WAVEINOUTBASE_H__
13
14#define STATE_STOPPED 0
15#define STATE_PLAYING 1
16#define STATE_PAUSED 2
17#define STATE_RECORDING 3
18#define STATE_POSTPONE_RECORDING 4
19
20#ifdef OS2_ONLY
21#include "winmmtype.h"
22#endif
23#include <vmutex.h>
24
25class WaveInOut
26{
27public:
28 WaveInOut(LPWAVEFORMATEX pwfx, DWORD fdwOpen,
29 ULONG nCallback, ULONG dwInstance);
30 virtual ~WaveInOut();
31
32 int getState() { return State; };
33 ULONG getSampleRate() { return SampleRate; };
34 ULONG getBitsPerSample() { return BitsPerSample; };
35 ULONG getnumChannels() { return nChannels; };
36 ULONG getAvgBytesPerSecond() { return (BitsPerSample/8) * nChannels * SampleRate; };
37
38 static BOOL find(WaveInOut *wave);
39 static void shutdown();
40
41protected:
42 void callback(UINT uMessage, DWORD dw1, DWORD dw2);
43
44 int SampleRate;
45 int BitsPerSample;
46 int nChannels;
47 DWORD OpenFlags;
48 DWORD Callback;
49 DWORD Instance;
50 ULONG State;
51 int queuedbuffers;
52 WAVEHDR * wavehdr;
53 VMutex wmutex;
54
55private:
56 static WaveInOut * head; // List of wave classes
57 WaveInOut * next; // Next wave class
58};
59
60#endif
Note: See TracBrowser for help on using the repository browser.