| 1 | /* $Id: dwavestrm.hpp 178 2001-04-30 21:08:00Z 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 DWAVESTREAM_INCLUDED
|
|---|
| 23 | #define DWAVESTREAM_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 "wavestrm.hpp"
|
|---|
| 34 | #include "waudio.hpp"
|
|---|
| 35 | #include "strmbuff.hpp"
|
|---|
| 36 |
|
|---|
| 37 | extern "C" {
|
|---|
| 38 | void HookHandlerAsm();
|
|---|
| 39 | void cdecl HookHandler(ULONG ulSysFileNum);
|
|---|
| 40 | }
|
|---|
| 41 |
|
|---|
| 42 | class DWAVESTREAM : public WAVESTREAM {
|
|---|
| 43 |
|
|---|
| 44 | public:
|
|---|
| 45 | virtual ULONG Write(PSTREAMBUF, ULONG, BOOL fLooping = 0);
|
|---|
| 46 | virtual ULONG Register(PDDCMDREGISTER);
|
|---|
| 47 | virtual void DeRegister(void);
|
|---|
| 48 | virtual ULONG StartStream();
|
|---|
| 49 |
|
|---|
| 50 | DWAVESTREAM(ULONG streamtype, LPMCI_AUDIO_INIT pinit, USHORT filesysnum);
|
|---|
| 51 | virtual ~DWAVESTREAM();
|
|---|
| 52 |
|
|---|
| 53 | BOOL IsEverythingOk() { return (fError == FALSE); };
|
|---|
| 54 |
|
|---|
| 55 | virtual BOOL SetProperty(int type, ULONG value, ULONG reserved = 0);
|
|---|
| 56 | virtual ULONG GetProperty(int type);
|
|---|
| 57 |
|
|---|
| 58 | private:
|
|---|
| 59 | virtual void ReturnBuffer(void); // returns one buffer
|
|---|
| 60 |
|
|---|
| 61 | virtual void AddBuffers(BOOL fFirst); // Initialize the audio buffer object
|
|---|
| 62 |
|
|---|
| 63 | QUEUEHEAD qhReturn; //queue with buffers to be returned
|
|---|
| 64 | ULONG hCtxHook;
|
|---|
| 65 | ULONG hSem;
|
|---|
| 66 | BOOL fError;
|
|---|
| 67 |
|
|---|
| 68 | friend void cdecl HookHandler(ULONG ulSysFileNum);
|
|---|
| 69 | };
|
|---|
| 70 | typedef DWAVESTREAM *PDWAVESTREAM;
|
|---|
| 71 |
|
|---|
| 72 | #endif
|
|---|