1// ****************************************************************************
2//
3//		CLayla24DspCommObject.H
4//
5//		Include file for EchoGals generic driver Layla24 DSP interface class.
6//
7// ----------------------------------------------------------------------------
8//
9// This file is part of Echo Digital Audio's generic driver library.
10// Copyright Echo Digital Audio Corporation (c) 1998 - 2005
11// All rights reserved
12// www.echoaudio.com
13//
14// This library is free software; you can redistribute it and/or
15// modify it under the terms of the GNU Lesser General Public
16// License as published by the Free Software Foundation; either
17// version 2.1 of the License, or (at your option) any later version.
18//
19// This library is distributed in the hope that it will be useful,
20// but WITHOUT ANY WARRANTY; without even the implied warranty of
21// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22// Lesser General Public License for more details.
23//
24// You should have received a copy of the GNU Lesser General Public
25// License along with this library; if not, write to the Free Software
26// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27//
28// ****************************************************************************
29
30#ifndef	_LAYLA24DSPCOMMOBJECT_
31#define	_LAYLA24DSPCOMMOBJECT_
32
33#include "CGMLDspCommObject.h"
34
35class CLayla24DspCommObject : public CGMLDspCommObject
36{
37protected:
38
39	DWORD 	m_dwSampleRate;
40
41public:
42	//
43	//	Construction/destruction
44	//
45	CLayla24DspCommObject( PDWORD pdwRegBase, PCOsSupport pOsSupport );
46	virtual ~CLayla24DspCommObject();
47
48	//
49	//	Set the DSP sample rate.
50	//	Return rate that was set, -1 if error
51	//
52	virtual DWORD SetSampleRate( DWORD dwNewSampleRate );
53	//
54	//	Send current setting to DSP & return what it is
55	//
56	virtual DWORD SetSampleRate()
57		{ return( SetSampleRate( GetSampleRate() ) ); }
58
59	//
60	// Get the current sample rate
61	//
62	virtual DWORD GetSampleRate()
63	{
64		return m_dwSampleRate;
65	}
66
67	//
68	//	Set digital mode
69	//
70	virtual ECHOSTATUS SetDigitalMode
71	(
72		BYTE	byNewMode
73	);
74
75	//
76	//	Card information
77	//
78	virtual WORD GetCardType()
79		{ return( LAYLA24 ); }
80
81
82protected:
83
84	virtual BOOL LoadASIC();
85	using CGMLDspCommObject::LoadASIC;
86
87	//
88	//	Switch the external ASIC if not already loaded.
89	//	Mute monitors during this operation
90	//
91	BOOL SwitchAsic
92	(
93		BYTE *	pbyAsicNeeded,
94		DWORD		dwAsicSize
95	);
96
97	//
98	//	Set input clock
99	//
100	virtual ECHOSTATUS SetInputClock(WORD wClock);
101
102	BYTE *	m_pbyAsic;					// Current ASIC code
103
104};		// class CLayla24DspCommObject
105
106typedef CLayla24DspCommObject * PCLayla24DspCommObject;
107
108#endif
109
110// **** Layla2424DspCommObject.h ****
111