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

Last change on this file since 144 was 142, checked in by ktk, 25 years ago

Import

  • 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 142 2000-04-23 14:55:46Z ktk $ */
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 ULONG _ulAudioBufSz; // size of the audio buffer
58 WaveConfigInfo _configinfo; // configuration info shared with the hardware
59 ULONG _ulBytesProcessed; // number of bytes consumed or produces
60 ULONG _ulTimeBase; // value in ms. MMPM sends for stream time
61 USHORT _vRealignBuffer(ULONG FAR *endpos, PSTREAMBUFFER pbuffer);
62 void _vRealignPausedBuffers(ULONG endpos = 0);
63 void AddBuffers(); // Initialize the audio buffer object
64 void AddBuffer(); // write one buffer to the audio buffer
65 BOOL _vReadAudioBuf(void); // read data from the audio buffer
66
67 BOOL fUnderrun;
68};
69typedef WAVESTREAM *PWAVESTREAM;
70
71#endif
Note: See TracBrowser for help on using the repository browser.