1 | /* $Id: waveoutbase.h,v 1.3 2002-06-04 17:36:55 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Wave playback class (base)
|
---|
5 | *
|
---|
6 | * Copyright 1998-2001 Sander van Leeuwen (sandervl@xs4all.nl)
|
---|
7 | *
|
---|
8 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
9 | */
|
---|
10 | #ifndef __DWAVEOUTBASE_H__
|
---|
11 | #define __DWAVEOUTBASE_H__
|
---|
12 |
|
---|
13 | #include "waveinoutbase.h"
|
---|
14 |
|
---|
15 | #ifdef OS2_ONLY
|
---|
16 | #include "winmmtype.h"
|
---|
17 | #endif
|
---|
18 | #include <vmutex.h>
|
---|
19 |
|
---|
20 | class WaveOut : public WaveInOut
|
---|
21 | {
|
---|
22 | public:
|
---|
23 | WaveOut(LPWAVEFORMATEX pwfx, DWORD fdwOpen, ULONG nCallback, ULONG dwInstance);
|
---|
24 | virtual ~WaveOut();
|
---|
25 |
|
---|
26 | virtual MMRESULT write(LPWAVEHDR pwh, UINT cbwh) = 0;
|
---|
27 | virtual MMRESULT pause() = 0;
|
---|
28 | virtual MMRESULT stop() = 0;
|
---|
29 | virtual MMRESULT resume() = 0;
|
---|
30 | virtual MMRESULT reset() = 0;
|
---|
31 | virtual ULONG getPosition() = 0;
|
---|
32 | virtual MMRESULT setVolume(ULONG ulVol) = 0;
|
---|
33 | ULONG getVolume() { return volume; };
|
---|
34 |
|
---|
35 | static int getNumDevices();
|
---|
36 |
|
---|
37 | static void setDefaultVolume(ULONG volume);
|
---|
38 | static DWORD getDefaultVolume();
|
---|
39 |
|
---|
40 | protected:
|
---|
41 |
|
---|
42 | ULONG bytesPlayed, bytesCopied, bytesReturned;
|
---|
43 | ULONG volume; // Volume state
|
---|
44 |
|
---|
45 | static ULONG defvolume; //default volume for streams (if waveOutSetVolume called with NULL stream)
|
---|
46 |
|
---|
47 | private:
|
---|
48 |
|
---|
49 | };
|
---|
50 |
|
---|
51 | #endif
|
---|