source: sbliveos2/trunk/drv16/wavestrm.hpp@ 160

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

pause fix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/* $Id: wavestrm.hpp 160 2001-03-20 19:20:53Z sandervl $ */
2
3/* SCCSID = %W% %E% */
4/****************************************************************************
5 * *
6 * Copyright (c) IBM Corporation 1994 - 1997. *
7 * *
8 * The following IBM OS/2 source code is provided to you solely for the *
9 * the purpose of assisting you in your development of OS/2 device drivers. *
10 * You may use this code in accordance with the IBM License Agreement *
11 * provided in the IBM Device Driver Source Kit for OS/2. *
12 * *
13 ****************************************************************************/
14/**@internal %W%
15 * Defines, class definations and prototypes for
16 * @version %I%
17 * @context Unless otherwise noted, all interfaces are Ring-0, 16-bit,
18 * <stack context>.
19 * @history
20 *
21 */
22#ifndef WAVESTREAM_INCLUDED
23#define WAVESTREAM_INCLUDED
24
25#ifndef OS2_INCLUDED
26#define INCL_NOPMAPI
27#include <os2.h>
28#include <os2medef.h>
29#include <audio.h>
30#endif
31
32#include "stream.hpp"
33#include "waudio.hpp"
34#include "strmbuff.hpp"
35
36class WAVESTREAM : public STREAM {
37
38public:
39 void Process(void); // called every timer interrupt
40 virtual ULONG GetCurrentTime(void);
41 virtual void SetCurrentTime(ULONG time);
42 virtual ULONG Read(PSTREAMBUF, unsigned);
43 virtual ULONG Write(PSTREAMBUF, unsigned);
44 virtual ULONG StartStream(void);
45 virtual ULONG StopStream(PCONTROL_PARM);
46 virtual ULONG PauseStream(PCONTROL_PARM);
47 virtual ULONG ResumeStream(void);
48 WAVESTREAM(ULONG streamtype, LPMCI_AUDIO_INIT pinit, USHORT filesysnum);
49 virtual ~WAVESTREAM();
50
51 virtual void SetInputSrc(int src);
52 virtual void SetInputGain(ULONG gain);
53 virtual void SetVolume(ULONG volume);
54// virtual void SetBalance(ULONG balance);
55
56private:
57
58 ULONG _ulAudioBufSz; // size of the audio buffer
59 WaveConfigInfo _configinfo; // configuration info shared with the hardware
60 ULONG _ulBytesProcessed; // number of bytes consumed or produces
61 ULONG _ulTimeBase; // value in ms. MMPM sends for stream time
62 USHORT _vRealignBuffer(ULONG FAR *endpos, PSTREAMBUFFER pbuffer);
63 void _vRealignPausedBuffers(ULONG endpos = 0);
64 void AddBuffers(); // Initialize the audio buffer object
65 ULONG AddBuffer(ULONG space); // write one buffer to the audio buffer
66 BOOL _vReadAudioBuf(void); // read data from the audio buffer
67
68 BOOL fUnderrun;
69};
70typedef WAVESTREAM *PWAVESTREAM;
71
72#endif
Note: See TracBrowser for help on using the repository browser.