xref: /haiku/src/add-ons/kernel/drivers/audio/echo/generic/CLayla.h (revision 51978af14a173e7fae0563b562be5603bc652aeb)
1 // ****************************************************************************
2 //
3 //		CLayla.h
4 //
5 //		Include file for interfacing with the CLayla generic driver class
6 //		Set editor tabs to 3 for your viewing pleasure.
7 //
8 // ----------------------------------------------------------------------------
9 //
10 //		Copyright Echo Digital Audio Corporation (c) 1998 - 2002
11 //		All rights reserved
12 //		www.echoaudio.com
13 //
14 //		Permission is hereby granted, free of charge, to any person obtaining a
15 //		copy of this software and associated documentation files (the
16 //		"Software"), to deal with the Software without restriction, including
17 //		without limitation the rights to use, copy, modify, merge, publish,
18 //		distribute, sublicense, and/or sell copies of the Software, and to
19 //		permit persons to whom the Software is furnished to do so, subject to
20 //		the following conditions:
21 //
22 //		- Redistributions of source code must retain the above copyright
23 //		notice, this list of conditions and the following disclaimers.
24 //
25 //		- Redistributions in binary form must reproduce the above copyright
26 //		notice, this list of conditions and the following disclaimers in the
27 //		documentation and/or other materials provided with the distribution.
28 //
29 //		- Neither the name of Echo Digital Audio, nor the names of its
30 //		contributors may be used to endorse or promote products derived from
31 //		this Software without specific prior written permission.
32 //
33 //		THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 //		EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
35 //		MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
36 //		IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR
37 //		ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
38 //		TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
39 //		SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
40 //
41 // ****************************************************************************
42 
43 //	Prevent problems with multiple includes
44 #ifndef _LAYLAOBJECT_
45 #define _LAYLAOBJECT_
46 
47 #include "CEchoGals.h"
48 #include "CMidiInQ.h"
49 #include "CLaylaDspCommObject.h"
50 
51 
52 //
53 //	Class used for interfacing with the Layla audio card.
54 //
55 class CLayla : public CEchoGals
56 {
57 public:
58 	//
59 	//	Construction/destruction
60 	//
61 	CLayla( PCOsSupport pOsSupport );
62 
63 	virtual ~CLayla();
64 
65 	//
66 	// Setup & initialization methods
67 	//
68 
69 	virtual ECHOSTATUS InitHw();
70 
71 	//
72 	//	Adapter information methods
73 	//
74 
75 	virtual ECHOSTATUS GetCapabilities
76 	(
77 		PECHOGALS_CAPS	pCapabilities
78 	);
79 
80 	//
81 	//	Audio Interface methods
82 	//
83 	virtual ECHOSTATUS QueryAudioSampleRate
84 	(
85 		DWORD		dwSampleRate
86 	);
87 
88 	//
89 	// Get a bitmask of all the clocks the hardware is currently detecting
90 	//
91 	virtual ECHOSTATUS GetInputClockDetect(DWORD &dwClockDetectBits);
92 
93 	//
94 	//  Overload new & delete so memory for this object is allocated from non-paged memory.
95 	//
96 	PVOID operator new( size_t Size );
97 	VOID  operator delete( PVOID pVoid );
98 
99 protected:
100 
101 	//
102 	//	Get access to the appropriate DSP comm object
103 	//
104 	PCLaylaDspCommObject GetDspCommObject()
105 		{ return( (PCLaylaDspCommObject) m_pDspCommObject ); }
106 
107 };		// class CLayla
108 
109 typedef CLayla * PCLayla;
110 
111 #endif
112 
113 // *** CLayla.H ***
114