just moved all the audio stuff into its own files. Created a structure for storing configuration data in... the intent is that it will be stored to EEPROM (using EEPROMAnything). It does compile now, but haven't actually tried it out. Notable learning points: need to set micGain AFTER selecting the mic input. So lot of code now to take care of trying to smoothly mute and unmute things.
40 lines
704 B
C
40 lines
704 B
C
//======================================================================
|
|
// audio.h
|
|
//======================================================================
|
|
|
|
#ifndef __iop_audio_h__
|
|
#define __iop_audio_h__
|
|
|
|
enum RxInput {
|
|
RX_RIG_IN = 0,
|
|
RX_USB_IN,
|
|
};
|
|
|
|
enum RxOutput {
|
|
RX_SPEAKER_OUT = 0,
|
|
RX_LINE_OUT,
|
|
RX_USB_OUT,
|
|
};
|
|
|
|
enum TxInput {
|
|
TX_MIC_IN = -1,
|
|
TX_LINE_IN = 0,
|
|
TX_USB_IN,
|
|
};
|
|
|
|
enum TxOutput {
|
|
TX_RIG_OUT = 0,
|
|
TX_USB_OUT,
|
|
};
|
|
|
|
void audioInit();
|
|
void audioSelectTxInput(TxInput);
|
|
void audioTransmit();
|
|
void audioReceive();
|
|
|
|
#endif
|
|
|
|
//======================================================================
|
|
// EOF
|
|
//======================================================================
|