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