; ; uplink_hardware.dspg ; graphName uplink_hardware ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Macros ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [def IO_SAMPLE_RATE 48000] [def MIC_INPUT_CHANNEL_COUNT 2] [def MIC_OUTPUT_CHANNEL_COUNT 2] [def REF_INPUT_CHANNEL_COUNT 1] [def REF_OUTPUT_CHANNEL_COUNT 1] [def MIC_CLIP_DATA_OUTPUT_CHANNEL_COUNT 2] [def ENABLE_REF_MIXER 0] ; Mic Clip Detection [def kAUClipDetectorParameter_ClippingFlag 1] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; I/O ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; in MicInput in RefInput out MicOutput out RefOutput ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Boxes ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; box MicChannelSelector (aufx clsl appl) 1 1 [if [== [ENABLE_REF_MIXER] 1] { box RefMixer (aufx rsmx appl) 1 1 }{ box RefChannelSelector (aufx clsl appl) 1 1 }] box MicClipChannelSelector (aufx clsl appl) 1 1 box MicClipDetector (aufx cldt appl) 1 1 box MicClipDetectorDeadEnd dead 1 0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Wires ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; wire MicInput MicChannelSelector ([IO_SAMPLE_RATE] [MIC_INPUT_CHANNEL_COUNT]) wire MicChannelSelector MicOutput ([IO_SAMPLE_RATE] [MIC_OUTPUT_CHANNEL_COUNT]) [if [== [ENABLE_REF_MIXER] 1] { wire RefInput RefMixer ([IO_SAMPLE_RATE] [REF_INPUT_CHANNEL_COUNT]) wire RefMixer RefOutput ([IO_SAMPLE_RATE] [REF_OUTPUT_CHANNEL_COUNT]) }{ wire RefInput RefChannelSelector ([IO_SAMPLE_RATE] [REF_INPUT_CHANNEL_COUNT]) wire RefChannelSelector RefOutput ([IO_SAMPLE_RATE] [REF_OUTPUT_CHANNEL_COUNT]) }] wire MicInput MicClipChannelSelector ([IO_SAMPLE_RATE] [MIC_INPUT_CHANNEL_COUNT]) wire MicClipChannelSelector MicClipDetector ([IO_SAMPLE_RATE] [MIC_CLIP_DATA_OUTPUT_CHANNEL_COUNT]) wire MicClipDetector MicClipDetectorDeadEnd ([IO_SAMPLE_RATE] [MIC_CLIP_DATA_OUTPUT_CHANNEL_COUNT]) param mcl0 0 out wireGraphParam mcl0 (MicClipDetector [kAUClipDetectorParameter_ClippingFlag] part 0) [if [> [MIC_INPUT_CHANNEL_COUNT] 1] { param mcl1 0 out wireGraphParam mcl1 (MicClipDetector [kAUClipDetectorParameter_ClippingFlag] part 1) }{}]