xref: /haiku/src/add-ons/kernel/drivers/audio/echo/generic/CMona.h (revision 17889a8c70dbb3d59c1412f6431968753c767bab)
1 // ****************************************************************************
2 //
3 //		CMona.H
4 //
5 //		Include file for interfacing with the CMona generic driver class
6 //		Set editor tabs to 3 for your viewing pleasure.
7 //
8 // ----------------------------------------------------------------------------
9 //
10 // This file is part of Echo Digital Audio's generic driver library.
11 // Copyright Echo Digital Audio Corporation (c) 1998 - 2005
12 // All rights reserved
13 // www.echoaudio.com
14 //
15 // This library is free software; you can redistribute it and/or
16 // modify it under the terms of the GNU Lesser General Public
17 // License as published by the Free Software Foundation; either
18 // version 2.1 of the License, or (at your option) any later version.
19 //
20 // This library is distributed in the hope that it will be useful,
21 // but WITHOUT ANY WARRANTY; without even the implied warranty of
22 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23 // Lesser General Public License for more details.
24 //
25 // You should have received a copy of the GNU Lesser General Public
26 // License along with this library; if not, write to the Free Software
27 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28 //
29 // ****************************************************************************
30 
31 //	Prevent problems with multiple includes
32 #ifndef _MONAOBJECT_
33 #define _MONAOBJECT_
34 
35 #include "CEchoGals.h"
36 #include "CMonaDspCommObject.h"
37 
38 //
39 //	Class used for interfacing with the Darla audio card.
40 //
41 class CMona : public CEchoGals
42 {
43 public:
44 	//
45 	//	Construction/destruction
46 	//
47 	CMona( PCOsSupport pOsSupport );
48 
49 	virtual ~CMona();
50 
51 	//
52 	// Setup & initialization methods
53 	//
54 
55 	virtual ECHOSTATUS InitHw();
56 
57 	//
58 	//	Adapter information methods
59 	//
60 
61 	//
62 	//	Return the capabilities of this card; card type, card name,
63 	//	# analog inputs, # analog outputs, # digital channels,
64 	//	# MIDI ports and supported clocks.
65 	//	See ECHOGALS_CAPS definition above.
66 	//
67 	virtual ECHOSTATUS GetCapabilities
68 	(
69 		PECHOGALS_CAPS	pCapabilities
70 	);
71 
72 	//
73 	//	Audio Interface methods
74 	//
75 	virtual ECHOSTATUS QueryAudioSampleRate
76 	(
77 		DWORD		dwSampleRate
78 	);
79 
80 	virtual void QuerySampleRateRange(DWORD &dwMinRate,DWORD &dwMaxRate);
81 
82 	//
83 	// Get a bitmask of all the clocks the hardware is currently detecting
84 	//
85 	virtual ECHOSTATUS GetInputClockDetect(DWORD &dwClockDetectBits);
86 
87 	//
88 	//	Overload new & delete so memory for this object is allocated from
89 	//	non-paged memory.
90 	//
91 	PVOID operator new( size_t Size );
92 	VOID  operator delete( PVOID pVoid );
93 
94 protected:
95 	//
96 	//	Get access to the appropriate DSP comm object
97 	//
98 	PCMonaDspCommObject GetDspCommObject()
99 		{ return( (PCMonaDspCommObject) m_pDspCommObject ); }
100 };		// class CMona
101 
102 typedef CMona * PCMona;
103 
104 #endif
105 
106 // *** CMona.H ***
107