xref: /haiku/src/add-ons/kernel/drivers/audio/echo/generic/CMia.h (revision 4dd9e43637031d2c5a6755a0184040f0de8f2884)
1 // ****************************************************************************
2 //
3 //		CMia.H
4 //
5 //		Include file for interfacing with the CMia 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 _MIAOBJECT_
33 #define _MIAOBJECT_
34 
35 #include "CEchoGalsVmixer.h"
36 #include "CMiaDspCommObject.h"
37 
38 //
39 //	Class used for interfacing with the Mia audio card.
40 //
41 class CMia : public CEchoGalsVmixer
42 {
43 public:
44 	//
45 	//	Construction/destruction
46 	//
47 	CMia( PCOsSupport pOsSupport );
48 
49 	virtual ~CMia();
50 
51 	//
52 	// Setup & initialization methods
53 	//
54 
55 	virtual ECHOSTATUS InitHw();
56 
57 	//
58 	//	Return the capabilities of this card; card type, card name,
59 	//	# analog inputs, # analog outputs, # digital channels,
60 	//	# MIDI ports and supported clocks.
61 	//	See ECHOGALS_CAPS definition above.
62 	//
63 	virtual ECHOSTATUS GetCapabilities
64 	(
65 		PECHOGALS_CAPS	pCapabilities
66 	);
67 
68 	//
69 	//	Audio Interface methods
70 	//
71 	virtual ECHOSTATUS QueryAudioSampleRate
72 	(
73 		DWORD		dwSampleRate
74 	);
75 
76 	virtual void QuerySampleRateRange(DWORD &dwMinRate,DWORD &dwMaxRate);
77 
78 	//
79 	// Get a bitmask of all the clocks the hardware is currently detecting
80 	//
81 	virtual ECHOSTATUS GetInputClockDetect(DWORD &dwClockDetectBits);
82 
83 	//
84 	//	Overload new & delete so memory for this object is allocated from
85 	//	non-paged memory.
86 	//
87 	PVOID operator new( size_t Size );
88 	VOID  operator delete( PVOID pVoid );
89 
90 protected:
91 	//
92 	//	Get access to the appropriate DSP comm object
93 	//
GetDspCommObject()94 	PCMiaDspCommObject GetDspCommObject()
95 		{ return( (PCMiaDspCommObject) m_pDspCommObject ); }
96 
97 };		// class CMia
98 
99 
100 typedef CMia * PCMia;
101 
102 #endif
103 
104 // *** Mia.H ***
105