1 // ****************************************************************************
3 // CIndigoIODspCommObject.cpp
5 // Implementation file for EchoGals generic driver Indigo io DSP
8 // ----------------------------------------------------------------------------
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
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.
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.
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
29 // ****************************************************************************
31 #include "CEchoGals.h"
32 #include "CIndigoIODspCommObject.h"
35 #pragma optimize("",off)
37 #include "IndigoIODSP.c"
41 // Construction/destruction
43 CIndigoIODspCommObject::CIndigoIODspCommObject
45 PDWORD pdwRegBase
, // Virtual ptr to DSP registers
46 PCOsSupport pOsSupport
47 ) : CDspCommObjectVmixer( pdwRegBase
, pOsSupport
)
49 strcpy( m_szCardName
, "Indigo io" );
50 m_pdwDspRegBase
= pdwRegBase
; // Virtual addr DSP's register base
56 m_wFirstDigitalBusOut
= m_wNumBussesOut
;
57 m_wFirstDigitalBusIn
= m_wNumBussesIn
;
61 m_wNumMidiOut
= 0; // # MIDI out channels
62 m_wNumMidiIn
= 0; // # MIDI in channels
64 m_pDspCommPage
->dwSampleRate
= SWAP( (DWORD
) 44100 );
68 m_pwDspCodeToLoad
= pwIndigoioDSP
;
70 m_byDigitalMode
= DIGITAL_MODE_NONE
;
73 // Since this card has no ASIC, mark it as loaded so everything works OK
77 } // CIndigoIODspCommObject::CIndigoIODspCommObject( DWORD dwPhysRegBase )
80 CIndigoIODspCommObject::~CIndigoIODspCommObject()
82 } // CIndigoIODspCommObject::~CIndigoIODspCommObject()
86 // Save new clock settings and send to DSP.
88 ECHOSTATUS
CIndigoIODspCommObject::SetInputClock(WORD wClock
)
91 ECHO_DEBUGPRINTF( ("CIndigoIODspCommObject::SetInputClock:\n") );
92 return ECHOSTATUS_CLOCK_NOT_SUPPORTED
;
94 } // ECHOSTATUS CIndigoIODspCommObject::SetInputClock
97 //===========================================================================
101 // Set the audio sample rate for IndigoIO
103 //===========================================================================
105 DWORD
CIndigoIODspCommObject::SetSampleRate( DWORD dwNewSampleRate
)
107 if ( !WaitForHandshake() )
111 // Set the value in the comm page
113 m_pDspCommPage
->dwSampleRate
= SWAP( dwNewSampleRate
);
119 SendVector( DSP_VC_UPDATE_CLOCKS
);
121 return GetSampleRate();
123 } // DWORD CIndigoIODspCommObject::SetSampleRate( DWORD dwNewSampleRate )
125 // **** CIndigoIODspCommObject.cpp ****