專利名稱::用于聲音再現(xiàn)的補(bǔ)償系統(tǒng)和方法
技術(shù)領(lǐng)域:
:本發(fā)明一般涉及一種用在聲音傳輸和再現(xiàn)系統(tǒng)中的補(bǔ)償方法和系統(tǒng),更具體地說(shuō),涉及一種使用參數(shù)值來(lái)控制或調(diào)節(jié)具有變換或模型的過(guò)程的補(bǔ)償方法和系統(tǒng),所述變換或模型具有像傳輸或再現(xiàn)系統(tǒng)中所使用的組件或元件那樣的屬性或響應(yīng)。
背景技術(shù):
:大多數(shù)聲頻再現(xiàn)系統(tǒng)使用機(jī)電揚(yáng)聲器來(lái)聲學(xué)地再現(xiàn)聲頻信號(hào)。揚(yáng)聲器的電氣、機(jī)械、及聲學(xué)屬性常常比理想的差,引起失真、響應(yīng)異常、及聲音的其他染色(coloration)。多種技術(shù)被用來(lái)補(bǔ)償揚(yáng)聲器的特性,以便提高所感覺(jué)到的聲頻質(zhì)量。在實(shí)際上使用并且在文獻(xiàn)中發(fā)現(xiàn)了揚(yáng)聲器的功能或行為模型,用于形成這樣的補(bǔ)償。模型和建模過(guò)程如何工作的一個(gè)良好例子在“ActiveEqualizationofLoudspeakers(揚(yáng)聲器的有源均衡)”,SpeakerBuilder,1997年2月中描述。模型強(qiáng)化技術(shù)語(yǔ)言,并且通常打算模仿或模擬揚(yáng)聲器系統(tǒng)對(duì)電刺激的聲學(xué)響應(yīng)。模型產(chǎn)生或綜合常常是從形成元件的功能分組開始,這些功能分組集中代表了揚(yáng)聲器的全部或一部分,或者像揚(yáng)聲器的全部或一部分那樣舉動(dòng)。線圈和磁鐵部分成為由電阻器、電感器、電容器、反EMF發(fā)電機(jī)及其他被變換部分所表示的電機(jī)。諸如空氣體積、運(yùn)動(dòng)質(zhì)量、聲學(xué)加載、磁性制動(dòng)、及機(jī)械損耗之類的因素的組合可被分析,并被簡(jiǎn)化成LCR諧振器網(wǎng)絡(luò)或電路。最經(jīng)常的是,模型中所表達(dá)的變換后的機(jī)電、聲學(xué)、及機(jī)械表示被進(jìn)一步簡(jiǎn)化或減小到較少元件。模型仍像揚(yáng)聲器那樣響應(yīng),但形成模型的部分已沒(méi)有對(duì)于形成揚(yáng)聲器的部分的準(zhǔn)確行為等同。因此,當(dāng)揚(yáng)聲器的部分被改變時(shí),傳統(tǒng)模型既不打算也不能夠進(jìn)行針對(duì)參數(shù)的零相位補(bǔ)償。人們能描述良好構(gòu)思的模型的頻率響應(yīng)以及其他屬性的特征,并逆轉(zhuǎn)該頻率響應(yīng)及其他屬性,并且實(shí)現(xiàn)揚(yáng)聲器的線性相位校正。該技術(shù)的確多少能起點(diǎn)作用,但其依靠傳統(tǒng)模型的專用、不靈活電路或特殊過(guò)程限制其用于單揚(yáng)聲器設(shè)計(jì)。某些構(gòu)造成在多個(gè)驅(qū)動(dòng)器中劃分信號(hào)頻譜的高質(zhì)量交叉(crossover)網(wǎng)絡(luò)可能具有象這樣的某種共軛響應(yīng)校正。低頻諧振提升(boost)是專門為大多數(shù)揚(yáng)聲器而設(shè)計(jì)的。通常使傳統(tǒng)模型表示可量化和可預(yù)測(cè)聲學(xué)行為以及影響低音響應(yīng)的其它揚(yáng)聲器設(shè)計(jì)因素。機(jī)械構(gòu)造和空氣的屬性確定頻率、諧振損耗及配置對(duì)來(lái)自揚(yáng)聲器的聲學(xué)輸出的影響。能以這種方式對(duì)于較寬的頻率范圍設(shè)計(jì)和實(shí)現(xiàn)對(duì)零相位共軛或同階校正的良好近似。幾個(gè)組件需要匹配諧振行為,但當(dāng)對(duì)具有類似概念和設(shè)計(jì)的不同揚(yáng)聲器進(jìn)行調(diào)節(jié)時(shí)這些組件都彼此相互作用。因此,操作未被嚴(yán)格地按參數(shù)控制,因?yàn)楸仨毟鶕?jù)模型重新計(jì)算調(diào)節(jié)以產(chǎn)生最精確重現(xiàn)新?lián)P聲器所需要的最小相位或準(zhǔn)確匹配。當(dāng)添加較多校正時(shí),相互作用問(wèn)題變得難以克服。每當(dāng)進(jìn)行調(diào)節(jié)時(shí),必須以實(shí)驗(yàn)方式調(diào)整系統(tǒng)或分析模型。因此,用于響應(yīng)平化的集總模型過(guò)程是為特定揚(yáng)聲器而固有設(shè)計(jì)的。對(duì)于其它揚(yáng)聲器必須重新設(shè)計(jì)該過(guò)程。傳統(tǒng)曲線擬合方法可能要求建立幾百個(gè)數(shù)據(jù)點(diǎn)和相應(yīng)調(diào)節(jié),并且要求多個(gè)組件或大量處理功率匹配所獲取的頻率響應(yīng)。模擬方法是不實(shí)際的,而數(shù)字過(guò)程需要大量計(jì)算和大規(guī)模的體系結(jié)構(gòu)來(lái)實(shí)現(xiàn)這點(diǎn)。在沒(méi)有對(duì)揚(yáng)聲器及其操作的知識(shí)的情況下,兩者都不能提供相位精確響應(yīng)或稍后描述的隱藏校正。在沒(méi)有模型的情況下,根據(jù)所測(cè)量的響應(yīng)把幅度、時(shí)間和相位校正結(jié)合在一起的努力變得很艱難。揚(yáng)聲器的某些最重要行為(關(guān)于聲學(xué)可感覺(jué)效果)不能由傳統(tǒng)方法來(lái)建模或?qū)崿F(xiàn)。這樣的行為包括駐波干擾、模態(tài)分散(modalbreakup)和耦合諧振以及來(lái)自這樣的潛在相互作用的聲學(xué)和機(jī)械行為的非線性后果。起相反作用的隨機(jī)運(yùn)動(dòng)或分散可能發(fā)生。即使當(dāng)平均響應(yīng)保持平坦或者與再現(xiàn)的其它頻率相同時(shí),能量在信號(hào)刺激期間也能逐漸增長(zhǎng)而當(dāng)信號(hào)變化或停止時(shí)也能被釋放。另外,需要考慮與運(yùn)動(dòng)部分的剛度(stiffness)和用于遠(yuǎn)離驅(qū)動(dòng)音圈的運(yùn)動(dòng)的高頻解耦有關(guān)的其它空間因素。這些因素中的任一個(gè)都能對(duì)雙耳聽覺(jué)產(chǎn)生源運(yùn)動(dòng)、延遲能量釋放以及相位誤差。通常,這樣的破壞響應(yīng)可能是不可見(jiàn)的,或者很難由傳統(tǒng)麥克風(fēng)和頻譜分析器校準(zhǔn)方法來(lái)解釋。例如,由節(jié)點(diǎn)(nodal)和駐波行為產(chǎn)生的不必要的響應(yīng)影響揚(yáng)聲器的穩(wěn)定時(shí)間、方向行為及輻射輸出。通常,這些響應(yīng)引起信息信號(hào)的感覺(jué)變化,然而從響應(yīng)圖中可能看不到或識(shí)別不出這些感覺(jué)變化。具有大存儲(chǔ)能量的機(jī)械運(yùn)動(dòng)在換能器不同部分處可能異相。聲學(xué)輸出可能顯得是平坦的,但人類雙耳聽覺(jué)能把行為本地化到其源,并且改變后的感覺(jué)能使立體成像變壞。通常,機(jī)械干擾是可聽見(jiàn)的,但是從使用頻率掃描和麥克風(fēng)進(jìn)行的響應(yīng)測(cè)量中是看不見(jiàn)或難以解釋這種機(jī)械干擾的。輻射表面的部分能以相對(duì)于其他部分的不同相位關(guān)系振動(dòng),從而其加性聲學(xué)輸出與換能器內(nèi)的運(yùn)動(dòng)和所涉及的能量存儲(chǔ)相比較低。當(dāng)在節(jié)點(diǎn)頻率處的信號(hào)變化并且突然停止時(shí),存儲(chǔ)能量的釋放能與在不同頻率處的其他信號(hào)相互作用。所產(chǎn)生的在兩個(gè)頻率之間的差拍聲是可聽到的并且非常令人討厭。具有在干擾頻率范圍中的頻譜的聲音可能顯得較響并且是粒狀的。人類雙耳聽覺(jué)能把干擾本地化到驅(qū)動(dòng)器或方向波瓣可能從其彈回的表面,由此進(jìn)一步損害來(lái)自多揚(yáng)聲器立體聲再現(xiàn)的舞臺(tái)幻覺(jué)。對(duì)于這種情形,必須充分衰減產(chǎn)生機(jī)械干擾的頻率,以防止結(jié)果響應(yīng)的未掩蔽的再現(xiàn)。經(jīng)驗(yàn)已經(jīng)表明,實(shí)現(xiàn)這一點(diǎn)所需要的尖銳深陷波器(notch)除去校正頻率周圍的足夠能量以產(chǎn)生鼻音。如果修改這種不適當(dāng)校正以實(shí)現(xiàn)平坦響應(yīng),那么機(jī)械聲音與潛在的不合需要的平衡象差一道保持。用換能器、外殼、及擴(kuò)展低音響應(yīng)的諧振裝置,如端口或無(wú)源輻射器來(lái)構(gòu)造多個(gè)小揚(yáng)聲器。通常,這些部分設(shè)計(jì)成實(shí)現(xiàn)效率、頻率響應(yīng)精度、低音擴(kuò)展、及可接收失真之間的實(shí)際和經(jīng)濟(jì)折衷。便宜、低功率系統(tǒng)的設(shè)計(jì)者一般選擇較高效率,以便降低放大器要求,以及電源和封裝的有關(guān)成本。折衷情形暴露多個(gè)不合需要的行為方面。大多數(shù)傳統(tǒng)揚(yáng)聲器校正方法應(yīng)用幅度均衡的某種變化以平化和擴(kuò)展來(lái)自揚(yáng)聲器的響應(yīng)。調(diào)節(jié)有時(shí)通過(guò)耳朵實(shí)現(xiàn)。為了進(jìn)行定量調(diào)節(jié),人們必須獲得有關(guān)數(shù)據(jù)。實(shí)現(xiàn)這點(diǎn)的大多數(shù)普通技術(shù)使用來(lái)自噪聲刺激的頻譜分析。然后,響應(yīng)圖或顯示指示如何調(diào)節(jié)均衡器?;谘舆t接收或抽樣窗口的較成熟技術(shù)能測(cè)量來(lái)自揚(yáng)聲器的第一到達(dá)響應(yīng),并且能除去高頻室內(nèi)干擾以產(chǎn)生類似無(wú)回聲的數(shù)據(jù)。目的是捕獲與室內(nèi)聽眾或標(biāo)準(zhǔn)測(cè)量操作有關(guān)的信息,在該標(biāo)準(zhǔn)測(cè)量操作中,通常指定一個(gè)測(cè)試麥克風(fēng),并將其放置在離揚(yáng)聲器一米處。這樣的技術(shù)產(chǎn)生單點(diǎn)測(cè)試麥克風(fēng)聽起來(lái)平衡的響應(yīng)。一種或多種已知系統(tǒng)通過(guò)調(diào)節(jié)路徑長(zhǎng)度、或時(shí)間延遲來(lái)把多個(gè)揚(yáng)聲器對(duì)準(zhǔn)一個(gè)收聽位置,從而稍微勝過(guò)這種技術(shù)。其他技術(shù)在一個(gè)事件之后提供暫態(tài)響應(yīng)波形、瀑布圖或一系列頻譜圖。獲取群延遲和與時(shí)間有關(guān)的信息。這樣的數(shù)據(jù)需要解釋,并且對(duì)于頻率響應(yīng)校平(leveling)操作的用途有限。能識(shí)別一些行為響應(yīng),但必須知道關(guān)于揚(yáng)聲器的更多信息。為此需要諸如加速度計(jì)、差分聲學(xué)探針、以及麥克風(fēng)之類的測(cè)量器件設(shè)備。檢測(cè)儀器可被放置得靠近一個(gè)可疑行為地點(diǎn),并且被移動(dòng)以探測(cè)響應(yīng)如何隨位置變化??稍谒锌梢深l率上調(diào)諧或緩慢掃過(guò)加權(quán)陷波,同時(shí)主觀地觀察噪聲產(chǎn)生。需要關(guān)于部件尺寸、收聽位置、以及地板、書架、可能的計(jì)算機(jī)監(jiān)視器、或可能是收聽環(huán)境的一部分的其他介入物體的更多信息。需要其他技術(shù)規(guī)格或表示以完成能夠?qū)崿F(xiàn)時(shí)間相位精確校正的共軛模型。人類操作者通過(guò)調(diào)節(jié)圖形均衡器、手動(dòng)調(diào)諧一個(gè)參數(shù)濾波器、或改變交叉(crossover)設(shè)備的設(shè)置,能承擔(dān)對(duì)準(zhǔn)角色。工業(yè)模擬組件實(shí)現(xiàn)這些功能,但它們有限制。圖形均衡器具有高達(dá)31個(gè)頻帶或諧振器,參數(shù)設(shè)備包括幾個(gè)可調(diào)節(jié)濾波器,并且少數(shù)幾種具有可變交叉和斜限(shelf)功能。需要更多個(gè)濾波器。圖形和參數(shù)均衡器的組合不能夠提供足夠大數(shù)量的點(diǎn),也不能提供準(zhǔn)確相位和響應(yīng),來(lái)有效地補(bǔ)償來(lái)自揚(yáng)聲器的復(fù)雜行為?;蛘咝U黄ヅ涮囟l率,從而產(chǎn)生相位誤差,或者濾波器的數(shù)量不足夠處理穩(wěn)定時(shí)間和駐波問(wèn)題。群延遲失真、時(shí)間相位誤差、不完整校正及其他缺點(diǎn)可能勝過(guò)其他改進(jìn)。DSP濾波器能產(chǎn)生比模擬電路能實(shí)現(xiàn)的多得多的濾波器部分。已利用專用控制生成軟件來(lái)使用由從參數(shù)上控制的部分組成的圖形均衡器,以產(chǎn)生房間響應(yīng)校平。這樣的過(guò)程難以建立,因?yàn)榉块g與重要行為指示物的識(shí)別相干擾。沒(méi)有其輸入,共軛響應(yīng)校正就是不可能的。駐波和節(jié)點(diǎn)失真校正能由這種系統(tǒng)形成。然而,從參數(shù)上移動(dòng)補(bǔ)償陷波器所需的難以實(shí)施的編譯和處理是困難的。單點(diǎn)響應(yīng)拾波和FFT很可能已被用于輸入到系統(tǒng)的數(shù)據(jù)。這樣的方法不能響應(yīng)或提供產(chǎn)生對(duì)揚(yáng)聲器產(chǎn)生真實(shí)共軛響應(yīng)所需要的時(shí)間相位信息。分析系統(tǒng),如MLSSA,能從測(cè)量中除去房間干擾,并且能產(chǎn)生來(lái)自一個(gè)揚(yáng)聲器系統(tǒng)的頻率、暫態(tài)和穩(wěn)態(tài)響應(yīng)數(shù)據(jù)。然而,必須解釋來(lái)自這些測(cè)量的大量數(shù)據(jù)。多頻帶圖形均衡器不是建立校正的一種良好選擇。DSP系統(tǒng)能經(jīng)濟(jì)地產(chǎn)生許多用模擬電路不能實(shí)現(xiàn)的參數(shù)濾波器和與時(shí)間有關(guān)的過(guò)程。傳統(tǒng)大規(guī)模DSP系統(tǒng)幾乎沒(méi)有由其他測(cè)量異常識(shí)別和選出揚(yáng)聲器行為的裝置。它們的頻域響應(yīng)可能添加相位誤差和忽視延遲穩(wěn)態(tài)能量。對(duì)于一個(gè)收聽位置聲音可能改進(jìn),但對(duì)于其它位置聲音將變壞。更可能的是,再現(xiàn)聲音將變化而沒(méi)有決定性的改進(jìn)。所以,與聲音再現(xiàn)有關(guān)的技術(shù)人員已經(jīng)認(rèn)識(shí)到,需要一種系統(tǒng)和方法,用于對(duì)聲音再現(xiàn)設(shè)備的完整行為建模,以便可產(chǎn)生對(duì)于聲音再現(xiàn)設(shè)備響應(yīng)的共軛響應(yīng)。也已經(jīng)認(rèn)識(shí)到對(duì)一種采用可修改共軛響應(yīng)的系統(tǒng)和方法的需要。另外,也已經(jīng)認(rèn)識(shí)到對(duì)補(bǔ)償獨(dú)立于其中要收聽聲音的環(huán)境的聲音再現(xiàn)的系統(tǒng)和方法的需要。本發(fā)明滿足這些需要和其他需要。
發(fā)明內(nèi)容簡(jiǎn)短和一般地說(shuō),本發(fā)明提供一種系統(tǒng)和方法,用于對(duì)一個(gè)聲音再現(xiàn)設(shè)備的個(gè)別響應(yīng)特性建模,以產(chǎn)生一種用于改進(jìn)設(shè)備的頻率、時(shí)間、相位及幅度行為的共軛模型,以及提供改進(jìn)的聲平衡、聲音清晰性、減小的失真及改進(jìn)的立體成像。在第一方面,本發(fā)明涉及一種設(shè)備,用于修改一個(gè)用于輸入到一個(gè)聲音再現(xiàn)設(shè)備的電聲頻信號(hào),該聲音再現(xiàn)設(shè)備的特征在于多個(gè)個(gè)別響應(yīng)。設(shè)備的個(gè)別響應(yīng)結(jié)合以定義一個(gè)整體響應(yīng)。每個(gè)個(gè)別響應(yīng)包括頻率、時(shí)間、相位或暫態(tài)響應(yīng)中的一個(gè)或多個(gè)。該設(shè)備包括多個(gè)修改濾波器,這些濾波器具有模擬聲音再現(xiàn)設(shè)備的多個(gè)個(gè)別響應(yīng)的修改響應(yīng)。修改濾波器接收電聲頻信號(hào),修改電聲頻信號(hào),及把電聲頻信號(hào)提供到聲音再現(xiàn)設(shè)備。該設(shè)備還包括多個(gè)可調(diào)節(jié)參數(shù)??烧{(diào)節(jié)參數(shù)的每一個(gè)與修改濾波器中的至少一個(gè)有關(guān)??烧{(diào)節(jié)參數(shù)允許對(duì)于修改濾波器的響應(yīng)的調(diào)節(jié)。調(diào)節(jié)產(chǎn)生多個(gè)個(gè)別共軛響應(yīng)。每個(gè)個(gè)別共軛響應(yīng)與多個(gè)個(gè)別響應(yīng)中的至少一個(gè)有關(guān)。通過(guò)產(chǎn)生具有對(duì)再現(xiàn)器件設(shè)備的個(gè)別響應(yīng)建模的響應(yīng)的多個(gè)濾波器或網(wǎng)絡(luò)并且提供用于調(diào)節(jié)濾波器或網(wǎng)絡(luò)響應(yīng)的參數(shù),系統(tǒng)允許產(chǎn)生把共軛響應(yīng),以向再現(xiàn)設(shè)備提供特定相反或校正響應(yīng)。在本發(fā)明的詳細(xì)方面,聲音再現(xiàn)設(shè)備的多個(gè)個(gè)別響應(yīng)與聲音再現(xiàn)設(shè)備的機(jī)械、聲學(xué)及電磁行為中的至少一個(gè)有關(guān)。在本發(fā)明的另一個(gè)詳細(xì)方面,多個(gè)修改響應(yīng)結(jié)合以形成一個(gè)與聲音再現(xiàn)設(shè)備的整體響應(yīng)共軛的整體響應(yīng)。在本發(fā)明的又一個(gè)詳細(xì)方面,修改濾波器中的至少一個(gè)包括一個(gè)截止濾波器,并且用于調(diào)節(jié)截止濾波器的頻率響應(yīng)的參數(shù)包括波峰頻率、幅度及Q參數(shù)。在本發(fā)明的再一個(gè)方面,修改濾波器中的至少一個(gè)包括一個(gè)恒定斜率均衡器,并且用于調(diào)節(jié)恒定斜率均衡器的頻率響應(yīng)的參數(shù)包括交叉頻率和提升斜限參數(shù)。在本發(fā)明的其它詳細(xì)方面,修改濾波器的至少一個(gè)包括一個(gè)參數(shù)陷波濾波器,并且用于調(diào)節(jié)參數(shù)陷波濾波器的頻率響應(yīng)的參數(shù)包括陷波頻率、幅度和Q參數(shù),并且修改濾波器中的至少一個(gè)包括一個(gè)參數(shù)陷波提升濾波器,并且用于調(diào)節(jié)參數(shù)陷波提升濾波器的頻率響應(yīng)的參數(shù)包括陷波頻率、幅度和Q參數(shù)。在第二方面,本發(fā)明涉及一種聲音補(bǔ)償系統(tǒng),用于改變一個(gè)用于輸入到一個(gè)具有有關(guān)行為特性的聲音再現(xiàn)設(shè)備的電聲頻信號(hào)。該系統(tǒng)包括聲音再現(xiàn)設(shè)備的一個(gè)模型。該模型包括模擬聲音再現(xiàn)設(shè)備的行為特性中的至少一個(gè)的多個(gè)濾波器或過(guò)程。每個(gè)濾波器具有一個(gè)有關(guān)響應(yīng),該有關(guān)響應(yīng)結(jié)合以定義該模型的整體響應(yīng)。每個(gè)個(gè)別響應(yīng)包括頻率、時(shí)間、相位或暫態(tài)響應(yīng)中的一個(gè)或多個(gè)。系統(tǒng)還包括一個(gè)控制器,其修改多個(gè)濾波器中每一個(gè)的響應(yīng)以把該濾波器變換成一個(gè)共軛濾波器。每個(gè)共軛濾波器具有與濾波器或過(guò)程的原始響應(yīng)共軛的響應(yīng)。在本發(fā)明的一個(gè)詳細(xì)方面,行為特性由聲音再現(xiàn)設(shè)備的各個(gè)組件的個(gè)體或群組所定義。通過(guò)對(duì)再現(xiàn)設(shè)備的各個(gè)組件和這些組件或組件群組的特性建模,能從參數(shù)上產(chǎn)生和操縱對(duì)于這些特性的個(gè)別補(bǔ)償。因此,這些相同的補(bǔ)償能應(yīng)用于具有類似組件或特性的另外的系統(tǒng)。在本發(fā)明的其它詳細(xì)方面,濾波器由數(shù)字信號(hào)過(guò)程或由模擬電路定義,并且控制器包括一個(gè)計(jì)算機(jī)或可調(diào)節(jié)電路元件。在本發(fā)明的其它詳細(xì)方面,聲音再現(xiàn)設(shè)備包括一個(gè)揚(yáng)聲器,并且多個(gè)濾波器中的至少一個(gè)包括至少一個(gè)有關(guān)可調(diào)節(jié)參數(shù),并且參數(shù)值是根據(jù)基于揚(yáng)聲器的物理特性計(jì)算出的,根據(jù)一個(gè)標(biāo)準(zhǔn)揚(yáng)聲器模型導(dǎo)出的或使用標(biāo)準(zhǔn)測(cè)試測(cè)量按實(shí)驗(yàn)方式確定的。在本發(fā)明的又一個(gè)詳細(xì)方面,控制器被配置為使得一個(gè)參數(shù)設(shè)置中的調(diào)節(jié)調(diào)制至少一個(gè)其它參數(shù)的設(shè)置。在本發(fā)明的再一個(gè)詳細(xì)方面,控制器監(jiān)視聲音再現(xiàn)設(shè)備處的程序條件,并且基于程序條件設(shè)置參數(shù)值中的至少一個(gè)。在第三方面,本發(fā)明涉及一種聲音系統(tǒng)。該聲音系統(tǒng)包括一個(gè)具有有關(guān)機(jī)械、聲學(xué)及電磁行為特性的聲音再現(xiàn)設(shè)備。該聲音系統(tǒng)還包括一個(gè)源,用于把一個(gè)電聲頻信號(hào)輸出到聲音再現(xiàn)設(shè)備的一個(gè)模型。該模型包括模擬聲音再現(xiàn)設(shè)備的機(jī)械、聲學(xué)和電磁行為特性中的至少一個(gè)的多個(gè)濾波器。每個(gè)濾波器具有一個(gè)包括頻率、時(shí)間、相位或暫態(tài)響應(yīng)中的至少一個(gè)的有關(guān)響應(yīng)。該模型把電聲頻信號(hào)輸出到聲音再現(xiàn)設(shè)備。該聲音系統(tǒng)還包括一個(gè)控制器,它修改濾波器的響應(yīng),以把該模型變換成一個(gè)共軛模型,該共軛模型具有多個(gè)濾波器,這些濾波器具有包括與該濾波器的原始響應(yīng)共軛的響應(yīng)。在第四方面,本發(fā)明涉及一種方法,用于修改一個(gè)用于輸入到一個(gè)聲音再現(xiàn)設(shè)備的電聲頻信號(hào),該聲音再現(xiàn)設(shè)備的特征在于多個(gè)個(gè)別響應(yīng),這些個(gè)別響應(yīng)結(jié)合起來(lái)定義聲音再現(xiàn)設(shè)備的一個(gè)整體頻率響應(yīng)。每個(gè)個(gè)別響應(yīng)包括頻率、時(shí)間、相位或暫態(tài)響應(yīng)中的一個(gè)或多個(gè)。該方法包括以下步驟用多個(gè)濾波器模擬多個(gè)個(gè)別響應(yīng);并且調(diào)節(jié)多個(gè)濾波器的響應(yīng),以使得對(duì)于每個(gè)濾波器,調(diào)節(jié)后的響應(yīng)包括與個(gè)別響應(yīng)中的一個(gè)共軛的響應(yīng)。該方法還包括把電聲頻信號(hào)輸入到濾波器的步驟。在本發(fā)明的一個(gè)詳細(xì)方面,濾波器中的至少一個(gè)包括一個(gè)截止濾波器,并且調(diào)節(jié)截止濾波器的頻率響應(yīng)的步驟包括設(shè)置波峰頻率、幅度及Q中的至少一個(gè)的步驟。在本發(fā)明的另一個(gè)詳細(xì)方面,濾波器中的至少一個(gè)包括一個(gè)恒定斜率均衡器,并且調(diào)節(jié)恒定斜率均衡器的頻率響應(yīng)的步驟包括設(shè)置交叉頻率和提升斜限中的至少一個(gè)的步驟。在本發(fā)明的又一個(gè)詳細(xì)方面,濾波器的至少一個(gè)包括一個(gè)參數(shù)陷波濾波器,并且調(diào)節(jié)參數(shù)陷波濾波器的頻率響應(yīng)的步驟包括設(shè)置陷波頻率、幅度和Q中的至少一個(gè)的步驟。在本發(fā)明的再一個(gè)方面,濾波器的至少一個(gè)包括一個(gè)參數(shù)陷波提升濾波器,并且調(diào)節(jié)參數(shù)陷波提升濾波器的頻率響應(yīng)的步驟包括設(shè)置陷波頻率、幅度和Q中的至少一個(gè)的步驟。在第五方面,本發(fā)明涉及一種方法,用于改變一個(gè)用于輸入到一個(gè)具有有關(guān)行為特性的聲音再現(xiàn)設(shè)備的電聲頻信號(hào)。該方法包括用多個(gè)濾波器模擬聲音再現(xiàn)設(shè)備的行為特性中的至少一個(gè)的步驟。濾波器中的每一個(gè)具有一個(gè)包括頻率、時(shí)間、相位或暫態(tài)響應(yīng)中的至少一個(gè)的有關(guān)響應(yīng)。該方法還包括以下步驟對(duì)于濾波器中的每一個(gè),修改濾波器的響應(yīng),以把濾波器變換成一個(gè)共軛濾波器,其具有一個(gè)包括該濾波器的原始響應(yīng)的共軛的響應(yīng)。在本發(fā)明的詳細(xì)方面,聲音再現(xiàn)設(shè)備包括一個(gè)揚(yáng)聲器,多個(gè)濾波器中的至少一個(gè)具有至少一個(gè)有關(guān)可調(diào)節(jié)參數(shù),并且修改濾波器的響應(yīng)的步驟包括如下步驟對(duì)的一個(gè)或多個(gè)根據(jù)揚(yáng)聲器的物理特性計(jì)算可調(diào)節(jié)參數(shù)值的值并且把參數(shù)設(shè)置為計(jì)算出的值,根據(jù)一個(gè)標(biāo)準(zhǔn)揚(yáng)聲器模型導(dǎo)出可調(diào)節(jié)參數(shù)并且把參數(shù)設(shè)置為導(dǎo)出的值,以及使用標(biāo)準(zhǔn)測(cè)試測(cè)量以實(shí)驗(yàn)方式確定可調(diào)節(jié)參數(shù);并且把參數(shù)設(shè)置為所確定的值。在本發(fā)明的又一個(gè)詳細(xì)方面,該方法還包括以下步驟響應(yīng)另一個(gè)參數(shù)的設(shè)置調(diào)制至少一個(gè)參數(shù)的設(shè)置。在另一個(gè)詳細(xì)方面,該方法還包括以下步驟監(jiān)視聲音再現(xiàn)設(shè)備處的至少一個(gè)程序條件,并且基于程序條件設(shè)置參數(shù)值中的至少一個(gè)。保持聲中性的這些特征和能力使得一種補(bǔ)償系統(tǒng)和方法能夠進(jìn)行復(fù)雜且動(dòng)態(tài)改變的響應(yīng)校正,能用簡(jiǎn)化且直覺(jué)的控制規(guī)格控制和調(diào)節(jié)這些響應(yīng)校正。與傳統(tǒng)響應(yīng)校平方法相比較,補(bǔ)償方法和系統(tǒng)要求較小的處理復(fù)雜性,并且能容易地應(yīng)用于不同的聲音再現(xiàn)系統(tǒng)。補(bǔ)償方法和系統(tǒng),作為整體或片段部分,能被打開或關(guān)閉,被從一個(gè)頻率移動(dòng)到另一個(gè),或者被簡(jiǎn)單且直覺(jué)的命令所改變。當(dāng)結(jié)合附圖理解以下更詳細(xì)的描述時(shí),可從中看出本發(fā)明的這些和其它方面及優(yōu)點(diǎn),附圖以示例方式圖示了本發(fā)明的優(yōu)選實(shí)施例。附圖簡(jiǎn)介圖1是包括一種按照本發(fā)明的補(bǔ)償系統(tǒng)的聲再現(xiàn)系統(tǒng)的框圖;圖2是具有多個(gè)修改濾波器的補(bǔ)償系統(tǒng)的框圖,每個(gè)修改濾波器具有用來(lái)修改濾波器的頻率、時(shí)間及相位響應(yīng)的一個(gè)或多個(gè)的多個(gè)可調(diào)節(jié)參數(shù);圖3a_3e描繪用于揚(yáng)聲器的多個(gè)響應(yīng)組件;圖3f描繪當(dāng)組合圖3a_3e的個(gè)別響應(yīng)時(shí)形成的整體響應(yīng);圖4a_4e描繪用于補(bǔ)償系統(tǒng)的多個(gè)可調(diào)節(jié)響應(yīng),每個(gè)響應(yīng)是可調(diào)節(jié)的以形成對(duì)于圖3a_3e的響應(yīng)組件的共軛響應(yīng);圖4f描繪了當(dāng)組合圖4a_4e的個(gè)別頻率響應(yīng)時(shí)形成的整體共軛響應(yīng);圖5是曲線圖,描繪用于產(chǎn)生一個(gè)聲學(xué)功率輸出的圓形錐盆(cone)的運(yùn)動(dòng);圖6描繪用于兩個(gè)小揚(yáng)聲器驅(qū)動(dòng)器的頻率響應(yīng);圖7描繪瀑布圖,其中在右邊的箭頭表示增大的時(shí)間軸;圖8a_8f描繪用來(lái)調(diào)節(jié)參數(shù)控制以便修改修改濾波器的響應(yīng)的一系列圖形用戶接口;圖9是低通/高通波峰濾波器的示意圖,其中所有的C必須變化以移動(dòng)頻率;圖10是提升并且具有近參數(shù)獨(dú)立的有源RC或恒定斜率均衡器的示意圖,其中Cc和Rc都非常大以偏置opamp;圖11是頻率可移動(dòng)陷波器的示意圖;圖12是陷波器的一種可選擇結(jié)構(gòu)的示意圖;圖13包括一個(gè)加權(quán)陷波濾波器和用于提升的響應(yīng)以及可用濾波器獲得的陷波器組件和組合響應(yīng)的示意圖;圖14包括一個(gè)多重諧振加權(quán)陷波濾波器和用于提升的響應(yīng)以及可使用濾波器得到的陷波器組件和組合響應(yīng)的示意圖;圖15描繪對(duì)于一個(gè)陷波濾波器的頻率和相位響應(yīng);圖16是延遲干擾模擬器/補(bǔ)償器的示意圖,其中CW等于與干擾相同的響應(yīng),CCff等于共軛校正并且RC等于用于較高頻率的減小補(bǔ)償;及圖17是全通或相移網(wǎng)絡(luò)的示意圖。圖18、19和20表示用于低通濾波器(U和高通濾波器(Hp)截止濾波器的可能實(shí)現(xiàn)。圖21表示用于高和低斜限均衡器的可能實(shí)現(xiàn)。圖22表示可用于提升或陷波器應(yīng)用的參數(shù)均衡器實(shí)現(xiàn)。圖23、24分別示出了加權(quán)陷波器的數(shù)字實(shí)現(xiàn)。圖25示出了用來(lái)補(bǔ)償一個(gè)帶有5英寸低音驅(qū)動(dòng)器和3英寸高音喇叭的小書架揚(yáng)聲器的補(bǔ)償系統(tǒng)的框圖。圖26表示用來(lái)產(chǎn)生Lx、Hx、Ls、Hs、LP、和Hp濾波器和參數(shù)調(diào)節(jié)的電路。圖27、28表示W(wǎng)tl陷波器部分和用于揚(yáng)聲器的代表性調(diào)諧。圖29表示一個(gè)單低Q提升。圖30示出了用于時(shí)間校正的全通均衡器。圖31示出了揚(yáng)聲器參數(shù)文件輸入和輸出邏輯。圖32示出了一個(gè)至DSP連接邏輯的性能頁(yè)UI的例子。具體實(shí)施例方式如下描述集中在本發(fā)明對(duì)于揚(yáng)聲器系統(tǒng)的應(yīng)用上。然而,本發(fā)明不限于這樣的應(yīng)用,并且可以應(yīng)用于其他聲傳輸和再現(xiàn)設(shè)備,如在說(shuō)明書末尾所敘述的那些?,F(xiàn)在參照附圖,其中類似標(biāo)號(hào)在所有圖中指示類似或相應(yīng)部分,并且具體地對(duì)于圖1,示出了一種包括本發(fā)明的系統(tǒng)10。系統(tǒng)10包括一個(gè)信號(hào)源12,用來(lái)提供電聲頻信號(hào)。信號(hào)源例如可以是一個(gè)CD唱機(jī)。來(lái)自信號(hào)源12的輸出14輸入到一個(gè)采用本發(fā)明的詳細(xì)特征和方面的補(bǔ)償系統(tǒng)16。輸出14由補(bǔ)償系統(tǒng)16處理,以產(chǎn)生一個(gè)饋給到一個(gè)功率放大器19和一個(gè)揚(yáng)聲器20的補(bǔ)償后的電聲頻信號(hào)18。參照?qǐng)D2,補(bǔ)償系統(tǒng)16采用多個(gè)濾波器24,濾波器24或者個(gè)別地或者組合地呈現(xiàn)模擬由揚(yáng)聲器的各種機(jī)械、聲學(xué)和電磁組件所呈現(xiàn)的頻率、時(shí)間和相位響應(yīng)的個(gè)別補(bǔ)償響應(yīng)。與濾波器24的每一個(gè)相關(guān)聯(lián),并因而與補(bǔ)償響應(yīng)的每一個(gè)相關(guān)聯(lián)的是一個(gè)或多個(gè)可調(diào)節(jié)參數(shù)22。使用DSP或模擬電路產(chǎn)生濾波器24。數(shù)字信號(hào)處理是優(yōu)選實(shí)現(xiàn),因?yàn)閾P(yáng)聲器行為的分析模型容易轉(zhuǎn)化為用于設(shè)計(jì)數(shù)字系統(tǒng)的數(shù)學(xué)綜合技術(shù)。模擬電路具有建立在級(jí)聯(lián)體系結(jié)構(gòu)中的失真。因此,僅當(dāng)模擬設(shè)計(jì)者知道在行為響應(yīng)是隔離和無(wú)相互作用時(shí)可使用并聯(lián)連接電路元件時(shí),補(bǔ)償系統(tǒng)16的實(shí)際模擬實(shí)現(xiàn)才是可能的。一些參數(shù)22調(diào)節(jié)與補(bǔ)償系統(tǒng)的一個(gè)或多個(gè)部分相互作用。一種數(shù)字實(shí)現(xiàn)按需要提供利用可能設(shè)置的編譯或計(jì)算這些關(guān)系的能力。當(dāng)由計(jì)算機(jī)控制補(bǔ)償系統(tǒng)時(shí),建立調(diào)節(jié)顯得簡(jiǎn)單和直觀。這些計(jì)算和可調(diào)節(jié)補(bǔ)償響應(yīng)的每一個(gè)能縮放到除其他外尤其與尺寸、運(yùn)動(dòng)屬性或聲學(xué)輻射行為有關(guān)的參數(shù)變量、特征、或設(shè)計(jì)方面。補(bǔ)償系統(tǒng)能調(diào)節(jié)和使用揚(yáng)聲器的時(shí)間延遲、最大漂移極限、波長(zhǎng)關(guān)系、節(jié)點(diǎn)和駐波頻率、邊界反射及類似屬性。補(bǔ)償系統(tǒng)不是編譯或減小揚(yáng)聲器元件以產(chǎn)生一個(gè)集總響應(yīng)系統(tǒng),而是使用最小相位等價(jià)和無(wú)相互作用的濾波器串ο小揚(yáng)聲器的典型整體響應(yīng)表示在圖3f中。在圖4的頂部處重復(fù)相同的響應(yīng)。圖3a-3e表示與組合以產(chǎn)生整體響應(yīng)曲線的揚(yáng)聲器組件有關(guān)的多個(gè)個(gè)別響應(yīng)。圖4a_4e表示經(jīng)多個(gè)可調(diào)節(jié)參數(shù),例如!^、!^、!^、扎等,調(diào)節(jié)以產(chǎn)生多個(gè)共軛響應(yīng)的多個(gè)個(gè)別補(bǔ)償響應(yīng)。下面詳細(xì)描述參數(shù)的屬性。如圖4f中所示,個(gè)別共軛響應(yīng)組合以產(chǎn)生或一個(gè)整體共軛響應(yīng)。整體揚(yáng)聲器響應(yīng)(圖3f)和共軛響應(yīng)(圖4f)的組合產(chǎn)生一個(gè)平滑響應(yīng)。從圖3a和4a中可見(jiàn),高頻和低頻的第一和第二截止拐點(diǎn)都是顯而易見(jiàn)的。在曲線上的這些點(diǎn)確定用于LX、LS、Hx、和Hs的頻率。當(dāng)音圈長(zhǎng)度和運(yùn)動(dòng)聲順(motionalcompliance)能力已知時(shí),那么類似于圖5中表示的一種的計(jì)算或圖表能幫助確定用于Lp的合理頻率和幅度。以類似的方式處理HP。有關(guān)的拐點(diǎn)、截止和頻率表示在圖3b和4b中。Lp和Hp的幅度設(shè)置具有主觀功率處理和加權(quán)補(bǔ)償問(wèn)題。在其外殼體中操作的驅(qū)動(dòng)器的自諧振能被測(cè)量或計(jì)算以產(chǎn)生W—由傳統(tǒng)模型能以實(shí)施方式測(cè)量和計(jì)算有關(guān)的Qtl和IaIci設(shè)置,條件是已經(jīng)除去聲學(xué)耦合因數(shù)。圖3d和4d表示這種低音補(bǔ)償。在常規(guī)模型中很少使用機(jī)械諧振的表示,例如Wp圖3d和4d的高頻部分表示,來(lái)自W1的聲學(xué)響應(yīng)誤差和染色能通過(guò)設(shè)置“^來(lái)除去。注意到周圍諧振,并且能選擇預(yù)置或缺省Q,以補(bǔ)償所涉及的揚(yáng)聲器材料的典型諧振行為模型。節(jié)點(diǎn)和干擾行為在圖3e中是顯而易見(jiàn)的。在圖6中的其他例子揭示了節(jié)點(diǎn)跳躍、干擾及因?yàn)榇潭?、污染的聲音而引起的常常叫做“錐叫(conecry)”的相關(guān)問(wèn)題。與表示在圖7中的那些類似的瀑布圖或MLSSA能表示這樣的高能量移動(dòng)干擾的典型頻率和延遲分散結(jié)果。圖4e中的隱藏補(bǔ)償陷波器Wra和W。。2除去這些頻率和能量存儲(chǔ)問(wèn)題。添加斜坡或傾斜EQ以實(shí)現(xiàn)最好的聽眾喜好。圖3c和4c表示行為和校正。為了主觀平衡可以添加額外的向下傾斜。如能看到的那樣,大致地,每個(gè)橫跨少到8位分辨率的12至16次調(diào)節(jié)能進(jìn)行非常良好的共軛校正。來(lái)自兩個(gè)揚(yáng)聲器驅(qū)動(dòng)器單元的代表性頻率響應(yīng)表示在圖6中。注意,如由在低端處的響應(yīng)曲線的滾降所指示的那樣,與Lp有關(guān)的Wtl和第二拐點(diǎn)響應(yīng)丟失,因?yàn)轵?qū)動(dòng)器在非常大的殼體中操作。除此之外,其它的參數(shù)相關(guān)特征是顯而易見(jiàn)的,并且可由這些曲線算出調(diào)節(jié)。如下參數(shù)允許揚(yáng)聲器的復(fù)雜頻率、相位、及時(shí)間響應(yīng)的產(chǎn)生、模擬或與其共軛。這些可調(diào)節(jié)參數(shù)22和其操作能近似零相位響應(yīng),擴(kuò)展低音輸出,及從揚(yáng)聲器除去機(jī)械聲音(能以類似方式使用其他參數(shù))。能夠數(shù)字地或使用有源或無(wú)源模擬電路,如RC電路、模擬諧振器、或象狀態(tài)變量濾波器或雙二次濾波器之類的全參數(shù)電路,來(lái)執(zhí)行個(gè)別補(bǔ)償。在8與32參數(shù)調(diào)節(jié)之間的某處可以用來(lái)編程補(bǔ)償系統(tǒng)和操作一個(gè)適當(dāng)?shù)难a(bǔ)償過(guò)程。由于參數(shù)與專用物理和行為方面有關(guān),所以對(duì)于調(diào)節(jié)范圍和精度的數(shù)據(jù)要求遠(yuǎn)小于覆蓋人類感覺(jué)所需要的。八位分辨率對(duì)于這些中的多數(shù)是適當(dāng)?shù)模瑥亩粋€(gè)l_5k位的單次數(shù)據(jù)流特征化來(lái)自模型的一個(gè)非常復(fù)雜的響應(yīng)。以上參數(shù)的描述如下。低交叉(Lx)或聲學(xué)耦合-低頻輸出取決于輻射表面的尺寸。來(lái)自這種關(guān)系的每倍頻程6dB損耗由增大的錐盆運(yùn)動(dòng)固有地補(bǔ)償,條件是來(lái)自電機(jī)結(jié)構(gòu)的反電壓與驅(qū)動(dòng)信號(hào)相比較小。如果聲順是無(wú)限的并且電機(jī)產(chǎn)生力而沒(méi)有速度限制,則這種理想化的配置具有平坦響應(yīng)。具有空氣體積、機(jī)械剛度、及速度極限的真實(shí)系統(tǒng)具有兩個(gè)實(shí)際交叉點(diǎn),其中響應(yīng)停止平坦,收斂到6dB/倍頻程,然后到12dB/倍頻程低音損耗。通常,第二拐點(diǎn)靠近揚(yáng)聲器的最低有用響應(yīng),并且常常變得無(wú)法實(shí)行補(bǔ)償。用于這種補(bǔ)償?shù)目刂茀?shù)是單位為Hz的頻率,并且共軛響應(yīng)(特定補(bǔ)償)對(duì)于減小頻率是+6dB/倍頻程提升。這種提升在來(lái)自揚(yáng)聲器的第一響應(yīng)拐點(diǎn)處開始。用于該參數(shù)的值能通過(guò)向揚(yáng)聲器施加一個(gè)測(cè)試信號(hào),例如正弦波,并測(cè)量響應(yīng)而測(cè)量。根據(jù)揚(yáng)聲器的物理特性,如錐盆和線圈質(zhì)量,也可以計(jì)算該值。由揚(yáng)聲器模型,如一般由揚(yáng)聲器制造商提供的標(biāo)準(zhǔn)Theil/Small模型,也可以導(dǎo)出該值。高交叉(Hs)或質(zhì)量聲順因數(shù)_高頻輸出取決于輻射表面的尺寸和速度。通常,靠近截止的頻率的感興趣波長(zhǎng)與產(chǎn)生輸出的揚(yáng)聲器的運(yùn)動(dòng)部分相比較小。錐盆材料的剛度和阻尼屬性影響較低頻率下從整個(gè)表面的輻射的這種過(guò)渡。頻率輻射越高,越靠近音圈。運(yùn)動(dòng)質(zhì)量最終產(chǎn)生隨頻率增大運(yùn)動(dòng)的6dB/倍頻程減小。來(lái)自電機(jī)組件的漏電感把另外的聲順添加到系統(tǒng)上,以在最高實(shí)際頻率下產(chǎn)生進(jìn)行12dB/倍頻程下降的第二拐點(diǎn)。這些損耗與減小的輻射面積相結(jié)合,產(chǎn)生聲學(xué)輸出的減小。在較低頻率下,能熟練地平衡兩種關(guān)系以產(chǎn)生平坦聲學(xué)響應(yīng)。用于這種補(bǔ)償?shù)目刂茀?shù)是單位為Hz的頻率,并且共軛響應(yīng)是隨著頻率增大6dB/倍頻程提升。以與對(duì)于低交叉在以上描述的相類似的方式能測(cè)量或計(jì)算用于該參數(shù)的值。低提升斜限(LowBoostShelf)(Ls)-來(lái)自Ls的最大提升限制到來(lái)自放大器功率、錐盆運(yùn)動(dòng)、音圈長(zhǎng)度、殼體尺寸、及打算的低音擴(kuò)展的實(shí)際最大極限。這些要求矛盾和相互作用,例如較長(zhǎng)的音圈要求較大的放大器和懸掛部分。例如,一個(gè)延長(zhǎng)的線圈能提供較大的線性漂移和低音輸出潛力,但效率減小,除非增大來(lái)自磁鐵的磁通能量。增大漂移要求較大的周圍場(chǎng),并且必須增大錐盆直徑以保持相同的輻射面積和低音輸出。低音諧振越低,而揚(yáng)聲器必須物理上越大,并且增大的運(yùn)動(dòng)質(zhì)量進(jìn)一步減小效率。如果限制放大器功率,則殼體變得較大。LpWtl(下面描述)和Ls參數(shù)的操縱在少得多的折衷下產(chǎn)生了有效或擴(kuò)展響應(yīng)揚(yáng)聲器設(shè)計(jì)。另外,能使LsS數(shù)改變或跟蹤不同的音量控制設(shè)置和程序動(dòng)態(tài),從而揚(yáng)聲器系統(tǒng)能靠近其最大能力在寬范圍條件下操作。Ls參數(shù)受設(shè)計(jì)和構(gòu)造因素的影響,這些因素包括輻射面積、聲順、及驅(qū)動(dòng)電機(jī)的力因數(shù)。被建模的參數(shù)能以非常小的相互作用跟蹤這些因素的變化。Ls參數(shù)是+/-dB。Ls參數(shù)設(shè)置能經(jīng)測(cè)試測(cè)量通過(guò)具有折衷權(quán)衡的實(shí)驗(yàn)確定。高提升斜限(HighBoostShelf)(Hs)-揚(yáng)聲器的實(shí)際最大性能和功率處理能力限制最大高頻率提升。在某些應(yīng)用中,可以把仏參數(shù)設(shè)置成減小來(lái)自程序源而不是揚(yáng)聲器的感覺(jué)失真。關(guān)于Ls,通過(guò)命令能使內(nèi)部操作設(shè)置變化。當(dāng)系統(tǒng)的其它部分,包括程序材料,被迫在其最大線性功率能力以上操作時(shí),這種特征能幫助掩蓋增大的失真。Hs參數(shù)是+/-dB。其設(shè)置最好經(jīng)測(cè)試測(cè)量來(lái)實(shí)驗(yàn)地確定。低波峰(WJ-諧振低音截止常常是優(yōu)選的。為此平衡記錄,并且把大多數(shù)揚(yáng)聲器設(shè)計(jì)成具有自諧振低音增強(qiáng)。一般,較大揚(yáng)聲器具有較低諧振頻率,并且聽眾把值聯(lián)系到這種關(guān)系上。W^參數(shù)提供在揚(yáng)聲器本身的自然自諧振(Wtl)以下的低頻諧振提升。當(dāng)?shù)蛷难a(bǔ)償響應(yīng)下降除去Wtl效應(yīng)時(shí),揚(yáng)聲器系統(tǒng)就好象它較大那樣地電氣和聲學(xué)地動(dòng)作。它不會(huì)具有均衡的小揚(yáng)聲器的隆隆或箱音(boxsound)。為了防止過(guò)分失真和功率抽取,在I以下的信號(hào)迅速衰減,并且涉及的高通濾波器跟蹤\參數(shù)設(shè)置。這種作用具有與加權(quán)補(bǔ)償類似的主觀因數(shù),因?yàn)樵诮刂诡l率以下的頻率可能弱小,但當(dāng)不由在人類聽覺(jué)的I臨界頻帶中的其他聲音掩蔽時(shí)仍能聽到。一般,調(diào)節(jié)和設(shè)置I波峰,以便對(duì)于最大再現(xiàn)條件控制功率和失真。對(duì)于其他條件,能關(guān)閉高通或次低音濾波器,并且移動(dòng)或改變低通濾波器的(Lp)的部分而沒(méi)有明顯的主觀結(jié)果。如描述的那樣,能動(dòng)態(tài)地調(diào)制I參數(shù)以擴(kuò)展低音或減小失真。低通濾波器的響應(yīng)的調(diào)節(jié)包括波峰頻率(WJ和單位為dB的幅度|A」。暗示了缺省Ql設(shè)置。高波峰(Wh)-諧振截止可能是優(yōu)選的,以補(bǔ)償?shù)诙刂构拯c(diǎn),或者它能用來(lái)限制再現(xiàn)帶寬。第一應(yīng)用能擴(kuò)展響應(yīng)和減小群延遲失真??赡苄枰獛捪拗埔允故д娴某绦蚵犉饋?lái)較好。波峰諧振器和跟蹤高通濾波器(Hp)以與低頻波峰系統(tǒng)相類似的方式操作。高通濾波器能被對(duì)準(zhǔn),以產(chǎn)生加權(quán)響應(yīng)限制和提供當(dāng)代設(shè)計(jì)實(shí)踐中優(yōu)選的波峰截止響應(yīng)。高通濾波器調(diào)節(jié)包括單位為Hz的波峰頻率(Wh)和單位為dB的幅度(|Ah|)。暗示了缺省Qh設(shè)置。電機(jī)(BJ-磁鐵結(jié)構(gòu)和音圈的屬性被統(tǒng)一成傳統(tǒng)表示。音圈直徑、繞組長(zhǎng)度、間隙磁通、磁極尺寸等是產(chǎn)生電機(jī)和發(fā)電機(jī)等同物的傳統(tǒng)揚(yáng)聲器模型的部分。與電流和機(jī)械運(yùn)動(dòng)的力和反EMF關(guān)系以及其他與機(jī)械屬性有關(guān)的因素得到簡(jiǎn)化表示。有時(shí)包括漏電感和機(jī)械質(zhì)量關(guān)系。這些元件由各種裝置測(cè)量、計(jì)算或?qū)С?,以產(chǎn)生能影響揚(yáng)聲器多個(gè)性能方面的一組電機(jī)相關(guān)參數(shù)。對(duì)于補(bǔ)償系統(tǒng)和其處理的可調(diào)節(jié)參數(shù)取決于氏。因此,如果需要,模型能使得關(guān)系被建立,從而4變化能調(diào)制參數(shù)設(shè)置。例如,B^規(guī)格能用來(lái)跟蹤或重新調(diào)節(jié)用于具有不同磁鐵重量、音圈長(zhǎng)度、或其它機(jī)電因數(shù)的類似揚(yáng)聲器的其它參數(shù)??烧{(diào)節(jié)B^參數(shù)能是磁通χ長(zhǎng)度、電壓χ速度、波峰漂移長(zhǎng)度、及電阻/電感或時(shí)間常數(shù)。低音諧振或自諧振-這是揚(yáng)聲器的自然低音諧振頻率。其值由空氣體積、機(jī)械聲順、輻射面積、阻尼、運(yùn)動(dòng)質(zhì)量、電機(jī)特性、及揚(yáng)聲器的其他設(shè)計(jì)特征確定。不象傳統(tǒng)低音模型,聲學(xué)耦合因數(shù)不是Wtl響應(yīng)的一部分,因?yàn)樗驯凰阍谘a(bǔ)償系統(tǒng)的Lx參數(shù)中了。這種布置防止在調(diào)節(jié)參數(shù)之間的相互作用,并且對(duì)于機(jī)械行為的等效轉(zhuǎn)換到機(jī)械行為的LCR諧振器等效。頻率Wc^Qtl和耦合能量或幅度IAcJ的用戶命令語(yǔ)言能規(guī)定對(duì)于機(jī)械諧振行為的共軛響應(yīng)。因?yàn)橛糜谙到y(tǒng)的揚(yáng)聲器行為和校正響應(yīng)具有相同的量極、但相反的幅度,所以群延遲行為能非常良好。調(diào)節(jié)是單位為Hz的Wtl,作為一個(gè)數(shù)的Qtl,及單位為dB的IAtl|。這些調(diào)節(jié)值能由非常近范圍設(shè)備、位置檢測(cè)換能器來(lái)以實(shí)驗(yàn)方式確定或由計(jì)算確定。端口調(diào)諧(Wb)-許多揚(yáng)聲器設(shè)計(jì)成提供一種打算擴(kuò)展頻率響應(yīng)或改進(jìn)功率處理的第二低音諧振。完成這一點(diǎn)的物理結(jié)構(gòu)包括端口、管、無(wú)源諧振器、曲徑、其它低音喇叭等。許多文獻(xiàn)已經(jīng)致力于對(duì)這些系統(tǒng)進(jìn)行建模和調(diào)諧,通常是為了實(shí)現(xiàn)最平坦的可能頻率響應(yīng)。這樣的模型與補(bǔ)償系統(tǒng)相結(jié)合,有潛力擴(kuò)展低音、改進(jìn)暫態(tài)響應(yīng)、及改進(jìn)效率而不增加揚(yáng)聲器的成本。能從結(jié)構(gòu)上設(shè)計(jì)較大功率處理和擴(kuò)展低音能力,并且通過(guò)共軛校正能除去由使用這種策略生成的頻率響應(yīng)不規(guī)則性和端帶失真折衷。當(dāng)進(jìn)行這種選擇時(shí),端口能較大并被調(diào)諧得較低、殼體能較小、以及改進(jìn)低音的其他變化。粗響應(yīng)和次低音過(guò)載的生成結(jié)果由補(bǔ)償系統(tǒng)顛倒。標(biāo)志或開關(guān)能是控制操作的一部分,這種控制操作識(shí)別程序條件或在揚(yáng)聲器處的響應(yīng)狀態(tài)。來(lái)自樣本或測(cè)試的極限狀態(tài)確定用于該前饋/反饋型系統(tǒng)的開關(guān)狀態(tài)。然后,從開關(guān)或狀態(tài)輸入中選擇參數(shù)系數(shù)。以這種方式,補(bǔ)償系統(tǒng)能借助于模糊邏輯控制或其它方法操作,以防止對(duì)于參數(shù)值的不必要觸發(fā)(toggling)或變化。例如,不同的音量控制設(shè)置、程序水平、或低音內(nèi)容能改變參數(shù)系數(shù)和對(duì)準(zhǔn),以實(shí)現(xiàn)較高功率或較平坦響應(yīng)優(yōu)化。開關(guān)操作可能是可聽的,但控制磁滯提供較不明顯或令人討厭的策略變化。便宜設(shè)備是所打算的,并且可能過(guò)載或被迫超越合理線性操作。以適當(dāng)控制邏輯操作的補(bǔ)償系統(tǒng)能激活柔和及響亮的操作狀態(tài),每種狀態(tài)具有最優(yōu)對(duì)準(zhǔn),而不產(chǎn)生其之間的失真連續(xù)。機(jī)械諧振(WpW2、至Wn)-揚(yáng)聲器系統(tǒng)的許多部分和動(dòng)作象諧振器那樣舉動(dòng)。與Wtl那樣,這些的大多數(shù)是無(wú)意的,并且他們通常添加到揚(yáng)聲器的聲學(xué)輸出上。這些除其他外還包括圓頂、錐盆、及周圍場(chǎng)的彎曲和質(zhì)量行為、以及機(jī)箱共振。等效LCR行為被參數(shù)化成無(wú)相互作用的個(gè)別校正或與用于Wtl的那些相類似的調(diào)節(jié)。諧振調(diào)節(jié)是單位為Hz的WpW2、至Wn;單位為IWQ1A2、至Qn(下面描述);及單位為+/-dB的Ia1Ua2I至|An|(下面描述)。顯得類似于房間響應(yīng)的小、低Q諧振常常具有聲沖擊。與用于傳統(tǒng)響應(yīng)校平的測(cè)試麥克風(fēng)不同,聽眾能四處運(yùn)動(dòng),并且能及時(shí)地感測(cè)和知道崩潰成寬帶諧振的信號(hào)衰減。共軛校正消除該困難,并且有助于改進(jìn)來(lái)自輔助均衡系統(tǒng)的結(jié)果。穩(wěn)態(tài)諧振⑶皿^⑽至^-使用多諧振器陷波器和加權(quán)側(cè)能量增強(qiáng)的隱藏補(bǔ)償過(guò)程按頻率放置,并且由這些控制參數(shù)調(diào)節(jié)。減小或除去來(lái)自延遲節(jié)點(diǎn)諧振和駐波干擾的聲結(jié)果。耦合和損耗因數(shù)(IAL、仏^至|A|n&Qi、Q2、至Qn)-某些頻率的Q參數(shù)能被估計(jì)為缺省值,這些缺省值對(duì)于揚(yáng)聲器公共的材料、設(shè)計(jì)、及構(gòu)造材料起作用。由于幾乎不可能由響應(yīng)線圖或簡(jiǎn)單測(cè)量臨時(shí)確定Q,所以固定值是實(shí)際的,并且缺省值選擇簡(jiǎn)化和減小調(diào)節(jié)的數(shù)量。波干擾(Td)-揚(yáng)聲器殼體的有限尺寸能產(chǎn)生在輻射表面后的波相關(guān)干擾壓力。通常因?yàn)樾U憫?yīng)的復(fù)雜性忽略該問(wèn)題。昂貴揚(yáng)聲器用具有緊密磁耦合的大電機(jī)組件構(gòu)造,以戰(zhàn)勝回波干擾。這些系統(tǒng)常常具有內(nèi)隔板、不同類型吸收材料制成的層、專門成形的后腔、或傳輸線管,以便有助于除去干擾。典型揚(yáng)聲器呈現(xiàn)來(lái)自其簡(jiǎn)單箱型殼體的建設(shè)性/破壞性波干擾,這些殼體最終引起隨頻率增大而出現(xiàn)增多的響應(yīng)波紋。由于短路線圈效應(yīng)和來(lái)自&的阻尼被較小磁鐵、還原鋼和其它經(jīng)濟(jì)因素所減小,因此不規(guī)則性惡化。校正由來(lái)自一個(gè)延遲反饋環(huán)過(guò)程的共軛相反響應(yīng)進(jìn)行。盡管模擬實(shí)現(xiàn)是可能的,但DSP方法更經(jīng)濟(jì),并且根據(jù)其性質(zhì),對(duì)于物理行為和要解決的問(wèn)題產(chǎn)生良好等效。類似校正能減小來(lái)自地板、臺(tái)面、墻壁等的反射干擾。傾斜(dB)-大多數(shù)同輩聽眾喜愛(ài)響應(yīng)隨增大頻率稍微降低的揚(yáng)聲器。當(dāng)使揚(yáng)聲器便宜時(shí),其響應(yīng)往往升高。補(bǔ)償系統(tǒng)校正由于減小磁鐵重量、改進(jìn)效率及擴(kuò)展高頻響應(yīng)而發(fā)生的許多問(wèn)題和變化。然而,由這些共軛校正產(chǎn)生的平坦聲學(xué)平衡與當(dāng)代音調(diào)標(biāo)準(zhǔn)相比可能聽起來(lái)渾濁或薄弱。傾斜產(chǎn)生一個(gè)補(bǔ)償響應(yīng)斜率。傾斜參數(shù)象音調(diào)控制那樣操作,并且用來(lái)實(shí)現(xiàn)希望的低音_高音平衡。Lx和Hx的內(nèi)部操縱、以及傳統(tǒng)響應(yīng)校平方法或過(guò)程能產(chǎn)生該響應(yīng)。延遲或全通_該參數(shù)及時(shí)除去信號(hào)以補(bǔ)償從不同地方輻射高和低頻率的換能器。調(diào)節(jié)能減小群延遲失真,改進(jìn)與次低音喇叭的相位匹配,及對(duì)準(zhǔn)過(guò)渡響應(yīng)。使用物理或電氣測(cè)量能進(jìn)行調(diào)節(jié)。圖8a至8f表示控制面板顯示和用來(lái)調(diào)節(jié)參數(shù)的菜單。測(cè)量數(shù)據(jù)、設(shè)計(jì)表達(dá)、及響應(yīng)曲線向揚(yáng)聲器提供有用的信息調(diào)節(jié)或調(diào)諧系統(tǒng)。系統(tǒng)產(chǎn)生對(duì)于揚(yáng)聲器的那些的共軛響應(yīng),并且靜靜地除去延遲或長(zhǎng)穩(wěn)態(tài)機(jī)械聲音。對(duì)于許多收聽位置,經(jīng)驗(yàn)已經(jīng)表明與更復(fù)雜常規(guī)校平做法相比較好性能。對(duì)于這些功能的實(shí)現(xiàn)能利用普通數(shù)字過(guò)程。典型已知數(shù)字過(guò)程在附錄A中表示??蛇x擇的已知數(shù)字實(shí)現(xiàn)能用來(lái)實(shí)現(xiàn)完全類似的結(jié)果。使用模擬電路也可以實(shí)現(xiàn)補(bǔ)償系統(tǒng)。然而,多諧振器或耦合功能的部分不可能跟蹤寬調(diào)節(jié)范圍,除非他們是復(fù)雜的。所以由于其功能性和與熟知的更好DSP等同物的相似性而示出了模擬電路。這些電路具有可調(diào)節(jié)參數(shù)控制,但他們要求組件變化以模擬數(shù)字系統(tǒng)固有的參數(shù)對(duì)準(zhǔn)精度。如下例子是具半?yún)?shù)調(diào)節(jié)能力和產(chǎn)生象描述的那些那樣的共軛響應(yīng)的傳統(tǒng)電路。截止濾波器-Sallen和Key電路能形成具有可調(diào)節(jié)波峰響應(yīng)的有源高通和低通濾波器。圖9表示配置成一個(gè)單opamp的兩個(gè)濾波器。中帶響應(yīng)是平坦的,并且截止斜率是+和-ISdB每倍頻程。Lp和Hp的波峰幅度是可調(diào)節(jié)的,并且與圖4b相對(duì)應(yīng)。然而,對(duì)于該電路必須預(yù)置頻率。對(duì)于該例子,兩部分因?yàn)槠鋵掝l率分離而不相互作用。恒定斜率均衡器-在有源反饋電路中改變RC時(shí)間常數(shù)以產(chǎn)生象圖4a那樣的響應(yīng)曲線。表示在圖10中的電路是成熟參數(shù)音調(diào)控制的提升半。為了在斜限與交叉之間的良好參數(shù)獨(dú)立,限制其調(diào)節(jié)范圍。參數(shù)陷波器-圖11和12表示具有寬調(diào)諧范圍的簡(jiǎn)單模擬陷波器電路。陷波深度保持恒定,但Q隨頻率設(shè)置增大。能選擇組件值以對(duì)于實(shí)際調(diào)節(jié)范圍提供對(duì)Qo、Q1至Qn的合理近似。加權(quán)補(bǔ)償陷波器-一個(gè)合成濾波器元件由一個(gè)或多個(gè)尖銳陷波器組成,每個(gè)陷波器使能量被添加到抑制頻率(rejectfrequency)的一側(cè)或兩側(cè)。當(dāng)謹(jǐn)慎選擇其抑制和提升能量和帶寬時(shí),濾波器系統(tǒng)能去除不希望的能量,并且對(duì)聲平衡的折衷或改變很小。用于此目的的抑制陷波器是尖銳的,具有高衰減并且一般是高Q的。邊帶補(bǔ)償或恢復(fù)最好由在抑制兩側(cè)處的提升響應(yīng)進(jìn)行。然而,對(duì)于具有組合響應(yīng)滾降和干擾能量問(wèn)題的揚(yáng)聲器,單側(cè)補(bǔ)償起的作用可能更好。不對(duì)稱提升有助于平化頻率響應(yīng)。其它方面是相同的。補(bǔ)償能非常小,具有低Q,并且當(dāng)過(guò)程在或不在工作中時(shí),以校正為中心的半個(gè)到一個(gè)倍頻程頻帶中的平均粉紅噪聲能量是恒定的。來(lái)自聲音的衰減從感覺(jué)上來(lái)說(shuō)能移動(dòng)到低Q邊帶頻率。因此,對(duì)于單側(cè)或單調(diào)諧提升方法,用于較好的立即過(guò)渡響應(yīng)穩(wěn)定的雙調(diào)諧對(duì)準(zhǔn)是優(yōu)選的。能謹(jǐn)慎調(diào)諧和縮放產(chǎn)生的合成濾波器,以便能在有用頻率范圍上靜靜地對(duì)其進(jìn)行調(diào)諧。在沒(méi)有加權(quán)的情況下,在校正任一側(cè)的小響應(yīng)損耗影響鼻音。染色可能是微妙的,但當(dāng)使用較多校正時(shí),損耗可能勝過(guò)任何優(yōu)點(diǎn)。如果像標(biāo)準(zhǔn)做法的均衡那樣僅使響應(yīng)平坦,則尤其確實(shí)會(huì)發(fā)生這種情況。加權(quán)消除折衰,并且允許多重校正更有效而且沒(méi)有聲相互作用,并且當(dāng)無(wú)意校被施加到具有不同行為屬性的揚(yáng)聲器時(shí),加權(quán)還能消除損耗。對(duì)于任一種實(shí)現(xiàn),中性加權(quán)響應(yīng)陷波器能由添加到信號(hào)上的諧振和反諧振響應(yīng)組成。參照?qǐng)D13,校正元件可能包括單高Q陷波器,其頻率集中在行為模式上。一個(gè)低Q提升響應(yīng)被放置在相同頻率處以提供補(bǔ)償?shù)葯?quán)重能量。圖13的電路部分表示在反饋路徑中有源電路陷波器和無(wú)源LRC提升諧振器的實(shí)際結(jié)合。兩部分都產(chǎn)生加權(quán)響應(yīng)陷波器。然而,調(diào)諧范圍是有限的,并且低Q提升可能是可聽的,因?yàn)槿祟惵犛X(jué)能分辨衰減到低Q諧振的暫態(tài)聲音。一個(gè)更好的選擇例是使用兩個(gè)低Q諧振提升響應(yīng),每個(gè)被調(diào)諧并且放置在高Q陷波器的一側(cè)或兩側(cè)處。圖14表示由四個(gè)可調(diào)諧雙二次(bi-quad)諧振器或狀態(tài)可變?yōu)V波器組成的例子。濾波器的兩個(gè)產(chǎn)生封閉隔開的高Q陷波器,而其它兩個(gè)提供在外部高側(cè)和低側(cè)處的被提升的低Q能量。這些狀態(tài)可變?yōu)V波器容易用DSP處理器產(chǎn)生,并且它們?cè)趯捳{(diào)諧范圍上保持恒定的Q和陷波深度。產(chǎn)生圖15中表示的響應(yīng)的模擬系統(tǒng)具有在單軸上聯(lián)動(dòng)的八個(gè)精度可變電阻器,以調(diào)諧Wra或加權(quán)陷波參數(shù)。圖13表示用于四部分之一的一個(gè)電路。圖15表示用于兩個(gè)不同Q設(shè)置的響應(yīng)曲線,并且這些與圖4d中的那些相關(guān)。能對(duì)準(zhǔn)雙調(diào)諧提升以對(duì)于暫態(tài)產(chǎn)生較快和較小的穩(wěn)態(tài)響應(yīng)。象來(lái)自附圖的那樣的雙調(diào)諧陷波器提供類似的優(yōu)點(diǎn),并且也提供死帶或帶抑制能力,以適應(yīng)不同揚(yáng)聲器之間的制造容限。仍然需要邊頻提升,并且最好使用雙調(diào)諧諧振器。當(dāng)相鄰行為模式具有類似屬性時(shí)能進(jìn)行其它變化和簡(jiǎn)化,就象對(duì)于大多數(shù)揚(yáng)聲器可能的那樣。兩個(gè)或多個(gè)抑制陷波器能分享Q和幅度設(shè)置以及補(bǔ)償提升。組合包括具有三次提升的兩個(gè)陷波器、具有兩次非對(duì)稱提升的兩個(gè)陷波器、具有兩次的三個(gè)陷波器等。能使用具有兩個(gè)陷波器之間的中間頻率的單低Q提升。具有以下、以下以及之間的頻率的三次低Q提升是一種較好的變化。對(duì)于所有這些實(shí)現(xiàn),陷波深度常常較大,并且邊頻提升通常較小。通常,使對(duì)于關(guān)于補(bǔ)償區(qū)域平均的隨機(jī)噪聲的整體能量響應(yīng)相同或稍高于沒(méi)有校正的情況。延遲干擾或全通_一個(gè)混合模數(shù)CCD設(shè)備能產(chǎn)生較小、便利的可調(diào)諧延遲。盡管性能可能較差,但它們能象圖16中的例子那樣連接或配置,以提供干擾狀行為。該電路能產(chǎn)生對(duì)于來(lái)自墻壁、桌子及揚(yáng)聲器殼體內(nèi)部或者傳輸路徑或系統(tǒng)的其它部分的與波長(zhǎng)有關(guān)的反射和傳輸行為的近似共軛響應(yīng)。電路能設(shè)置成產(chǎn)生一個(gè)倒相梳狀濾波器或加性干擾狀響應(yīng),該響應(yīng)在時(shí)間、相位及幅度方面與來(lái)自反射表面的減性干擾損耗相反。校正在干擾減損處進(jìn)行提升。該電路也能調(diào)節(jié)成具有梳狀濾波器狀響應(yīng),以抵消來(lái)自揚(yáng)聲器殼體內(nèi)的反射的加性能量。由DSP過(guò)程能形成較好時(shí)間延遲干擾濾波器或梳狀濾波器狀響應(yīng)。模擬和DSP都能配置成與物理反射模型相關(guān),并且與校正系統(tǒng)的其它部分類似,由與物理行為相關(guān)的參數(shù)調(diào)節(jié)所控制。延遲干擾路徑濾波器具有關(guān)于尺寸、表面吸收、及需要的干擾校正量的控制。參照?qǐng)D16,Td與從揚(yáng)聲器到聽眾的直接路徑與也從揚(yáng)聲器到聽眾的較長(zhǎng)反彈路徑之間的差有關(guān)。Td也與揚(yáng)聲器與殼體內(nèi)的相反表面之間的出去和返回路徑有關(guān)。揚(yáng)聲器后面的壁的特征也能以相同方式描述。較大Td給出較大距離。RC與表面粗糙度或在高頻下的吸收有關(guān)。RC乘積越大,上部頻率梳狀濾波器響應(yīng)和校正的損耗越大或衰減越快??刂芌l調(diào)節(jié)響應(yīng)或校正的數(shù)值。CW方向增大減性響應(yīng),同時(shí)靠近至opamp的+輸入的CCW位置給出最大加性響應(yīng)。該電路產(chǎn)生一個(gè)其幅度隨頻率減小的干擾響應(yīng)。這匹配或模擬實(shí)際揚(yáng)聲器吸收材料的損耗。來(lái)自小揚(yáng)聲器的不規(guī)則響應(yīng)中的許多可被以實(shí)驗(yàn)方式變成某種顯得更容易由補(bǔ)償系統(tǒng)處理的東西。通常,實(shí)現(xiàn)這點(diǎn)的延遲設(shè)置匹配從揚(yáng)聲器殼體所期望的反到達(dá)波關(guān)系。當(dāng)其確實(shí)匹配時(shí),這樣一個(gè)可調(diào)節(jié)參數(shù)等于大量常規(guī)響應(yīng)校平過(guò)程。圖17是一個(gè)全通或相位移動(dòng)網(wǎng)絡(luò)。其頻率響應(yīng)是平坦的,然而其輸出在高頻下同相而在低頻下異相。電路改變暫態(tài)響應(yīng)而不改變頻率響應(yīng)??勺兛刂圃龃髸簯B(tài)頻率,因?yàn)樗晦D(zhuǎn)向CW。該元件對(duì)于校正群延遲或其它暫態(tài)相關(guān)響應(yīng)是有用的。如上所述,由揚(yáng)聲器產(chǎn)生的機(jī)械干擾常常是可聽的,但是對(duì)于利用頻率掃描和麥克風(fēng)進(jìn)行的響應(yīng)測(cè)量是不可見(jiàn)的或者難以解釋的。使用深陷波器的傳統(tǒng)補(bǔ)償方法通常導(dǎo)致鼻音或有害平衡象差。本發(fā)明的加權(quán)補(bǔ)償陷波濾波器解決該問(wèn)題,并且還產(chǎn)生一些其它優(yōu)點(diǎn)。當(dāng)兩個(gè)驅(qū)動(dòng)器(低音喇叭和高音喇叭)僅由一個(gè)電容器或由重疊頻率的電路交叉時(shí),一個(gè)或兩個(gè)驅(qū)動(dòng)器能具有干擾補(bǔ)償而沒(méi)有對(duì)于其它的感覺(jué)損耗。同樣的情形適用于不同的收聽位置。能補(bǔ)償具有壞響應(yīng)的一個(gè)位置而不折衷用于其它收聽位置的聲音。校正由加權(quán)側(cè)能量所隱藏。由于良好的收聽位置不會(huì)由校正折衷,所以寬范圍的收聽位置能具有良好聲音特性。這種特征對(duì)于用于劇場(chǎng)聲音的喇叭形揚(yáng)聲器特別有用,其中不同安裝需要稍微不同的校正。通過(guò)對(duì)于一類揚(yáng)聲器或構(gòu)造特征使用缺省優(yōu)化,參數(shù)控制和調(diào)節(jié)是簡(jiǎn)單和直觀的。揚(yáng)聲器某些最重要的行為(相對(duì)于聲學(xué)可感覺(jué)效應(yīng))不能由傳統(tǒng)方法建模或?qū)崿F(xiàn)。這樣的行為包括干擾和諧振耦合、以及來(lái)自這樣的行為的非線性結(jié)果。另外,需要考慮與運(yùn)動(dòng)部分的剛度和用于遠(yuǎn)離驅(qū)動(dòng)音圈的運(yùn)動(dòng)的高頻解耦有關(guān)的其它空間因素。任何這些因素都能產(chǎn)生源運(yùn)動(dòng)、延遲能量釋放和對(duì)于雙耳聽覺(jué)的相位誤差。通常,這樣的破壞性響應(yīng)可能對(duì)于傳統(tǒng)麥克風(fēng)和頻譜分析儀校準(zhǔn)方法是不可見(jiàn)的或者非常難以解釋。對(duì)于特定物理效應(yīng)的參數(shù)尋址補(bǔ)償?shù)囊粋€(gè)例子是對(duì)于在大全范圍揚(yáng)聲器中機(jī)械解耦的補(bǔ)償。這樣的揚(yáng)聲器通常設(shè)計(jì)成在低頻下使整個(gè)錐盆運(yùn)動(dòng)。在高頻下,只有驅(qū)動(dòng)器的內(nèi)部是主要有源輻射器。錐盆的其余部分被有意解耦以衰減其節(jié)點(diǎn)分散。這種設(shè)計(jì)選擇改變一個(gè)等效輻射源的位置。及時(shí)向前移動(dòng)高頻輻射的一種線性校正使用混通濾波器(complexpassfilter)以產(chǎn)生較低頻率的頻帶限制延遲。然后,當(dāng)頻率增大時(shí),潛伏延遲減小,由此保持對(duì)于揚(yáng)聲器的響應(yīng)順序的相位匹配。這樣能除去一些群延遲失真。來(lái)自揚(yáng)聲器的物理尺寸以及錐盆的衰減和聲速屬性能產(chǎn)生指定來(lái)自專用濾波器過(guò)程的校正的信息。然而,能以實(shí)驗(yàn)方式確定延遲效應(yīng)和解耦頻率以產(chǎn)生參數(shù)值。如果揚(yáng)聲器部分的一些改變尺寸或衰減屬性,則能外推新的值。難以或不可能使用傳統(tǒng)方法補(bǔ)償?shù)囊环N參數(shù)尋址補(bǔ)償?shù)囊粋€(gè)例子是在小揚(yáng)聲器中對(duì)Doppler調(diào)制的補(bǔ)償。計(jì)算機(jī)和多聲道聲音系統(tǒng)需要小揚(yáng)聲器播放得非常響亮??焖佟⒏呶灰棋F盆運(yùn)動(dòng)產(chǎn)生的組合能向再現(xiàn)的聲音施加加性或減性速度。揚(yáng)聲器錐盆的低頻運(yùn)動(dòng)通過(guò)移動(dòng)有效高頻輻射區(qū)域施加Doppler調(diào)制效應(yīng)。該效果十分煩人,并且產(chǎn)生努力要播放得響亮的小揚(yáng)聲器的典型聲音。當(dāng)輻射區(qū)域、頻率、及聲學(xué)功率輸出已知時(shí),能對(duì)產(chǎn)生的錐盆運(yùn)動(dòng)和Doppler輻射因數(shù)進(jìn)行合理準(zhǔn)確的計(jì)算(見(jiàn)圖5)。為了校正揚(yáng)聲器響應(yīng)產(chǎn)生一種相反交替時(shí)間延遲。這種積性或非線性過(guò)程能使等效輻射源更穩(wěn)定,從而減小非線性失真。揚(yáng)聲器的一個(gè)良好行為模型和一個(gè)單尺寸參數(shù)能指定校正。任何這樣的開環(huán)或前向非線性校正都是非常難以實(shí)現(xiàn)的。建模的時(shí)間延遲調(diào)制在它提供準(zhǔn)確的共軛響應(yīng)校正時(shí)要好得多。這里包括了例子,因?yàn)閬?lái)自低音驅(qū)動(dòng)器的錐盆運(yùn)動(dòng)由模型合理地預(yù)測(cè),并且來(lái)自DSP方法的瞬時(shí)校正將及時(shí)變得更實(shí)際。通過(guò)使用由電壓控制振蕩器時(shí)鐘操作的CMOS型模擬延遲進(jìn)行實(shí)驗(yàn)。一條路徑補(bǔ)償來(lái)自兩個(gè)“組桶式(bucketbrigade)”設(shè)備的等待時(shí)間,而另一條接收可變時(shí)鐘以產(chǎn)生延遲調(diào)制。對(duì)于節(jié)點(diǎn)彎曲、波干擾及非線性運(yùn)動(dòng)情形,通過(guò)使用加權(quán)陷波過(guò)程的行為響應(yīng)的除去或衰減是一種良好的折衷。加權(quán)補(bǔ)償能參數(shù)運(yùn)動(dòng)到需要它的地方。如果需要,則能調(diào)制其嚴(yán)重性,以最好地匹配程序動(dòng)態(tài)特性、來(lái)自揚(yáng)聲器的失真、及人類臨界頻帶聽覺(jué)。當(dāng)聲頻信號(hào)的動(dòng)態(tài)特性被探測(cè)和用來(lái)改變參數(shù)或隱藏補(bǔ)償時(shí),額外低音輸出能力和響應(yīng)擴(kuò)展可能較差。這種技術(shù)能為由改進(jìn)方法操作的任何揚(yáng)聲器系統(tǒng)工作。然而,如果把揚(yáng)聲器的部分設(shè)計(jì)成要求動(dòng)態(tài)補(bǔ)償,則額外的性能特征是可能的。打算用于特定系統(tǒng)的調(diào)節(jié)列表或位圖能具有與通用系統(tǒng)相同的參數(shù)和調(diào)節(jié),即控制具有共同的特征。因而帶有補(bǔ)償系統(tǒng)的電子系統(tǒng)能夠接收指令,以補(bǔ)償和優(yōu)化能附加到其上的多種揚(yáng)聲器模型和產(chǎn)品,所述多種揚(yáng)聲器模型和產(chǎn)品既包括通用揚(yáng)聲器,以包括專為與補(bǔ)償系統(tǒng)一道使用而設(shè)計(jì)的那些。當(dāng)需要時(shí),系統(tǒng)能改進(jìn)清晰度、成像、及低音擴(kuò)展而不改變聲平衡,即保持生產(chǎn)線的聲印記。參數(shù)產(chǎn)生的調(diào)節(jié)效應(yīng)由包括在上述表格中的符號(hào)或縮寫詞描述或表示。以這種方式,數(shù)學(xué)命題、電路、揚(yáng)聲器設(shè)計(jì)特征和其它特定語(yǔ)言統(tǒng)一到程序員或用戶能直觀解釋的列表。然后,響應(yīng)曲線、行為特征、波長(zhǎng)關(guān)系、以及對(duì)于人類感覺(jué)重要的其它東西,變得與用于揚(yáng)聲器系統(tǒng)的設(shè)計(jì)和/或補(bǔ)償?shù)倪^(guò)程模型有關(guān)。簡(jiǎn)化補(bǔ)償,因?yàn)樵谠O(shè)計(jì)和性能變化與基本關(guān)系之間的相互作用是有意義的和直觀的。穩(wěn)態(tài)和節(jié)點(diǎn)補(bǔ)償參數(shù)調(diào)節(jié)包括單位為Hz的頻率、作為一個(gè)數(shù)字的Q、及單位為dB的抑制。由于多階節(jié)點(diǎn)行為是可能的,所以Q和抑制調(diào)節(jié)更可能對(duì)于多于一個(gè)的補(bǔ)償頻率具有類似值。能鏈接控制,從而單位為Hz的兩個(gè)或多個(gè)頻率能指定對(duì)于共同共享機(jī)械或干擾屬性的節(jié)點(diǎn)行為的校正。用于揚(yáng)聲器錐盆的鐘形模式補(bǔ)償提供一個(gè)良好例子。幾種方法能確定這些頻率。使用正弦波激勵(lì)和光學(xué)干涉測(cè)量法能觀察多節(jié)點(diǎn)或波相關(guān)干擾。能解釋來(lái)自圖7中所示的MLSSA型刺激、或差分麥克風(fēng)探針的瀑布圖,以揭示來(lái)自分散的穩(wěn)態(tài)能量。這些行為是可聽的,并且能在頻率上人工或緩慢地掃描隱藏補(bǔ)償過(guò)程,以揭示在粉紅色噪聲再現(xiàn)期間的聲變化。實(shí)驗(yàn)方法需要小心和經(jīng)驗(yàn),因?yàn)槭覂?nèi)混響能模擬機(jī)械聲音。三種技術(shù)之間的相關(guān)是良好的,并且當(dāng)確定來(lái)自類似原因的幾個(gè)頻率時(shí),類似Q和共享提升參數(shù)的合成加權(quán)陷波器簡(jiǎn)化校正。以上參數(shù)和其調(diào)節(jié)改變用于揚(yáng)聲器的特定行為的配置補(bǔ)償。一些過(guò)程固有地限制到一個(gè)窄頻率范圍,其中特定種類的行為最可能從揚(yáng)聲器系統(tǒng)發(fā)生。影響時(shí)間和響應(yīng)斜率的其它過(guò)程覆蓋一個(gè)寬頻譜。這些專用操作彼此足夠隔離,從而在他們之間的相互作用較小。能改變選中的參數(shù)而不影響其它參數(shù)。另外,數(shù)據(jù)要求對(duì)于有用的調(diào)節(jié)分辨率是適度的。如在以上揚(yáng)聲器例子中描述的那樣,調(diào)節(jié)補(bǔ)償系統(tǒng)的控制與揚(yáng)聲器的物理部分和聲學(xué)屬性有關(guān)。以相同方式能改進(jìn)具有類似、但不是完全一樣的設(shè)計(jì)或構(gòu)造的其它揚(yáng)聲器。完成這一點(diǎn)的控制或規(guī)格信息具有相同的簡(jiǎn)單、直觀的語(yǔ)言。一個(gè)較小且便宜的揚(yáng)聲器能借助于16個(gè)參數(shù)調(diào)節(jié)和幾個(gè)缺省設(shè)置來(lái)顯著改進(jìn)。為了匹配來(lái)自該系統(tǒng)的復(fù)雜響應(yīng),傳統(tǒng)多頻帶或圖形均衡器需要遠(yuǎn)超過(guò)100頻帶、和多得多的控制信息。補(bǔ)償系統(tǒng)使用斜率、交叉、和其它數(shù)學(xué)函數(shù)產(chǎn)生對(duì)于揚(yáng)聲器特性的預(yù)計(jì)校正。這些操作由系數(shù)或點(diǎn)以及由過(guò)程命令控制,而不是通過(guò)對(duì)于線性線圖的證明和計(jì)算響應(yīng)。由于每個(gè)過(guò)程具有一個(gè)特定性質(zhì),所以頻率范圍、幅度、Q等把參數(shù)范圍限制到一個(gè)控制空間的較小部分。一個(gè)三字代碼能產(chǎn)生一個(gè)精確放置的諧振器或復(fù)雜加權(quán)的響應(yīng)陷波器子系統(tǒng)。在8位代碼字的情況下,該圖或信息序列給出用于對(duì)數(shù)十倍頻的128個(gè)點(diǎn),用于幅度的以l/2dB為步長(zhǎng)的+/-20dB,及16個(gè)Q設(shè)置、以及用于過(guò)程命令和控制格式化的空間。對(duì)于該例子,在聲頻帶中的384個(gè)點(diǎn)或頻率可用于設(shè)置尖銳抑制陷波器和加權(quán)補(bǔ)償。用于其它參數(shù)控制和過(guò)程命令的位圖可能要求較小分辨率,因而提供甚至更大的經(jīng)濟(jì)性。這種緊湊規(guī)格特征能用于校正特定揚(yáng)聲器設(shè)計(jì)的補(bǔ)償系統(tǒng)的條碼安裝,或用于來(lái)自在諸如用在HDCD系統(tǒng)中之類的數(shù)據(jù)流中隱藏的代碼的過(guò)程的動(dòng)態(tài)控制。如下面詳細(xì)描述的那樣,當(dāng)減小處理的信息的范圍時(shí),諸如助聽器和通信系統(tǒng)之類的可攜帶設(shè)備受益。對(duì)于多種用途,對(duì)于包括十個(gè)基本操作,即斜限、陷波器、補(bǔ)償、截止濾波器、延遲等的成功過(guò)程可以選擇在聲頻帶中的384個(gè)點(diǎn)或頻率。過(guò)程規(guī)模隨分辨率非常迅速地增大抑制陷波器可能是尖銳的并且需要準(zhǔn)確調(diào)諧,干擾補(bǔ)償固有地復(fù)雜,及來(lái)自傳統(tǒng)測(cè)量實(shí)現(xiàn)的揚(yáng)聲器響應(yīng)對(duì)簡(jiǎn)化處理只揭示很少的有用信息。如果不把補(bǔ)償系統(tǒng)設(shè)計(jì)成識(shí)別和處理來(lái)自曲線的子系統(tǒng)或建模的響應(yīng),就必須在逐點(diǎn)基礎(chǔ)上進(jìn)行校正。即使以這種方式完成的良好的響應(yīng)校正也要求相當(dāng)大的過(guò)程功率。當(dāng)考慮時(shí)間、相位及穩(wěn)定問(wèn)題時(shí),常規(guī)處理的范圍加寬。對(duì)于這種情形,分辨在三維柵格(如瀑布圖)中的任何地方的有用校正響應(yīng)需要的濾波器或過(guò)程的數(shù)量可能是不實(shí)際的。當(dāng)把濾波器或處理功率分配到要求較高分辨率和較多校正活動(dòng)的那部分柵格時(shí),一些經(jīng)濟(jì)性是可能的。即使這些努力也沒(méi)能實(shí)現(xiàn)補(bǔ)償系統(tǒng)的隱藏或補(bǔ)償?shù)男U嫣?。這種困難的一個(gè)良好例子從圖6中顯而易見(jiàn)。補(bǔ)償系統(tǒng)具有8個(gè)陷波器、用于節(jié)點(diǎn)校正的一個(gè)加權(quán)陷波器、及低頻提升交叉和斜限。高頻降低把交叉提供給高音喇叭。顯然,畫出點(diǎn)以及產(chǎn)生響應(yīng)合成的困難是顯而易見(jiàn)的。補(bǔ)償系統(tǒng)由24次調(diào)節(jié)(Lx、Ls、LP、WpQ。、IAlpW1至^、IAl1至IAl7、Wra、及一個(gè)缺省q設(shè)置)產(chǎn)生這種共軛曲線。與補(bǔ)償帶中信號(hào)去除類似的策略能用于最高和最低頻率。例如,通過(guò)減小到揚(yáng)聲器的輸入,由來(lái)自低音能量的過(guò)度錐盆運(yùn)動(dòng)引起的失真可能就不那么令人討厭了。實(shí)現(xiàn)這點(diǎn)的一種方法是把低頻響應(yīng)限制到一個(gè)實(shí)際值。十分可能的是,揚(yáng)聲器已經(jīng)能夠進(jìn)行在截止以下的弱低音再現(xiàn),條件是程序材料不會(huì)掩蔽較低的低音信號(hào)。寬動(dòng)態(tài)范圍程序材料能強(qiáng)迫揚(yáng)聲器在這些頻率下產(chǎn)生可感覺(jué)輸出。不幸的是,所產(chǎn)生的弱輸出常被人聽覺(jué)的相同感覺(jué)頻帶中的其它聲音覆蓋。所以,多半時(shí)間來(lái)自揚(yáng)聲器的擴(kuò)展響應(yīng)是無(wú)用的,并且僅添加失真和消耗放大器功率。補(bǔ)償系統(tǒng)的加權(quán)響應(yīng)校正能應(yīng)用于低或高頻寬帶或者截止抑制或?yàn)V波器的可聽側(cè)。如果謹(jǐn)慎進(jìn)行該加權(quán)響應(yīng)校正,則感覺(jué)響應(yīng)顯得未改變,并且能使擴(kuò)展聲音象它在濾波之前那樣。打算再現(xiàn)大功率、次可聽或次聲能量的大系統(tǒng)需要一種不同的方法,盡管相同的方法適用。補(bǔ)償系統(tǒng)把一個(gè)揚(yáng)聲器模型與共軛過(guò)程組合,產(chǎn)生一個(gè)其聲學(xué)輸出具有低群延遲失真的零相位濾波器。對(duì)于這種用途,波峰響應(yīng)不僅遵守標(biāo)準(zhǔn)做法,而且用在對(duì)準(zhǔn)中以幫助改進(jìn)群延遲,并且成為允許頻帶限制特征被打開或關(guān)閉的隱藏補(bǔ)償?shù)牟糠?。?dāng)選擇像上述那樣的中性時(shí),能使補(bǔ)償系統(tǒng)改變其截止深度和具有最小可聽度的補(bǔ)償能量。這種特征允許補(bǔ)償系統(tǒng)由音量的變化跟蹤或調(diào)制控制設(shè)置、功率級(jí)、或競(jìng)爭(zhēng)感覺(jué)頻帶的程序條件。以這種方式,在失真插入之前,帶寬限制能迫使較多功率到揚(yáng)聲器。由于現(xiàn)在定量配給了可聽能量,所以較小放大器能產(chǎn)生相同的重放音量。這些因素具有經(jīng)濟(jì)重要性。揚(yáng)聲器具有這樣設(shè)計(jì)的部分,從而系統(tǒng)能從補(bǔ)償系統(tǒng)受益。它們具有較短音圈和較小重量的錐盆以從放大器產(chǎn)生較高聲學(xué)輸出。效率較高,但機(jī)械行為常常被折衷,并且來(lái)自這樣一種設(shè)計(jì)的聲學(xué)輸出往往隨頻率升高。沒(méi)有校正,揚(yáng)聲器聽起來(lái)剌耳且尖利,并因此必須補(bǔ)償。然而,一旦這些變化由補(bǔ)償系統(tǒng)校正,揚(yáng)聲器就播放得更響亮,并且能更小,并且能使用更低功率的放大器。如果選擇虛擬低音擴(kuò)展,則借助于謹(jǐn)慎制訂的策略在頻率上移動(dòng)波峰或補(bǔ)償響應(yīng)。在頻帶邊緣處的過(guò)程設(shè)置和有關(guān)聲學(xué)波峰頻率變得取決于程序材料的低音含量、放大器的功率保存、及揚(yáng)聲器的運(yùn)動(dòng)能力。當(dāng)重放級(jí)較高,并且低頻能量較強(qiáng)時(shí),波峰響應(yīng)在頻率上向上運(yùn)動(dòng),以保持合理的錐盆運(yùn)動(dòng)和失真性能。大多數(shù)娛樂(lè)系統(tǒng)帶有均衡器、音調(diào)控制、及其它用戶操作或啟動(dòng)的特征。需要聲學(xué)可見(jiàn)性。補(bǔ)償系統(tǒng)最好與這些級(jí)聯(lián)工作,并且能改進(jìn)其性能。一旦揚(yáng)聲器系統(tǒng)具有由補(bǔ)償系統(tǒng)提供的更理想化輻射行為,各種響應(yīng)校平系統(tǒng)就不必分類或推測(cè)從麥克風(fēng)取出的測(cè)量響應(yīng)的哪部分源于揚(yáng)聲器或源于室內(nèi)。補(bǔ)償系統(tǒng)能更有效地從可能損壞相位響應(yīng)或不適于其它聽眾位置的這些響應(yīng)校平程序中消除不適當(dāng)?shù)木?。?jí)聯(lián)操作也保證除去由傳統(tǒng)方法不可識(shí)別的響應(yīng)引起的分散注意力的機(jī)械聲音。人類雙耳聽覺(jué)擅長(zhǎng)感覺(jué)、識(shí)別、及本地化這些聲音。一旦除去它們,傳統(tǒng)均衡方法就能提升高頻,而沒(méi)有刺耳聲,以及提升低頻,而沒(méi)有最小構(gòu)造所特有的箱式隆隆聲或渾濁聲音。對(duì)于補(bǔ)償系統(tǒng),專用模擬功能塊電路能形成簡(jiǎn)單的實(shí)用系統(tǒng)。用于其可調(diào)節(jié)部分的響應(yīng)范圍能由共軛模型預(yù)計(jì),從而并行信號(hào)路徑和多個(gè)共享功能是可能的。在單條路徑中需要少得多的有源設(shè)備,由此減小成本和失真。一些時(shí)間有關(guān)校正可由全通濾波器進(jìn)行,而其它延遲操作是不實(shí)際的。在揚(yáng)聲器上下文中的補(bǔ)償系統(tǒng)的示范模擬和DSP實(shí)現(xiàn)分別提供在附錄B和C中。補(bǔ)償系統(tǒng)的其它用途的描述如下。Mt^-通信系統(tǒng)可能經(jīng)受多余的窄帶噪聲或在固定或變化頻率下的音調(diào)。十分經(jīng)常的是,一些等待時(shí)間是可用的,以允許子系統(tǒng)識(shí)別和跟蹤這樣的音調(diào)。當(dāng)產(chǎn)生異相信號(hào)以除去干擾不實(shí)際或不可能時(shí),補(bǔ)償系統(tǒng)實(shí)現(xiàn)一種有效結(jié)果。通常,可以用參數(shù)可移動(dòng)加權(quán)響應(yīng)陷波器跟蹤干擾。如果不是信息信號(hào)具有與受抑制頻率的相同的頻率,則校正將是有效的而不降低或改變聲音。通常,通信系統(tǒng)具有換能器,如作為聲音再現(xiàn)系統(tǒng)部分的麥克風(fēng)、耳機(jī)和揚(yáng)聲器。這些元件能具有能個(gè)別或作為系統(tǒng)集體補(bǔ)償?shù)亩嘤囗憫?yīng)。一個(gè)或多個(gè)處理器能放置在信號(hào)鏈中的任何處。它們能被控制或編程以補(bǔ)償許多組件部分混合物,如換能器、信號(hào)路徑、人聽覺(jué)要求等。為了建立這樣一種系統(tǒng),控制參數(shù)信息可以由在信號(hào)路徑中的隱藏代碼識(shí)別或估計(jì)。輔助通道、以及其他裝置,能用來(lái)傳送該信息。由于補(bǔ)償系統(tǒng)有效地使用該信息以產(chǎn)生非常復(fù)雜的響應(yīng),所以校正過(guò)程能被安裝在多個(gè)系統(tǒng)中。例子包括計(jì)算機(jī)揚(yáng)聲器、用于聽力損傷者的電話系統(tǒng)、及移動(dòng)通信。對(duì)于這些系統(tǒng),處理器能在末端用戶器具的外部或不是其一部分。所以,補(bǔ)償系統(tǒng)能被編程為器具的一種具體模型,并且被外部激活。處理器的部分或全部能與器具在一起或不與其在一起。助聽器-許多聽力閑難產(chǎn)牛于對(duì)聽覺(jué)神經(jīng)內(nèi)茸毛細(xì)胞的損壞。常常人們受耳鳴或耳鳴(headringing)之害,并且在擁擠嘈雜房間中理解對(duì)話有困難。有時(shí)與一個(gè)窄頻帶相對(duì)應(yīng)的一個(gè)間隔接近的細(xì)胞群已經(jīng)有機(jī)械損傷,引起對(duì)高強(qiáng)度刺激的過(guò)度神經(jīng)響應(yīng)。這種作用常常聽起來(lái)不和諧和疼痛。它可能引起去到和來(lái)自大腦的聽覺(jué)反饋路徑的中斷,從而啟動(dòng)過(guò)早保護(hù)功能,由此加重不愉快感覺(jué)。由于引起機(jī)械運(yùn)動(dòng)的刺激是在由醫(yī)學(xué)測(cè)試?yán)谐绦蛉菀锥x的頻率范圍中,所以能容易地把參數(shù)加權(quán)陷波濾波器調(diào)諧到相同頻率,以阻塞刺激這些細(xì)胞的聲音傳輸。如果對(duì)于個(gè)人適當(dāng)?shù)亟⒓有约訖?quán),則減小對(duì)于其它聲音的感覺(jué)損耗。在一種典型情況下,陷波器必須具有可能必須隨聲壓級(jí)別變寬的頻帶抑制特性。補(bǔ)償側(cè)能量跟蹤這些變化以減小對(duì)于其它聲音的可理解度損耗。設(shè)計(jì)成進(jìn)行這種校正的系統(tǒng)能更有效,并且其專用處理可能吸收比通用響應(yīng)造型方法少的電池功率。水印識(shí)別_一種記錄能借助于由一個(gè)尖銳陷波器除去的已知頻率形成。如果相同記錄需要以后被識(shí)別,則能使系統(tǒng)查尋已知的丟失頻率。人們能期望顫動(dòng)、噪聲、及不可預(yù)測(cè)的時(shí)鐘速率移動(dòng)死頻帶和產(chǎn)生多種困難。記錄可以使用音樂(lè)信號(hào)定義操作頻率和編碼安全陷波器的時(shí)序。減小時(shí)鐘依賴性,并且使用數(shù)碼鍵防止某人找到這些頻率和改變目的。在重放期間,程序的鍵識(shí)別部分啟動(dòng)用于確認(rèn)的譯碼參數(shù)。象上述的通信系統(tǒng)那樣,所記錄的陷波器應(yīng)該盡可能好地安靜或隱藏,并且可能從一個(gè)頻率跳到另一個(gè)。參數(shù)控制加權(quán)補(bǔ)償方法對(duì)于這種應(yīng)用是理想的,并且鍵入頻率跳躍和隱藏的組合為一種有效安全系統(tǒng)提供。從聲咅系統(tǒng)消除反饋_渉及聲咅的同時(shí)獲得和再現(xiàn)的較大聲咅增強(qiáng)設(shè)施、電話和其它系統(tǒng)經(jīng)受反饋。通常,一個(gè)麥克風(fēng)拾取再現(xiàn)聲學(xué)信號(hào)的某一部分,并且添加到信號(hào)上以引起振蕩。揚(yáng)聲器電話的成熟DSP部分能分類房間回聲和串音的相位關(guān)系,以使聲音傳輸清晰并且消除反饋。頻移器隨機(jī)化反饋相位以防止嗥鳴或高Q松散耦合振蕩的緩慢建立。有時(shí),來(lái)自這些方法的潛伏干擾級(jí)性能或同步。能把可調(diào)諧加權(quán)陷波器設(shè)置到靈敏頻率以消除振蕩而沒(méi)有對(duì)于聲音的顯著損耗。雙調(diào)諧或多調(diào)諧版本彼此沒(méi)有什么相互作用,并且固有死帶使調(diào)諧出反饋容易得多。CD唱機(jī)_一種以數(shù)字或樽擬域(或兩者)操作的典型電子系統(tǒng)可以組合有意用戶調(diào)節(jié)和補(bǔ)償系統(tǒng)。部分描述、數(shù)學(xué)模型、測(cè)量數(shù)據(jù)、及人類喜好信息可被組合,并且并入其設(shè)計(jì)中。一旦定義參數(shù),并且確定其系數(shù)值,一個(gè)有組織的數(shù)字群就能對(duì)電氣或數(shù)學(xué)系統(tǒng)編程,以對(duì)于揚(yáng)聲器的不同形狀和尺寸進(jìn)行特定校正響應(yīng)。參數(shù)列表以及甚至個(gè)別校正模型能被下載到CD唱機(jī)或其它設(shè)備中的一個(gè)數(shù)字信號(hào)處理器。這種操作能在任何時(shí)間進(jìn)行,從而它提供可編程升級(jí)。它能由條碼、遠(yuǎn)程控制激活,從計(jì)算機(jī)下載,或安裝到專用播放器/揚(yáng)聲器組合上。盡管已經(jīng)表明和描述了本發(fā)明的幾種具體形式,但顯然,能進(jìn)行各種修改而不脫離本發(fā)明的精神和范圍。附錄A圖18、19和20表示用于低通濾波器(Lp)和高通濾波器(Hp)截止濾波器的可能實(shí)現(xiàn)。這些具體濾波器的級(jí)數(shù)保持得較小以支持低MIPS實(shí)現(xiàn)。例如,附圖18給出了如下的數(shù)字低通濾波器實(shí)現(xiàn)數(shù)字低通濾波器實(shí)施#1定義抽樣頻率Fs=44100定義截止頻率Fc=14000歸一化截止頻率fc2*—Fsfc=0.635定義濾波器Qq=10q定義濾波器參數(shù)F:=2.iin(fc·^)F=1.68A=—2A=L411B=A定義傳遞函數(shù)(第一列是在傳遞函數(shù)中的分子系數(shù),而第二列是在傳遞函數(shù)中的分母系數(shù)),所以該濾波器是一個(gè)二階IIR。畫出濾波器的頻率和相位響應(yīng)附圖19給出了如下的高通濾波器實(shí)現(xiàn)數(shù)字高通濾波器#1定義抽樣頻率Fs=44100定義截止頻率Fc=2000歸一化截止頻率fcFs定義濾波器Qq=2Q:=iq定義濾波器參數(shù)P:=2-s!a|fc<|jF=O.284AJ"·ιτA=0.04B=A定義傳遞函數(shù)(第一列是在傳遞函數(shù)中的分子系數(shù),而第:分母系教),所以該濾波器是一個(gè)二階IIR。ιι列是在傳遞函數(shù)中的D:=.2.(2-F.Q-F1)I(I-FQ)DI1■2-1.777I0.858.計(jì)算增益補(bǔ)償ρκ:=7-——Γ(4-2.F-Q-Fi)ιIV—PKK=O.909畫出濾波器的頻率和相位響應(yīng)χ:=0,·001.522G(X):=K|gain(D,χ)附圖20給出了如下的數(shù)字低通濾波器實(shí)現(xiàn)數(shù)字低通濾波器實(shí)施#2(一個(gè)零)定義抽樣頻率Fs=44100定義截止頻率定義傳遞函數(shù)(第一列是在傳遞函數(shù)中的分子系數(shù),而第二列是在傳遞函數(shù)中的分母系數(shù)),所以該濾波器是一個(gè)二階IIR。畫出濾波器的頻率和相位響應(yīng)χ:=0,001...5G(χ)=Igain(D,χ)圖21表示用于高和低斜限均衡器的可能實(shí)現(xiàn)。這些均衡器用于Ls和Hs其中基于全通濾波器部分的數(shù)字斜限EQ部分定義抽樣頻率Fs=44100定義臨界頻率Fc=10000歸一化臨界頻率定義傳遞函數(shù)(第一列是在傳遞函數(shù)中的分子系數(shù),而第二列是在傳遞函數(shù)中的分母系數(shù)),所以該濾波器是一個(gè)一階IIR。畫出濾波器的頻率和相位響應(yīng)χ:=0,·001..0.5G(x)=Igain(A,χ)并且,為了產(chǎn)生希望的參量EQ在結(jié)構(gòu)中嵌入全通部分。在DSP實(shí)施中,按所示信號(hào)流程計(jì)算濾波器輸出,下面通過(guò)必要地變換全通部分的分子計(jì)算以上系統(tǒng)的整體傳遞函數(shù)D=AG==DaI^取分母F:=D<(I>抽取分子畫出幅值響應(yīng)圖22表示可用于提升或陷波器應(yīng)用的參數(shù)均衡器實(shí)現(xiàn)。其中基于全通濾波器部分的數(shù)字陷波/參量EQ部分定義抽樣頻率Fs=44100定義臨界頻率Fc=5500歸一化臨界頻率定義傳遞函數(shù)(第一列是在傳遞函數(shù)中的分子系數(shù),而第:系數(shù)).所以該濾波器是一個(gè)一階IIR.列是在傳遞函數(shù)中的分母畫出濾波器的頻率和相位響應(yīng)χ:=0,·001..0.5G(χ)=Igain(Α,χ)并且,為了產(chǎn)生希望的參量EQ在結(jié)構(gòu)中嵌入全通部分。在DSP實(shí)施中,按所示信號(hào)流程計(jì)算濾波器輸出,下面通過(guò)必要地變換全通部分的分子計(jì)算以上系統(tǒng)的整體傳遞函數(shù)D=AGM=D〈1>抽取分母=D<°>抽取分子.(l-k)2建立新分子Fn=M·F0+L=M·F^L·G1幅值響應(yīng)這樣的均衡器的組合能結(jié)合,如圖23和24中所示,以建立補(bǔ)償?shù)南莶ㄆ餍?yīng)。其中,圖23給出了加權(quán)陷波器#1數(shù)字實(shí)施包括使用在“基于全通部分的陷波/參量EQ部分”中描述的程序設(shè)計(jì)的3參量EQ部分2低Q增益部分圍繞臨界頻率陷波器對(duì)于補(bǔ)償部分#1和#2(分別為Dl和D2)Q是2而k是1.5,導(dǎo)致下面的傳遞函數(shù),生成濾波器是兩個(gè)2階IIR濾波器,其中列0表示分子,而列1表示分母。對(duì)于臨界頻率部分#3(下面的D3)Q是10而k是0,生成濾波器是-波器,其中列0表示分子,n0而而列1表示分母。級(jí)聯(lián)的3IIR濾波器的整體頻率響應(yīng)的線圖χ=O,.001..0.5Gl(X)=Igain(Dl,χ)G2(χ)=|gain(D2,χ)G3(χ)=gain(D3,χ)H(χ)=20·log(G1(χ)·G2(χ)·G3(χ))圖24給出了加權(quán)陷波器#2的數(shù)字實(shí)施包括使用在“基于全通部分的切口參量EQ部分”中描述的程序設(shè)計(jì)的3參量EQ部分在兩個(gè)陷波器中點(diǎn)附近的一個(gè)中Q增益補(bǔ)償對(duì)于補(bǔ)償部分#1(下面的Dl)Q是2而k是的4,導(dǎo)致下面的傳遞函數(shù),生成濾波器是兩個(gè)2階IIR濾波器,其中列0表示分子,而列1表示分母。對(duì)于臨界頻率陷波器部分#2和#3(下面分別是D2和D3)Q是10而k是0,生成濾波器是一個(gè)二階IIR濾波器,其中列0表示分子,而而列1表示分母。級(jí)聯(lián)的3IIR濾波器的整體頻率響應(yīng)的線圖χ:=0,·0001..0.5Gl(X)=Igain(Dl,χ)G2(χ)=|gain(D2,χ)G3(χ)=|gain(D3,χ)H(χ):=20·log(Gl(χ)·G2(χ)·G3(χ))(級(jí)聯(lián)響應(yīng))附錄B圖25是用來(lái)補(bǔ)償一個(gè)帶有5英寸低音驅(qū)動(dòng)器和3英寸高音喇叭的小書架揚(yáng)聲器低音喇叭圓頂=4.33k(帶有LC的陷波器)錐盆=4.9k(僅有被補(bǔ)償?shù)南莶ㄆ?錐盆的邊緣=2.8k(有源陷波器)高音喇叭圓頂=15.Ik(沒(méi)有補(bǔ)償)錐盆cr=11.6以有源陷波器)錐盆cr=9.32k/9.45k(阻尼復(fù)合)W。=1.38k(LCR陷波器)提供十四種調(diào)節(jié)。圖26表示用來(lái)產(chǎn)生LX、HX、LS、HS、LP、和Hp濾波器和參數(shù)調(diào)節(jié)的電路。添加較低頻率截止波峰,以產(chǎn)生一個(gè)8英寸書架系統(tǒng)的響應(yīng)特征。對(duì)于該電路,Q和波峰幅度由方框標(biāo)記的組件設(shè)置。圖27和28表示W(wǎng)tl陷波器部分和用于揚(yáng)聲器的代表性調(diào)諧。以dB為單位的Wtl...和|A|是可調(diào)節(jié)的,而一個(gè)電阻器設(shè)置Q。這些中的兩組進(jìn)行四種調(diào)節(jié)。其中0.0015=3.2-3.6k(2.5k->6.8k)0.0033=1.4->1.7k(l.2k->3.3k)0,0047*900-1,2k(800->2.2k)0.15=120(80-220)LOffQRIAI=47k||33kRQ=68kI1100kVout=IOVppMAX(+6dB)圖29表示一個(gè)單低Q提升。用于提升和頻率的調(diào)節(jié)由opamp部分提供。其中0.033=270->1.4k0.0068700Hzopti3/4maxff0圖30是用于時(shí)間校正的全通均衡器。全通均衡器組合來(lái)自六個(gè)有源過(guò)程電路的輸出。附錄C使用一個(gè)標(biāo)準(zhǔn)PC和一個(gè)MotorolaEVM56362DSP估值板實(shí)現(xiàn)一個(gè)計(jì)算機(jī)調(diào)節(jié)的DSP補(bǔ)償器。源代碼和應(yīng)用注釋如下。揚(yáng)聲器調(diào)諧應(yīng)用程序注釋揚(yáng)聲器調(diào)諧應(yīng)用程序被用面向?qū)ο蟮腗FC應(yīng)用程序框架寫成WindowsOS32位應(yīng)用程序(請(qǐng)參照用MicrosoftVisualC++開發(fā)環(huán)境包括的MFC的文檔)。該應(yīng)用程序帶有一個(gè)對(duì)話接口。主對(duì)話類,CTabDialog,是MFCCDialog類的一個(gè)子類。CTabDialog類實(shí)現(xiàn)一個(gè)“標(biāo)簽式”對(duì)話接口。對(duì)話中的每個(gè)標(biāo)簽是MFCCPropertypage類的子類。每個(gè)標(biāo)簽表示揚(yáng)聲器校正算法的不同方面。如下是標(biāo)簽類的列表·CMainpage,除其他以外,還實(shí)現(xiàn)用于前和后音量控制的UI·CShelvpage,實(shí)現(xiàn)用于低和高斜限均衡濾波器的UI控制·CCutoffpage,實(shí)現(xiàn)用于低和高波峰截止濾波器的UI控制·CNotchpagel和CNotChpage2,實(shí)現(xiàn)用于多個(gè)陷波濾波器的UI控制(例如為了限制揚(yáng)聲器中的諧振)·CStffaveRijecetpage,實(shí)現(xiàn)用于能限制揚(yáng)聲器箱中的駐波的一組濾波器的UI控制·CDBNotch,實(shí)現(xiàn)用于雙調(diào)諧陷波濾波器的UI控制·CAllpasspage,實(shí)現(xiàn)用于二階全通濾波器的UI每個(gè)標(biāo)簽頁(yè)上的每個(gè)可調(diào)節(jié)參數(shù)由CSlider類的一個(gè)實(shí)例表示。每個(gè)UI滑動(dòng)器具有4096個(gè)分立值的范圍。當(dāng)用戶操縱UI滑動(dòng)器時(shí),一條消息被從標(biāo)簽頁(yè)送到CDSP56Manager類的實(shí)例。在該類中,適當(dāng)?shù)挠?jì)算發(fā)生以把線性輸入值變換成計(jì)算由用戶設(shè)置表示的傳遞函數(shù)必需的一個(gè)或多個(gè)值。使用一個(gè)I2C串行連接把這些計(jì)算值傳輸?shù)紻SP。DSP執(zhí)行對(duì)于上述傳遞函數(shù)的實(shí)時(shí)實(shí)現(xiàn)必需的計(jì)算。DSP能夠?qū)崟r(shí)地計(jì)算一系列濾波器計(jì)算,以允許實(shí)現(xiàn)所有揚(yáng)聲器校正濾波器的總級(jí)聯(lián)傳遞函數(shù)。DSP能接收模擬或數(shù)字輸入數(shù)據(jù),并且傳輸處理的模擬或數(shù)字輸出數(shù)據(jù)。其中,圖31示出了揚(yáng)聲器參數(shù)文件輸入和輸出邏輯。圖32示出了一個(gè)至DSP連接邏輯的性能頁(yè)UI的例子。//COMPortChooer.cppiwpleraencaticn//HincludeM6tdaCx.hN!includemua.hmNinclude**COHPortChooser,li·ffiCde£_DEBUCdefine一newDEBOGeNEHund£THIS—fll^B一////////////////////////////////,////////////////////////////////////////"/Z//cCOMPorcChooserdialogCCOMPortChoosersiCCOMPortChoocr(CWnd·pParent/*mn-L·/)ιCOialog(CCOMPortChooser1100pPernc}{//{{AFX_DATA1_IHIT(CCOHPorCChooser)//MOTE;theCl46sHizardwilladdmemberinitializationhere//)}ArxeOATAeIMITvoidCCOMPortC3iooscrtιDoOataExchange(CDataBxchange*pDX)(CDialogιDoDAtaExchans(pDX);//{{AFX_nJVTA_WW(CCOMPortChooser)//NOTEitheClttSffHizardwilladdDOXandDDVcallshere//J}AFXDATAMM}““BEGIN^MESSAGEeIW(CTOMPortChOOser,CDialog)//(Tafx一MSG=MAP(CCOMPortChooeer)OM_BNjd]lCKiD(IDCJIADI01,OoRadiol)ΟΝ:ΒΝ二CLICKED(IDC:RADI02,OnR4dio2}0N:BN:CLICKED(IDC:RAM03,OnRadioJ>ON二BN:CLICKED(IDC:RADI04,OnKadio4>//TjA^C一MSO-KAP、EHOJIESSAjGE^HAP(>UHIUUiniUIUUUIilittiilUUUtut!ItUIIIlIIiiUUIlUUIIHtHmill//CCOHPortChooserm^se^ehandlervoidCCOKPortChooser:OnRadiol()//TODOeAddyourcontrolnociCicationhandlercodeherewhich^port1;)voidCCOMPortChoosr:OnRadio2O//TODOjAddyourcontrolnotificationhandlercodcherewhich_port_2;voidCCOHPorCChooser:OnRadio^(){//TOOOMdyourcontrolnotificationhandlercodeherewhich_jK>rt_3;voidCC0MPorcChoO6ri:0nRdio4()(//TOOOAddyourcontrolnotificationhandlercodewhich_port■JBOObCCOMPortChooseriOnInicOialog<){CDlalog:OoIniCDialo^rO;//TODOAddextrinitilitionIwhichjport·3;TRUE;TRUEunle89yousetOCXpropertyPagtoshouldcontrolenFALSEfn^HiFreqSlider.SctTicFreqt(CONTROLeRAIiOE*1)/16);m_HiQSlider.SccRangeCONTROL^RANGC)·_vn_HiQSIider·SeCPos(CONTROI/_RAJ4CE-g.DSP^3110^er->CetParmVoIue(kHotch7Q)J;in^HiQSlider.SetTicFreq((C(^rTROL_RAJ4GE4-l)/16);m^HiBoostSXicier.SetRange(O,CONTROL_RANGEJ;m一HiBooecSlidcr.SctPo·CCONTROL^RANGE-g^DSPMaiiager-^GecParamValue(kotch7Boosc});m_HiBooetsXidec.SetTicFrcqi<CONTROL_RANGE+l)/16);//g_DSPMandger->SctCucofflFreq(CONTROL_RANCE-m_LoFreqSlider.CeCPos{));//g一DSPMena9er-SeCCutof£lQ(C0NTR0I一RaSgE-To一Lo^Slider-CetPosOJ;//g一DSPManager->SetCutoCflBooit<CONiROX#一RAwSs-m一LoBoostslidcr.GetPosO),//g-DSPManager->SetCuto£f2Freq(CONTROL_RAMQE-ra_HiFreqSlider.CetPOs()//g一DSPManigei>SetCut_oif2Q<C0NTR0Ii_RAiiaE-p\Jli石Slider-GetPoe());//g"DSPManager->SetCutoff20oost(CONTROL_RAMCE-n_KiBoostSlider.CetPOfl{))jTRUE;//returnTKUEunlessyouset//EXCEPTIOWOCXPropertyPagtfocustoacontrolshouldreturnFALSEvoidCCutofCPaseOnVScroll(UIMTnsBCode,UIWTnPos,CScrollBar·pScrollBar){//TODOAddyourneeeagehandlercodehereand/orcalldefaultCPropertyPage.xOnVScrolKnSBCode,nPoe,pScrolXBar);Sleep(SO)··if((CSliderCtrl*)pScrollBar-tm_LoFreqSlider)g_DSPManagcr^>SecCutoCfXPreq(C0rrR0L_RAMGE-iHIf0PrcqSXider*GetP08());elsei£((CSlidcrCtrl*)p5croll&Ar■■tm_I#oQSXidcr)9_D5PHaaager->SetCutoCfIQ(COimtOL_IUUIOE-ia_LoQSlider.GetPos()J;elsei£{(CSliderCtrl*)pScrollBrtm^LoBooetSlider)9_D5PManager->SetCuto£flBoost<COKTROL_RANGE-mfcLoBooetSXider.GetPos());elseif((csiiderccrl_JpScrollBartm_HiFreqSlider)g^DSPManigcr-s-SetCutoffJFreqiCCHnrRO^IUUiQB-m^HiFreqSlider.GeCPos());elsei£(《CSliderCtrl·JpScrollBar—Zro_HiQSlIder)geDSPManaig3:-SctCut:offJQiCONTOOI^RANGE-m^JIiQSlieier-GetPos<>);elseit{(CSLiderCtrl*)pScrollBarLtn_HiBooetSliderJg_DSPManager->StCutof£2Booet(cONTROli_RANGE-m_HiBoostSlider-GetPos{));}voidCCutoffPgetaOnByp鼉S6P丄rst>iifTODOjAddyourcontrolnoti£ictiQQhandlercodehereintstate■m^BypassFiret&utton.OetStateOk0x3;g一DSPKAnager-^SetByp&esSection(etatc^kBypaeeHipass);}voidCCutoffPage:OnB/paseSecond(^{//TODOiAddyourcontrolnotificationhandlercodehereintstate_m_BypaesSecondButton.GeCSCate(Ifc0x3;9_DSPttanager·>SetBypaBSeccion(state,JcBypaestopaee);)ViC!defined!ArX_COrtPORTCHOOSER_H一B5&S10E7垂F7l>S一11D2一5βΕΕ·(Κ)605<:89Ε3一IHCL-UDED^)defineAFX_COHPORTCHOOS一B5oiToE7_F7Ds"il02396EE_00097CD89E2一INCLUDED^IfiC_MSC_VER1000Ipraginaonceiendii//_M5C_VER1000ffcoKPorcChoosr.hheaderCile“ftCCOMPoctChooserdialogclassCCQMPortChooβcrtpublicCOialo^//confttruccionpublic;CCOMPortChooeertCWnd*pPdrent-ITULL^;//tandardconstructorintwhich_port>//OialogData//(ADCJ5ATA(CCOHPortChooser)enum{XDO-lDD_DIAliOG3};//XOTBrthClaaeViizardwilladddacameDlberfibere//)}XrXwDATAJiOverride·//ClaseWleardgeneracedvirtualfuncti^soverrides//{{Arx_VIRTUAL(COOMPortChooer)protected!virtualvoidDoDacaExctiange(CDaCaExchangc*pDX);//DDX/ODVsupport//]]AFX_VIltTUAl·//IitpXemenCationprotectedι//Generatedmessagemapfunctions"{(AFX一MSGtCCOMPortChooeerl£3cjas9voidOoRadiolO;,A£xjttsgvoidOnRadioS();一nsgvoidOnRadio^();aCxjnegvoidOoRa<Uo4OtvirtualBOOI*0nlnitDlal09();"}}AFX一KSOD6CLARSHS5SAG5WUP()Ji""http://((APX^IMSEKT^IiOCATlON))^_//MicrosoftDeveloperScudiowillinsertadditionaldeclarationsimmediatelybeforethepreviouslinetfendi£//!defined<AFX-COIORTCHOOSER—H—BSD510E7JF7DS一11D2”96EE一00“7CDB9B2—INCUTOBD一)ifI<SefIned(AFX_CUTOrFPACE_H一FlSie3S_OMO一一t^CLUPED^)tfendif//_MSC_VCR>·100O//CutoifPa^*.hhAdr£iXe//““I川""""""if"""Π""""""""""""""""""“"UUU!ftCCuto£iPgedielogclcsCCuCpi£FgepublicCPropertyPage1DSCZARE·柳CREATE<CCUtoCCPA9幻//ConetrvctionpublicιCCuto£fP9U;-CCutof<P9c{)j//DialogDt//I(AFXwDATA(CCUtoCCPa^e)mia{IDDIDD一PP7);CButtonm^BypiesSecondButton;CButtonn^Bypa丨snrBtButtion:csilderccrltJliBoostSlid*rfcslioerctxlnluloslider;csildcxctrli^Kireq$li<xr;CSlidezCtrlm^LoBoostSlLder;CSliderCtrlra^LoOSlider;CSlidecCCslm一LorreqsUder;"})APXJDAXA一//OverricSee//ClassWlzardyenerat·virtualfunctionoverride//{AFX一VUOUAMCCutomage)protected:vlrcuelvoidDoDataExchangelCDataBxchange*pDX)^“DDX/DOVsupport//))Arx^VIRTUWL//Inpl爆merit贏donprocecccds//Generatedee*0·mapCunctione//({AFX^MSGfCCutoffPag·}Vlrtu&L&00LOaIaitDUlosO)afxjnegvoidOnVScrolX(υΚΤnSSCod·,UIHTCScrollBar*pScrollBax);aC^outgvoidOQBypas丨FixetOjaCxvoidOnBypaeeSecond<》;//JTafxwMSOD£CIAJtS_HESSAGE_HAP()//{{AFXIHSSKT.LOCATION))//MicrosoftDvloprStudiowillinsertadditionaldcclerationeimnecJiaCelybeforetheprevicmeUne.#endIC//!fined(AFX一CUTOPPPAGE_H_P151SJ>e<D_llD2一SCEEJiOeo^CDBSSZ—IiiCUJDEDj34ITlfIdefined(AF3C_ALLPASypACEeH一Γ4€Β24IlBJ^l10J_eE£_00097CDBSB2_ICl.UDED_)!defineAFX_ALLPAS5PAGEmU一1103二1Λ03二9€£E=00oi7CDB3E2一INcZSoED一ViC_MSC_VER1000Vprtgmaοαοfeodif“一MSC一VER1000//ALLpASSPagA.h>header£il//tuufiiutfiuufuiuHinnuuuuuuuiiiuiiiiiUfiiiiffnfni/ffffttiπCAllpaesPagedialogcIa*·CTbOiXog;cla*CAlXpABePftgetpvihlicCProperCy^ege(peCIARC_DYMCREAT6(CAlXpa9PS>//ConstructionpublicιCAllpABBPageO;//{{ArX一&ΛΤΛ(CAllpassPage)enum{IDD·IDDTWPPIO};CDutCOtin.BypAevBuCCOD;CSlidcrCtrl一QSlideriCSliderCtrlmFrequencySlider;//)}afx_dwa//Overrides//ClasKizardgeneratevirtualfunctionoverride//“AFX一VIRTUAL(CAlIpasBPage)p£Otecce<l:virtualvoidDoDataExcnange(CDatExchange*pDX);ifOOX/DOVeupport//}JAFX_VIKTUAL·//Ic^pXetwuitacionprotected<ItGeneratednessagemapfunctions//{{AFX_MSG(CAllpaeeP9e)voidOoBypass;virtuaLBOOLOnInltDl*logO/aCx.msgrvoidonvscroll(UIWTaS&Cod·,UIWTnPoe#CScrollBar*pScrcllBAr);fxνι·9voidOnPainti);//}}講一咖DBOARS一HESSAOS一HAP()CTabDiAlog*nHP4rntUindow;voidseDdscriAgToOl(lotwhich)ι//((AFXeIUSEETLOCATIQK))//KicroeofcDeveloperstudiowillinssztadditionaldeclrtion9iwnediatclybeforechepreviouline.|ndi£//IdeCiWdUFX_AI^ASSPACE_H_F47€7B24^11B3_lll)3_CEE_00€097COBSE2_INCLin>£DJ//.cpp<implementdCionCile//!include_stdafx.h_llncludc*ea.h"include"AllpassPage.h1·Jlinclude"TabPialog.h*者include"DSP56kHanager.h"UfdeC—DEBUG!definenewOEBUGmNEWKundCTHIS—FILE"StAticCharTHISFILSO·一FILE_;Nendif—一一///////"http://"http://"""http://""""http://////////"http://"http:////""http://"http:////""http://""http://"http://CAllpaeePagepropertypageIHPLE£KT_DYNCREATE(CAllpassPage,CPropcrtyPege)CAlXpaesPage:CAllpassPageOχCPropertyP*9(CAllpasePagetIODJ{//(IAFteOATAeINlTlCAiIlpesePage)//JJafxdatainit}一“CMlpaeePage:-CAllpaesFage(>{>voidCAllpassPage:DoDataExcIiange(CDataExchange*pD^){CPropertyPage:DoDac·Exchange(pDX);//{{AFX一DATA—■CCAllpaesPagelDDX_ConcroX<pDX,IDCtoCHECKl,m^BypaesBuCtPJi);DDX~ControHpDX,IDC^SliIDER3,S_QSlider);TOX二Control<pDX,IDC^SLIDSRl,FrequencySliderJ;//}Tafx_data_map一一}一“BEGIK_HE5SAGE:WKAP(CJaipaesP*g,CProp^rtyPage)//{TaFX-MSG一MAP(CAlXpassPage)ONJBNwCLlCKED<IDC一CHSCKX,OnBypasv)OWJWeVSCROllL()一ON二WM二PWHTU"TjAPX—KSGJW£ND_M£SSAG£_HAP()/////////////////////////////////////////////////////////////////////////^/////CAllpaesPagenessagehandlersvoidCAllpaesPagejOndypase()<//TODOAddyourcontrolnotificationhandlercodehereIacfitace■<n_BypassButcon.GetStace<)L0x3;9^DSPffanagr->SetBypa&sSecticuaftateXBypas8Allp38s);}BOOLCAllpassPageiOnlnicDialogO<CPropertyPage:OnlnitDiAlog();//TODO;Adaextrainitialisationherem^FrequencySlider■SetRap^(O,CONTRO^AANCE);m二FrequencySlider.SetPoiMCONTROl^RAN石E-gj^SPManagcr-^GcCPardrnValueC^AilpasfiFreq})ιm_Frc<|UcncySlider.SetTicFreq^<CaHTROL_RAHGE*1)/16);ra:QSlider.SetRange《OfCONTROL^RANGEJ;“m二々Slide*l.StPoetCOTROTU_RAHSB-3_DSPM*nger->GetPa*amVaiuet)tAllpaesO)>m~QSlider·SetTicFreq《X^TROL·一RA^GE+l1/IGl;m_ParentWindow■<CTabOialo^CeCParftHI(->GCParencC);returnTRUE;//returnTRUEunlessyousetthfocustoacontrolif£Χ0εPTIOHOCXPropertyΡα9βthouIdreturnFALSEvoidCAllpassPaQe:2OnVScroll(U1NTnSBCode.UINTnPoe.CScrol!Bar·oScroilBar)//TOOOAddyourmessagehandlercodebreand/orcalldefaultCSlidexCtrlslider■(CSXiderCCfl'ipScrollBar;intwhich;CPropertyP*geiOnVScrolJ(nSBCode,ηPos^pScrollBar);Sleep(SO);ICtslider^mwFrequcncyS1i<Jer)which■1cAllpcFre<l;elsei£(elider■■&ra一QSlidcr)which·kAllpasQ;g_D5PNanager*>SetParmValus(C0NTR0I/_RAMGB-slider->0ett>o5{)fwhich);ScndStringToUI(which)f“voidCMlpaasPage:SendStrin9ToUX(intwhich){estringBtvsg^DSPManager->GetStringValue(which,stx);mvParentWindow*>SetStatufiSt:ring(Ortr);}voidCAlIpassPage1:OnPaincI){C^AintDCdc<this);//devicecontextCorpointing//TODOjAddyourncssagehandlercodeherem^FrequeocySlider.SetPoe(CONTROUJlANGE-g^DSPIUnager->GetPremValuetkAXlpessfrcq));u一QSlider.SetPoe《CONTROL^RAHGE-CDSPHanaSer-^GetrPiirAmVjaueflcAllpaeaQ));SetCheck(i^DSPHai^9tr->0etBypfts&Sectlonf)cBypa8BAllpaBe));CPropertyPAge::OnPaintOCorpaintingmessagesm^BypAeeButton.//Donotcftll//DSPCormi.h:interCoftheDSPCommclass*//-""""""""""""""""""Η""""""""""""""""Iifdefined(AhC_<DSPCOMM_H-e33F'9Er05_F6EF-llD2_96EE_OOGt)97CDB9C:2—INCtUOED^)!defineAFX_DSPCO1M_H_3Tr9iFO5_F6EF^llD2"9eEe_OO6O97CD09E2i__IWCLUDEDe—*if^KSCeVBR>-1000#pragmaonceendif//一MSC—VER>w1000classOSPCcmmιpublicvirwalBOOLIftTransmittingO;vircuailongGetDeteccStAte(void);virtualBOOLCheckStaCe(void);vircuaiI0K19SendDSPHentox^(charlong);virtuallongSendOSPWord(Iong);DSI>Coinn(^;virtual-OSPComi););ffendii//!defined{AFX_DSPCOMH_H_33F9Er05_F6EF_llD2_96EE^0060S7CDB3E2一INCLUDEDJUDSPConvn·cpp··iwplementation£thttDS^COimcl*.ff·"""Η"""""""""""""""""""""""""""""""include"stdafx.h"tfinclude■a.h*tfinclude"DSPCoinm.h"IifdcC一DEBUGIundefTHIS^FILEstaticCharTHIS一PILEfJ■—FILE_;舊definenevDEBUGeHEM一Kcndif“"""""""""""""""""""""""""""""""""""http://construction/Detruccion"H""""Ηm!"""H"""""""""H"""""""""H""PSPCofiRisDSPComroO{}DSPConvn::DSPCoirm(){)longDSPConm;SndP5FHord(long)rcturn(OL);)longDSPCommSendPSPMemory(char*data,longIen{return<OL);}BOOLOSPComm:CheckSCaCetreturn(crue);)longoSFCoRin:GetDetect5tate{)(return(OL);)BOOL·DSPConvnIeTrdnemitting(){recum(Calee>;)void$tHiCutoC£ivoid);voidScCHiCutoCfS(void);virtualvoidSe^HiCutofC2Q<longvalue);virtu·voidSetHiCutofC2Preq1longvalue);virtualvoidSetHlCutoefQ(lon9value);virtulvoidSetHlCutoffPreq(longvalue);virtudlvoidSetLoCucof£Q<lon9v^lue);virtualvoidSetLoCutοtFreq(longvalue);virtualvoidSetPreVoXumei1ongvlu);virtualvoidSetAnalogVolume(longvalue);//virtualvoid5etCuto££lFreq(longvalue);//virtualvoidSetCutof(longvalue);//virtualvoidSetCutoffXBoost(longvaIuc);//virtualvoidSetCutof£2Freq(longvalue);//virtualvoidSetCutof(loogvalue);//virtualvoidSeCCucoff2Boost<10119value);virtualvoidSetSheXviFreqdongvalue);virtualvcid(longvalue);virtualvoidSetShelvSFxeqUongv*lue);virtualvoidSetShelvSDooet(longν暴lue);virtualvoidSctNotchlCut(longvalue);virtualvoidSetNotcblQ(longvnXue);virtuevoidSetKotcblFreqfXongvalue);virtualvoidSetMotch2Cut(longvalue);virtualvoidSetHotd)2Q(loQ9value);virtualvoidSecKotcbZFreq(longvalue];virtualvoidSecMoCch3CuC(longvalu);virtualvoidSetH&tcb^Q{v^lue)ivirtualvoidSetNotch3Freq(longvalue);virtualvoidSetMotch4cuc(longvalue);virtualvoidSetKocc]i4Q(Zongvalue);virtualvoidj5etNoCcl4Freq(lon9valu);virtualvoidSetKotcb5Q(longv·上ue);virtualvoidSetKotchSDoost(longvalue);virtualvoidSetKocchGCuCUonvalue);virtualvoidfietMotcbCQt^ongvalue);virtualvoidSetHotch6Freq(longvalve);virtualvoidStHotch7Cut(longvalue);virtualvoidSetHotch7Q(longv^luei;virtualvoidSeuiotchFreq(longvalue);virtualvoidSetHotch9Freq<Xon^value);virtualvoidSetHaiQVolvune(longvalve);hexternCOSPSSkH^nagevg^DSPKanager;endif//!defined(AFXwDSPSeKMANACERJI_0Cr7B204^D79OelID2_96EEeO06097CDBE2_INCI,UDBO_)//DSC*5GkManager.cppinplementationotCheCDSPS6kNanagerclasft.““"""""""it"""""""""""""""""“""""""Η"include"stdafx.h-include"ea.h*番include*DSPS6kKAngef.h-.Iinclude<iuth.h>include<stdlib.h>Vinclude<scrLn0.h>ifOinclude"unLtjJpi.h·fincludefuncts.h"ttitdatSPlinclude-SPlpaiicroCarm.h*fendiftfinclude"IZClFortCarcutrβinclude"eapnem.h*#include"SSTPurunv.h*i£de£JDEBUGfundeflWISLPIXiESCAticcharJ#d£inene^DEBUQJ4EWteodifMilOstaticinton^jdolaya1000staticinticL.dlay50;^endifdefineFtLEj/ERSlON2//fileversiondefineGAtML$CALE8.//volunedefineV0VT01.defineVOLDOT3-909e-6.defineVOUtANQS(\WTOP-VOLBOT)//hiandIocutoffandshelvingrangesdefineFLCTOPRANCE0.145“1000/22050definerWBOTOANGE0.001169U10722050MeiineruMNOVtnCTOPRAHOB-rLCBOiiWiOE)ttddfineFHCTORRANGE1//22050/22050#dfinFHCBOTRA3XSE0.€3//8000/22050defineFHCB0TRAHQG20.42U4000/22050tfaefin·FHCXANGB<FHTOKUWGE-njCBCrrRANGE)#d£ineFHCRANGB3{FHCTOPRAIE-PHCB0TRAMC2)aefiiwQUTTOPRANQEl.QH1似ixwQUSCVniANGE0.003891"0-001#de£ineQLCnAHQB(QLCTDPRAMCG-{OLCBOTSUMCE))l<te£inSAMPLING一PRBQ44100defineOELAY^LENSTO123.itconvertsfrequencyrang·tologscaleffdoftneFT0PRANC3B1.ae£inPBOTXANOe0.134!defineFRAN3E(rTOFSWCE-PBOTRAmB)雷aefUieFTOPRANGC20.S&5//obi&ut2205top,KdQfitneFB0TRANSE23.531E-3iInewrange*UfiingactualCr<^qunciee爾defineFT0PRAIIGE34.431//3000Hz!defineFBOTRANGC32.433//30Hi.//hicutofffilterransesdefineQHC3BOT0.74KdcCineQHC2TOP2.256KdefincFHC2BOT3.9S4//1000Hzde£inefucrropS.2SS//20Kkz!defineFHCTOPRAi4GB3S·13//1S000CdeCineFHCDOTRANGEaFHC2D0Tstaticchar-m^paramNameskUIArrySizel■{"MainVoluroee,-Loshe1£FreqUoShelfGainerHiSheatFreq",HiSheXlGaiu·,■MotchXFreq"#-NotChlQ",■NotchlCut",NotcWFreq*,-HotchaQ"·NotcbJCut",■Motch3Q*>■NotCh3Cut\-NotchiFreq-,NotChiQ".■NOtch4CuC","NotchSFreq·.NotchSQ","NotchSCuC",■Bypass·,U>CutoCCFreq"*LoCutoffQ","HiCutotfFrcqm,-HiOitoffQwr"HDCDBypaee'',-HDC£X3ainScleOC£"_DDXContpBypaββ·,"Kotcherreq-,-MotchiQe4■Hotchecuc",■NotchiFreq",_Motch7<T·-NQtChVCUtwiaAnalogln44AnaXogVolume",Delay、feAllpeFreq"fllXLlpftvsQ-.-HiCutofmreq·-HiCucof£2Q·,"NotChBFreq*,"Kotch8Cut"#"Nocch^FreqtrinUotch9Qmf■Notch9Cute,"MotchAPreq".WotChAO-.-NotChACut■·eDBNotchHidCh");""""""I…""""""!J"""""""""""…"""…"“""ifI…⑴"""""""""■intCOSPSOcManager;:ChecfcsurnSR£C(char*lineptr,intN){unsignedcharcurbyce,eum0xff;Cor(inC;χΝ·2;χ·*2)(9canC<Xiaeptrtx(,tcurbyte);ι//lastoneischecksumsscanf(ηβρΓ+χ/%2χ·',fccurbyte);rcurn<cufbytesum);)voidC0SPS6kManager;iCetSSecordAddressRange(ctwr*e.longscart,longend,char"data)(lo9ac,count(so££sct;*8trt■-1L;end_-XL;if(*aI·1S*)//notaerecreturn;//cheek;thechecksumforthislineASSERT<CheckftuiaSREC(e,8trlen(s))switch(8⑴)Iease'1·ιsscanftaddrees);breakcase■2·ιbreIc;case1J11■BCanfI·break;defaultιreCum;break;)couat■acrlen<6)-offset-a;*st^rt·Address;end釀Address+‘count/€》//echwordie6charactersdata·β+soCCaet;)voidCDSPS6kManagert<DovinlodOSPCoaO(char**r·pmem;intcount■PRECORDS;longstart,end··longtβ,;char··rce;char^arccdatA.*td;chr*dpcr,rdata.c;Ionsolzebsi£e;longt<idree,recsi:art,r^cerkt;longvalue;ifgeestartingandendingaddressesstare-OXlFFFFrrFL;end■O;roc*■r;for(ititI-Osi<c^uncti**){GetSRecordAddre&fiRange{#rece,tte#tcc,i-srecdata);if(ts<OL)continue,'stare■min(fttart.ta);endmax(end,te);}sizeend-stare;beizesize·3;rdata■icharmalloc(bsiie+G)j//3bytesperwordpluslenstnandaddressA5SERT<dataI-XULL);daca-rdatA+<dptr■dat&;£or(i*O;i<bsize;i++)//clearmemorydptr++■o;Caddress_starts-while(taddrees<end){recctart_0x7FPFFFPFL;recs■r;toriinti-0;i<counc;)//searchfornextaddressGetSRecordAddressRange(*rcs.&tsCitettd)itits>.OL){if{ts>·taddrtss){tft<recstarc\{recfftartt9;recend·te;srecdataCd;j})recs++;)A5S£RT<receCart<end);//copyrecorddptr■dta*({recscart-start)*3);while(recstart!·recend){escan£(srecdftta,·%2x11/lvalue);dptr++·(char)valueerecdata2;eecanf(srecdata,·*2χ·,tvalue);*dptr++■(char)value;sr^cdatd+-3;secan£(6recdata4Lvalue);dptr-f+e(char)value;erecd^ta4Zsreefft^rt·^,·)caddrcesrecend;)ifcopysizeandaddressdpcrrddta二c(sizelfi)&OXFF;dper—aCsc-{size>>8)OxFP;dptr*^c;c·>ftizeοχΡΓ;dptr*+c;C■(BC^tC>>15)^0*FF;dpcr**-c;c_(scrt>>8)kOxFF;*dptr4>4··*c;cBtartI.OxFF;Optr**_c;//senddataCOOSP""Com-3ndDSPWord《sLzeJ://ra_Coav->sid[3SPViord<start);丨.beiae名》tγ·(xdtd1;)“""""""""""""""""i川"""""Η""""H"""""http://ConsCruction/DestmctioaiU·""""""""”""“"""""""""""""""""""""CDSP56kKaiaa9^iiCDSPSfik>UnA9¥(HWHOρ){ifOif(loddll()*Calse)InotΓσυηαinChegyscemdirectory·Fixthisandvet*vtapplicationHillHobLnecWi",HBOK[HDrcONSTOP);i-else(init^pprt一epi(l)t^aad.jdelA^cat.valve(cmdwdiy)rsetiodelay^cftCv*lu<(iodelay)ι)""endiiv>_Conm_newr2CIPortCcwrR{p);“OownloadDSPCoda();intitCor{t·β;i<XUIAmySizeji++>{ηRAv3D$Pvali|ii*i;JmMRaw2D5l^*laIkMotchePnq)·kP$m)Cch6Preq;M_Rv2DSPVal·(kHMchCO]■fcOSPHotchtiQ;nMRAvr203PVl·(IlHoCchSCUC]_MIffIttotcheOiC;OIJIAWZDSPVAI·lkotchmql*kDSPMotc^7Freq;mJUw2D$FV廛1·tkH0CCh7Q)■kOSPKOtcbTQ;(iwMw2DSPVal9l)QN0CCti7CUC)■k0SFK0CCh7CUC;n^itawsospval·IkDelay}·kDSPOelfty;(KMlp丨isrreal·kDSPAllpasFrcq;^JtawJDepVele{JcAllp4sQiΧ05ΡΑ11ρ·Ο;m_Rw2DSPV*l·(kNQtchiFrql■IcOSPHotchIrreq;m一R‘w2D$PVae(KNOtc)^QI_kDSPHotche^rTn,naw2D5PV*1(kHotcblCtttI_lcOSPHoCchSCut;m^IUwIOSPVale(KN0CCh9Freq)_kDSPNOCChSPre^fni_RvDSPVal·(k>IOtcb5Q)wkD5PHotcli0;IiiwIUw^DSFVale(IcMotchSCut)·kDSP>lotchCutrn^Rv2DSPV^lcUl。tC)iAPreq1■kDSlQtchxrr*9fm_Raw3D5rval8IXNOCOlAQ]·kDSPUotchAQi丨《2DerY丨LBfKMOtchACutllLDSPNotchACutiRasvtAll()jCDSPS^kManagersCDSPS6KHana9r()i£(m_Comm)deletem—Convn··)voidCOSPSekManager;:SetHinVol\ine(longvalue)(doubleEvalue;i£(value>_O)SetRawValue(value,kHainVolume)ι1C(m_RawVals|)cMainVolume■·P一CONTROL·一MAX>m—DiPValstkOSPMAiTiVoluioel■kMftinYc^ume·_elsei£(mJi&wVAlsOcnainVolume■■O>m_DSPV&l8OcDSPKainVolume]-O;else{fvaluQ■m^RawVAlstkHainVoluine};Cvalue卜DSP_CONTROU_MAX;//nomaIixefv&lueVOI^ANGE;_Cvalvefvqlbot;fvalue·(pow(10.,Cvalu)-1·》/(10·-l.1,fvalue··DSP_COMTROL_HAX;m^DSFValstkDSPHainVolunel-《long)·CvaXuc;}SndDSPVdlue(kDSPHainVolume);)voidCDSPS6kMan&gerιsSendDSPValuc{lon^which){longvalue■tn^DSPValsvhich;nt0//transmittedvalueIweporametrvelueintop16bit丨andparameteridentifierinβLSBsvalue-(value&OxFPFFOO)|(whicliCOxFF);ifRivDSPfteCura_epi一xchng24(value》;mwDSPRctum■m_ConTO->SeniDSPWord(value);ffendi£,//changedprotocolaroundtosendindexfollowedbydatacharbu£ferl6};buffer(01■{which16)kOxFF;buffer(1)■{which0)4OxFF;buffer{21·which&OxFF··bufferU9■lvalue16)&OxFF;buffer{41■(valueβ)4OxFP;bufCerfS)■valueIiOxFFjm^DSPReturn·m^Conro-ySendDSPMeroory{buffer,6>;}voidcosFSeiotanagerSetNotchFreg(longlvalue,longwhich){·doublevalue;intdepindex-m一Raw2DSPValswhich)··ii<lvalue>>O)SetRawValue{ivaluc^wliich);value*ConvertFreqRange(Which);value*-cos(IavPi4Value);valueDSP一CONTROL一MAX;m_DSPValsIdspindex)·(long)valvef*SndDSPVlue{dftpindex);SetNoCChQf-ILtwhich+1,whichT;)LEGACYvoidCDSP5$)cMand9cr;SetShelvPreq<longivaluelongwhich)(doublevalue.wc;intdcpindex■mHRaw2D5PVals(which];i£(ivalue>-O)SeCRawvalue(ivalue^which);value·ConvcrtF^eqRange(which);vc_cn_j)iiValuc;value_(tdn(wc/2)-1)/(can(wc/2)^l);value·■DSP_CONTROL_MAX;cn_DSPVal8dspindexl■(long)value;SendOSPVIue(dspindex),·JHendifvoidCDSPS£kHana9rιSetHotcbQ(lon$ivaluerlongwhich,longrawfreq)(doubletbet*qfwe;intdspindex*mMKaw2DSPVa1swhich;i£(lvalue>■O)SetRawValue(ivaXue,which)jvrc_ConvertFrcqR*nge(rawfreq);vc_RieJii4WC/qConvertQRAnsewhich]);tbeta·wc/(2*q);if(tbeta>)tbeca■m_jii/4;beta-(l.-tan(tbeta)J/d.-fCanftbeta));betadsp_controlwmax;oi_DSPValetdepixidex_long》b^ta;SendDSPVaXuefdspindex);}voidCDSPSeicHanagec::SeCBooatCut(longivalue,longwhich){doublevalue;intdspindex■m__Raw2DSPValswhicliJ;if(ivalue>■O)UvaluerMliicb);value_ConvertBooecCutRangotM^RBvVftl(which));valuepowllO.,value);value/■GAIMeSCALE;valueDSPeCONTROL_MAX;ra_DSPValutdspindexJ-(long)value;SendD^PValuc(dspindex);jvoidCDSPseiuianager::SetShelvlfreq(longlvalue)(//SeCShelvFreq(value,KloshelfFreq);doublevalue,wc;if(ν*1υO(shè)>SetKAwVaXue(ivalue,kLoShelCFreq);value*ηRawvals|kU>$hclfFr叫;value/■DSPeCONTROb^KAX;//normalizevaluΓLCKANGE;-valueFLCDOTRAHGE;value鵬ip>w<30.,value)-l,)/(10.-l.);wc·TO^pi^val-ucvalue-<tan<wc/2J-l)/(tn<wc/2j+1VAlueDSP一CONTROL-MAXjmwDSpvIιkhOShe11Freq]_Uong)value;SendOSPVaIue(kLoShe11Frcq);1voidCDSP56kManagei:iiSetShclvi0ooet(longvalue)ISecBoostCut<valueklA>Shel£Gain)··JvoidCDSP56^Mana9er:SetShclv2Freq(lon9lvalue}I//S€t5helvF7cq(v*lue,kHiShelfFreq);doublevalue.wc;it(lvalue_O)SetSlawValue(lvalue^)cHiShel£Fre(;};value■MeRawVals(IcHiShelfPreq];value/■D^PwCONTROLeeHAX;//normalizevalueFHCftANGE2;一value+·FKCB0TRANGE2;value■(pow(10.,value)-1.)/(10.-1.);wc■m_pivalve;valuew(tan(wc/2)-I)/(tan(wc/2)+1)■·valueDSPteCONTROi^MAX;m_T>SPVals[KHiShelfFrcqJ■(long)value;SendDSPValu(KKiShel£Freg);voidiSet5helv2B00SC(longvalue)SeCBoostCut(valuer)cHiSheX£Gaiii>tvoidCDSPSSkManagersSetNocchlFreqvalue)SetNotcbFreq(velue,kMotcUlFre^);voidCD5P56kHaoageriTSetHotctalQ(longvalue)SetNotchQ(value,JcKotchiQfJcHotchlFreq};voidCDSPSSkHanaseri;StQCchlCuc(longvalue)SetBooatCuC{value,kKotchlCut);voidCDSPSGngenxSecNoCchZFrcq(Iongvalue)SetNotchFreq(value.HHotch2Freq);voidCDSPSfiXMandg^r:SeCHocch2Q(longvdlu)SecMotchQ(value,kKoCch2Q,U4ot:ch2Frcq);voidCDSP5fikM0n9errsSCHotch2Cut《long\^etBoostCut(value4kNotch2Cut);voidCDSP56kMangerι:SecHotchSPreq(longdoubleq(I4ntsSetNotchFreq(value,kMQtch9Freq);t■ConvertFreqR%n9e'()dtotch9Freq);q_ConvetcQRangefn一RwVal·IkHotcMGJ>;C-(f/(S.^qT);it{n£<0.)xit-O.;‘■0.&>-109lO(<n£·(10.DJ+U;FBOTRJUIGe;/■(FTOPRANGB-FBOTRAMGB);ntPSP^C0NTR0L_MAX;//normalizew^RawvlIkKotcheFrcql(long)nC;"■fU/(nf>I.)nf1,;■POW(Q£,O-S)i-IoglOi(n£*(10.-1.)}+IOI-βFBOTRAKGB;n£/屬《FTOPKAHG£_fBOTRAHGE);n£霍DSP編CONTROIj一MAX://normalizem^RawVala(kHotchAFreqj_(long)n£;SetNotchFreq(*lLtkNotcheFrq);SetNotchFreq{-1L·,XNotchArreq);voidCOSP56kMana9ertSetNotch3FreqUoii9value)SetNotchFreq(vaXuefkNotch3Freq);mJtawVale|)OtotchSFrcq·ie_RawVaIsHcNoccMFregJ.TOjUwValBkN。tch3Freq"2;SetHotchPreq(-ILrXNotchSFreq);voidCD5P56kManagerSetMoccb3C2<lonsvalue)SetHotchQCvaluerkNotph3QkNotch3FreqJ;voidCDSPS6XManagertτSetKotchJCut(longvalue)SetBoostCuC(vaXuc,kJIotch3Cut\;voidcP$PS<)(Mene9er:(SetMotch^rreq(longvalue)SetHotchFreQ(vlue.Freq);n_twVl·IkNocchSFreq)·|m^RawVl|lv<occh4Prtql-R*wvieIkHocchJFr^qI/2;翥βtNothPrqI-II^kMotchsr丨;voidCD9PS<kKon9eri:SecNocchtQ(l9fi9velue}(SvtNocchQ<vaIuekKotch40.kMotch4Freq);\voidCD5PS6kHangerTSetnotch40Jt(longvalue)CSetBooetcuc(value*kKocch4CuC>;JvoidCDSP5€kNngertSetNotch5Q(longvlu)tSetNotchQ{value4kNOtchSQ,)jtotch5Pccq-JvoidCDSFS(kMn49rf16atNo(hSDooeC<Χο9vlu){ScCBoostCut(value,kNotch&Cut>;)doubleCDPSkHan*g*rιIODCoDvartPreqRBngfl{doublevl.doubletop,doubl·bottom);UnocmftlizeIjyilO--I.);douMeCDSPSeKnanagcrιCon-v^rtFreqRan^UncwhtcJi)Cval■DoConvertPrcqRange(n_RawVal|whicft).FTOPRANOBa.rwmtAnC£3>;IfcopCrcqucncyIso.iwyqui·ν*1/■SAHPLXNOPftCQ/2jfvalDoConvertrreqRangeii^RawVleiwhich3,FTOPKANGEfFBOTRAIIOE);//*qurelogocftletval-fval·Cv*l//convertsQrangetologscale<(dQfinQTOPRANCE2.3S6Ideiine030TRANGE0.037IfdetineQRANQE(QTOPRANGE^QBOTJIANGC)doubleCD5P56kManagriConvertQRange(longival)doubl6val;valival;val/■DSP_C0NTR0L_MAX;//normalizevalQRANGE;ValQ80TRANGE;val■IpowilO.fval)-l.)/(10.-l.);return(val);)//convertsinputvaVuetologgminvalue//MdefineLOGS0.9031KdeCiaeLOGQAIKSCALE<IoglO(GAIN^SCALE))doubleC05P56IcMntgert:ConvertDoostCutRangeUon9ival>{doubleval;v&l·ival;val/■DSP一CONTROL·一MAX··ifnormalizeval■(2.*val*I^GGAXN5aiLE)_LOGGAINSCALErcurn(val);voidCDSPS^kManaser:ιSetRawValue{longvalue,longwhich)valueCt^TR0L_RANGE_SCjin一RAwVdlwhich《value;)longCDSP5€XHanageriiQeCParamVAlue(longwhich)IlongifVAifwhich>aJcJIArrayS)alue·0x4OOOOOLCONTROL_WWGKwSC;ue·mMR8Wale(which}CONTROL·JIAHGE-SC;aIue·0;urn(value)\voidCOSPS^kMana^erιSetParantVlucUonsvalue.Ionwhich)switch(which){caseX>tiCutQff2FrcqSecHlcucorrZFreqivalue)jbreak;casekHiCuto£C2QSeCHiCutoCC2Q{vluc);breaks-casekHlCutoCfFrcqiCN101883304A㈣明51/168頁(yè)SctHiCuCOf£P(guān)rq(value);break;casekKiCatoCEOSetHiCutoCfQ(value);bcakgcaseicLOCucoffFreqSetLoCutofEFrcq^value);break.;caseKboCutoffQ:SetboCucoCfQCvalue);break;casekBypasstSeCBypass(value);break;caseKDDXC0(nf}8yps;SetDDXCompB/pass(velue):break;case)cKDCDaypasesSetHPCOBypASK(value);break;casekUtX^GainScaleOt£SetHOCDOaLnSca1e(vaIue);breaks-caseJcAnalogVoIume;SetAnalogVolume(value);break;caseXHainVolumetSetMaiikVolumc(value);break;casekPreVclunetSetPreVolutne(value);break;caseklosheltPrqiSetShelvlreq(value);break;caseIcHlShelCFreq$etShelv2Freq(vlue);&·kHotcheCutrSetBooecCut(valueSetBoostCut(VAluefbreak.;IcNotcblCuCιwhich)ιkflotcnACut);ifsamevalueforbothnotcheskNotcMCutιC^oekHotch5Cut:caaekHotch£Cutιcsetc^otcb*7CuCicase)d^o5hel£Gin!case)ciSbOl£GlniSetBoostCut(ValuevWhlch);break;caee3cHotc)i9Cutm^DSPVilelXDSPHotchiCutJ■O;//fixednotchvalueiXDSPNotcbSCut);break;caseXHotcMFreq;SetNotchSFreq(value);brc)cjcaeeJclIotchIFreqr5etNQtch4Preq(valve}break;casekNotch9Freq:SetMotch9Freq<value>;break;kHotchlFteq;kHoCCAiFreqtk>lotchSPreqιX>iotcnFzeqιkKoCch7PreqiMllpaseFreq53caseJcNocchirrqcasekMotch2Freq:DoConvetCFrcqRange(vaIue,FTOPRANCe.FBOTRANGC)jfvalueIoglDtiivalve*·<10,-ι.))+X.);FB0TRANGE3;(FT0PRANG£3-rB0TRANCE3);>1.011.0;.fvalue·■OSP_CONTROU_MAX;.//normalizevalue*(lon^)fvdlue;break;//increasedlowfraquencyKHiShelIFreqifvalu-DoConvertFreqRange(value,FHCTOPRANGE,fhCBOTRANGE)-logicU£vlue·(10.-1.))+1.);—PHCB0TRANGE2;(FHCTOPRANCE-FHCBOTRANGE2);1ΠCvelue>1.0)fvalue1.0;fvftlue·-DSPeCONTROL^MAXjUnormalizevalue■(2ong|fvalue;breaX;caseJcHiCutoffFreqrfvalue-DoconvercrrcqRange(value,FMCTOPRANGE,FHCBCTTR>NGE);Cvalue*麵SAMPLIWC_FREQ/2;,fvalue■loglO((ivliue*(10.-1.H+1.);rvalueFHCB0TRANGE3;fvalue/■(FHCTOPRANCB3-FHCBOTRA)*GE3);if<fv*lue>1.0}Rvalue■10;Cvalue··DSPeCONTROL一HAX;//norroalizevalue,(long)Cvalve;break;)jelseif(fileversion·IL)8wicch(index)cackKotchlFceq;kKotch2PreqmDoConvrtFteqRangc(value,FT0PRjWiGE2,FB0TRANCE2)jfvelueSAHPLlNG_FR£Q/2;■logioMfvaIue*110.-1-)>+1-)FBOTKANGB3;fm<rrOPRANGE3-FBQTRAGC3>tfvalue>1*0)fvalue-1.0;fvalueDSP^COHTROI^MAX//normalizevalue-(long)fvalue;break;aeekLoCutoftFreqCvalueDoConvtrtFreqRange(value,FMrrOPRAWGB,FLCBOtraNGB);·■SAMPLlWG_FREQ/2ilogl0((£vllu·(IO--Lj)*1-1-·FLCBOTJUWGE2;Cv^lue/(PlXTTOPRAHOEa-FWTBOTRANGKl);if(fvalue>1.0}_1-0;DSp_cohtaol_max;//normalize(long)Xvaue,·break;)CHiCUCoff2rrcqDoConvertPreql^nge(value,FTOPRANOe,FBOTRANCE);SAMPLING一FREQ/2·-fvluloslO((£value·(10.-1J)t1.);£vlue··FHC2B0T;£vX-ue/;FKC2TOP-FHCiBOTJjif(55))£valueDsP^CONTROLweMWC;//normalizevalue*{long>£value;brak;fvalue譯DoConvertFreqRange‘value,FHCTOPRANGE·FHCBOTRANGE2),fvalue·■5AMPLINQ_FREQ/2;Cvalue■IoglO((fvllue·(10.-1.))令l.)£valuePHCB0TRANGE3;Cvalue/m(FHCT0PBAHCE3-FHCBOTRAiIGEJ);i£{£value>1.0)CVAlue·1.0;CvalueDSP^COKTROL^MAX;//normalizevalue■(long)break;aKAwVal蘑indexjmvalue;J//tellDSPotchangesCorζ·οιi<kUiArrySizιi++){&i);;)m^DSPValeiKDSPBypassHaok]_w_KawVAl6IKBypaeRK^ekl;Sn<3DSPValue(kcsPBypassMask)}voidCDSPS6XhanagerssGetD$PSettJLngs(CStringArray{array)chareuooo)jintirindex;intj■o;CStringest//wricstr_array.SeCAsprlntf(sarr&y.SetAcstr”·VISION·.5tA<sofaxonlyversionnunber)Grov:GrowDATA·Orow£or(j++,cscr);ILEMVER$ION>;j++.s);j++,cstrj··kUXArraySize;i++)ndexkUlArraySlstt*l*i;£(indexIcSypase>continuef£(index·_kUDCOBypas·)continue;tiindex·■lcHDCDGadnScaacOff)continue;£(Lodex)cAa.logIa)continuej/μη7/X4/99AddedvalueinhumanreadableformGotStringValu^Undex^cetr)jsprintf(e#"I%a^e-.m^ParaiiWameafincJexJ,cetr);ray-SetAtGrowIjs);spriiiCC(8,"IclNcoxtx^.indeXiio^RawVele(index));array.SetAtGrowli++,·>·convnentvoidCOSPSfikHana^eriGetPilterBlobCCStringArray4.array)charβ(1OOOJιintparam;intj-o;cstringcstnfloatν;nuinber//cetr■mMVERSION-;//array.SetAtGrowtj++.cstr);eprint€<e·aiiOa^FIiE^VERSION)array.SetACGrows);ΠoutputdelayP*ram_JcDela/;GetPure£trin9Value(par*#cstr)jscan£(cstr,"%ftv);if(νi_ParamNam8|ρβ"·πι:StAtGrow<j++,cstr);-W-.BLOC^DGUAY);SetAtGrow(j++f"sjnImiSetAtGrow+cstr);eStringVslue(param.cstr)_SetAtGrowcstr);1//outputpre-gainparani_JcPreVolume;//cstrm—P^kSTAinM塞pazr&ml··//array.SetAtQrov(j++#cvtx);sprintfwIdefBLOCKvGATN);SetAtGxOWIjt*,β/-·1·j.SetAtGrowfcetr);GetPuxeStringVal\ie(pftraiQTcstr);array.SetAtGrow(j+t,cetr)j//lo-shelfif(IGeCBypaBfiSectionOcSypa丨sLoshelf})(//cstr■"Low-Shclf"j//array*SetAtGrov^jf+,cstr);fiprincf(S,m^fBlJOCKJLS);array.SetAtGrow(j++rs);cstr-·2·;array.5etAtGrow(jcstr);GetPureStringValue(IcZoSbelCFreqfcetr)jarray.SetAtGrow(j^+,cstr;GetPurStriY>gVaue(IcLoShclfGain^CStr)jarray.SctAtGrow(j+,cstr)t//hi-fihclf1OetBypassSeccioa(kBypaasHiShelf)){////Btr·"High-ShclC*;array.SetAtGsowcscr);sprint£{b,“de,BLOCK_HSl;array.SetAtGcovi(}+1rb);cstr■"2";array,^etAtOrow(j.cstr);GetPureScringValueiXHiSbelfPreq.c&cr),array.SetAtGrow+>rcfttr)f-GetPureStringValue(IcHtSbelEGaln,cstr);array.SetACGrcw<j44·,cstr);//lowpeakingcutoffif(IGetBypAesScction(KBypaesHipaseJstr"LowCutoff";rray.SeCAtGrowU4#cetr)intf(g,BLOCKeHP)··γ.5CAtCrow(jt-fλ)ir-m2";ay.SecAtGrow(j+,cocr>;PureSCringVelue(KLoCutoCfF^cq.Ciarray·SecAcGrow(j,ctr);GetPurcStringValue(kLoCuCo££Q,cstr);array.StAtGrow<j4cstr);)"highpcaXlngcutoffHii£(!GeCBypssSection(kBypa9Lopd8s))iifcstr■tlHighCutoff";//array,SecAtGrow(jcstr);sprintf(β,Ud-,SLOCK_LP)jarray.SetAtGrows);CUtt*·2·:array.SetAtGrow(j>+,cstr);GecPurcStringValu(kKiCuco££Freq,cstr):array.SetACGrow(j4-t,cstr)*·GetPureStringValue(kHiCufcoffQ#ciCr);array.SetAtGrow(*4cstr);ifhighpeakingcutof£12!CetBypaseSection(kBypassNLopass)){////cscr-"Highcucoff#2";arrAy.SetAtGrow(jcetr);Bprintf(*,%d',BLOCK_LP2);array.SetACGrow(j,s};cstr■"2";arxa/.SctAtGrow{j,cecr);GecPureStringVAlueOcHiCutoff2Freq,cstr);array.SetAtGrowceCr);GetPureStrlngvalueIJcHicutoff2Q,cetr);array,SetAtGrow(j.cstr);//resonancecoopffl!Qet;Bypaβs$ction(k9ypaesKotha))////cstr■"ParametricEQ_;array.SeCAtGrovr(jcstr);sprinti(β.eIderBLOCKePfiQ);SetACGrowft);.SetAtGrowcstr)jOetPureStringV^lue(hHotchlFreq,cstr);array.SetAtGrow(j+Vβcetr);OetPureStringVAlue(kNotchl<^cKtr》;array·SetAtGrow(j++,ccr);OetPureStringValue(kKotcbXCut,ctr);array.SetAtGrow(j,cetr);//resonanceconip·2if(ICetBypAssSection(kBypas8Hotch2))(//cetr_"parametricEQ·;//array.SetAtQrow<j+#catr);eprint£(OfBLOCK一PEQJ;array.SetACGrow(j+,s);cstrμ"3"jarra/.SetAtGrowcetr>;GetPureStrin^Value(kNotch2Fteqrcstr)array.SetAtCrov(jcstr);Cet^ureSCringVAlue(kNotch3Qcstr);array.SetAtGrow(jcstr);0CPurescringVlue(kNocch2Cutfcstr)1array.5ecAtGrow(j+fcscr);//rceonancecomp舞3if{ICeCB/passSection(kBypas0N0Cch3>)<//cscr■^paratnecricEQ";"http://array.SeCACGrow(j++,cstrj;printfIsieIdwiBLOCK^PEQ);rrdy.SetAcGrow(j+i-rs);stxβ-3";rray.SetACGrow(jcstr];CetPureStringValue(kWotchiFrcq,cetr)jay.SetAtGrowIj++,cstrj;GecPureSCringValuetkNotch^Q^cstr};rray.SetAtGrow小cstr);GetPure$tringVIue(kKotch6Cut.cstr);ay.SetAtGrow(j4-,cfitr);//resonancecorap04if(lCetBypassSection1(Bypas6Notch4)){//cstr■"ParametricEQ*://array.SctAtCrow(j++,c&cr);sprintf<erm\dmtBLOCK^PEQ);array.SetAtOrowlj++,s);cetr■"3";arr*y-SetAtcrow(〕·,cscr);GetPureSttingVa1uc(kHoCch7Freqfcetr);array-SetAtGrov(j,cstr);GetPureSCriii9V4lue(kNotcb7Qrc8tr)jαrray.sitACCrov(j++,cstr)··GetPureStrXngVAIue(kMotch7Cut,cstr);array.SetAtGcow(jpcsti:)j]//conccryif{!OeCB/passSection(IcBypassConecry)]{//cstr·"parametricEQ·;//array.SetAtGrowcstr);“**!'1,BJLOCKePEQ)frray.SetAtGrow(j+·.,e);cetr_"3";Array.SetAtGrov{j-··*·,cstii);GetPureStriz^gValue()cKotch3Freqvcstr)jarray·SctACGrow(j++fcstr);GtE^ixeStringVlu·OcNoCch3Q,cscr);array.SetAtGrow(i++#cstr);GetPureStringValue(kNotchSCut,ctr);array.SetXtGrow(j-+(c丨tarl;//cetr-ιaPAraBMCricZQm;//array.SetAtOrcwij(ever);eprint£(B#BLOCKtaPEQ);.SetAtGrotf(j·+,;-SetAtOrowij++,C5Cr);GetPurestringVaIueOcMotch4Freq.cetr)\array.SetAtGrow(j+,cstr);GetPure5trlngV*lu;arr*y.SetAtGrow<j4+,cstr);GctPurcscringValuecetr);array·SetAtOrQw(j+cscr>jifUarray,SCCAtiGrowlj",cetr);Bprint£(B,"*d#BLOCK_PEQJ;array,SetAtGrowij++,β);rray.SetAtGrow{j+夸,cstr)\G^CPureScringValue(knoay.SotAtOrow(j++GetPurcStringVlu<kNoay.SetAtOrow(jCecpure8cringv*lue<kKoay.SetACOrow(^lChSFreqrCBCr);tr);ch50.cscr};tr);chSCut.cstr);tr);if(JGccBypassScctioofkBypassAllpass》)//cstr■"ParametricEQ";Harray.StACGrow(j+■*·,cstr):cprintf<s,”、d_,BLOCK■一AP);.SctAtGrov(j++,β);■"2";.SetAtOrowtj^+,cstr)tGetPureStringValue(kAllpassPreq.cscr);array.SetAtQrow(j-f-f,cstr);GecPureStringValue(kAllpssQrcstr);array.SetAtGrow(j++,cstr);//double-tunednotchIGetBypesaScction(kaypassDBNotch)){//csCr■"ParametricEQ*;//array.SetAtCrowlj++,cstr"eprintC(sr"IdefBLOCKwPEQ);array,SetAtGrovrIj+·θ);cstr■·3·;arraySetAtGrow(),cstr);OeCPureSl^ringValue(XKotch8Freq.cstr);array.SeCACGrow<j--#cstr);GetPureStrlngValuc(kNotcbSQ,cstr);arr^y,SetAtGrow(j,cstr}··GetPureStariiigV&lxieOcNotchflCut^CStir;array.SetAtGrow(j++,cetr);//cstrβ"ParametricBQ";//array.SetAtGrowj++,cstr);sprintf(,■%d·BLOCKwPEQi;arra/·SetAtGrow(j-f-t-,6);cscr■*3";array.SetAtGrow{j<ffcetr>ιGetPureStrisgValue<)cNaCch9Freq#cstr)·■ατχΑ/.SetAtOrowtj++rcstr)··Cet:PuceScringVAlue<XMotch9Q,cstr);array■SetAtGrov(j++,cstr);OeCPureStringValue<XNotchsCutrcsCr)jarray.SetACGrow(j-I->cstr);//cstr_"ParametricEQ*;//array,StAtGrow(j++,cetr);epriatf_%d_·BLOCKePSQ)|array.SetAtGrow(j++,·);cetr·3·array.SetAtorotf(j+fcetr};GetPureStriosValuc(UiotchAFreq,cetr);array.SeCAtGrow(j,cstr);GtFur5tringValue(kNotchAQ*cetr);array.SetAtGrow(jcstr);GecPurscringVlue(kNotchACut,cstr);arr&y.SetJVCGrow(j4+,cetr);}//outputpoat-gainparam_XHainVolurae;//CBCr·m^ParamNames(param);//array.SeCAtGrow(j,cstr);eprintf(>,·*<!".BLOCKwGAIKi;array-.SetAtGx-ow(s)jcfttr_·1·;array.SetAtGrow(j4+(cstr);CetPureStringVAlue(parcim,cetr),array.SecAtGrow(j,cstr);60voidCDSP5CkManagcrιSetPreVolume<longvalue)if<value>O)SecRawValue(valuedPreVoIuoe);ifI<n_RawValsIlcPreVolume]·DSP一CONTROL-MAX)ra_DSPVale[kOSPPreVolume]_-to一RawVal丨JcPreVolumel;elseIC(mMRawVals(kPreVolU(nclO,)mDSPVaXs(KDSPPreVolume)■O;fIue■m^RawVdlsIkPreVolume);CvaXue/■DSP_COMTROL_KAX;“normalizeCvtlue··VOLRANGS;£valueVOLBOTifvalue■(pow(iowfvalue)-1.)/ο.-l.);Cvalue*·DSPeCONTROLeMAX;m_DSPVala(kDSPPreVoXuni]-(long)-fvalue;)一SendDSPVaXuc(XDSPPreVolume);ivoidCDSP56)cAaiiager::SetAnalogVoluine(longvalue;{doublefvalue;if(valueO)SeCRawVaXue(value,)^alo9Volume);if(TOjUwValsikAnalogVoiumel--DSP-CONTROLJlAX)Acuao^voU■_m一RawVAletkAn瀛logVolume:elseif(fkAnalogVolume]OJmtaDSPVle[kDSPAnalogVoll■O:elset)■m_RawValfkAnalogVolume);/5SP_CONTROL_MAX;//nozmalixc*VOLRANGE;VOLBOTj嗎(pow{10fVluel-X.)/C10.-l.);*DSP一CONTROL-MAX:.DSPValeIXDSAoalogVol(long)-fvalve;SendPSPValue(XDSPAnalogVol)jvoidCDSP561cManagr3tSetBypassClongvaluedif(value>-O)SetRawValue(value,kBypase);iC(m_RawVale(kBypaeeJIIkDSPBypassl-0x7FFFFFjelsem^DSPValoIkOSP^ypaesJ-O;SendOSPVAlue(kD5PBypasa);voidCDSPSGkManagerSetLoCucoffFreq(Ion^value)(i£《vUvx>O>SetftawValue<valu,kI^oCuto££P(guān)req);SetLoCUtoCfO;voidCDSP5SkHana^er<;SetLoCUtoffQ(longvalue)if(value>mO)SetKsvrValue(value,JcLoCutoffQ);SctLoCutoff();voidCDSPS6Kflandgert:SecHiCucoffFreq<Xon9value)itIvalue>O)S^tRavValueCvaluefXHicutoffFreq);SeCHiCutoCfO;voidCDSP5CkHanager:2SetKiCuto££Q(Xongif<value>■O)SetRawValue(value4kHiCatoffQ);SetKiCutoffO;voidCP5PS6KMna9er;$etHiCuto££3Freq(longvalue)if(value>*O>SetRawValue(value.kHiCutof£2Freq)iSetHiCuco£f2();voidCDSPS6kManegeri:5eCHiCut:off2Q(longvalue)i£{value>mO)StRawVAlue(value,XHiCiiCOff2Q);SetHiCutofC2();voidCDSP5^kManagert^SetHiCutoCEOqm_RawVls(kUiCutOffQ)ιq/·DSPeiCONTROii^KAX;//normaliseqQLCRKNGE;*qQLCBOTRANGE;qfpow(lOwq)-l.)/(10.-l.);if(q>■)f■ni_RewValeIlcHiCutoffPreql;/·DSP一CONTROLJlAX;//dornialiiePHCRU^0B2;一PKCBOTRAMGEj;■(POW<10..£>-1,)/(10--X.>·/■DOC0nvertFreqaagc(—RdWVaie(WiiCutoiCFrcqi_FHCTOPANG£3,FHCBOTRANGB3);f·SAMPLING_FREQ/2;—2,+ein(~em^i/2.);2.1.-qTO_DSPVale)cDSPHiCutoffA2l■(lon^)(2·OSP,COWTROL_MAX/2.),·SendDSFVaXue(kDSPHiCutofCA2>;m一l>SPV*let)cDSPHiCutOAl■Uong)(1*DSPCONTROL_MAX/2.)jSendDSPValue(kDSPKiCutcffAl);mHDSPVal()cOSPHiCutoCfScle)■(long)<b0*OSP_CONTnoi/_MAX/16.};SndDSPVadue(kDSPUiCutof£5cale);}voidC0SPS6)J1angerx:SeCHlCutoCf2(){double£rq;doubleala2b0;double^amnm,btaIambdaralpha;q·DSP^CCWTROLJIAX-ra^RawValBkHiCutoC£2QJ//q/·DS一COHTRoE-MAXi_//q·■<QHC2TOP-QHC2BCTJ;qQKC3BOT;q*tpow(10,(q)·1,J/(10.-1.);//f-ConvertFreqEUnge<3cHiCotof£2Frq);f-DoConvertFrcqlUnse{nJUWVale)cHiCutoff2Freqlf/■SAHPLINGhFJIEQ/2;-gamma■-cob(£*injpi);beca·(1.·ia(f*nijpA/(3*q)))/(l.+ein^tf^jpi/(2*q))>fi£(beta>2.0)beta*2.0;lambda胃4.*beta*{gamma/(1.4beCa));1C(lambda>2.0)lambda2.0;alphftl·+beta+XtMa;a2_beta;oX·tmbda;mJ5SE>Vai8UiDSP2KiCutoffA2■(long)(a2*OSPeCONTROtuMAX/2.);sendDSPValue《kDSP2HiCutoffA2>;m_DSPValetXD$P2KiCutof£AlJ■<Xong)<al*DSP_CONTROL·一MAX/3·;SendDSPValue<kPSP2HiCutoffAl);m_DSPVale‘kDSP2HiCutoffScale_(long)(bO·DSPeCONTROL^MAX/1€.);SendOSPVlue<kDSP2HiCuto££ScaXe>jvoidCDSPS^kManagenSetboCutottUdoublefscalewCcCor;normalize,FHC^TOP,rHC2BOT>;63m_RawValsULoCuto"Q3;■Osp_CC5NTROL__iiax;Πnormalize■QlrfCRANGE;"“QLCSOTftANCE;(pow(10.rq)·1./(10.-1.)Jq>-1.-0-99999;tn^RAviValsIkI^CutoffFreq);DSP_CONTROL_MAX;//normalize_(FLCTOPRANC-FLCBOTRA>ICE2)··■SAMPLING一FREQ/2;**▲_J_M·一一1/ηΛ·OAIkιI-IH/*tiiC(£1.)0.99999;scale^faccor-(^,-2.f)/4.jTO_DSPVal8kDSPLoCutoffFcl■(long》Cf·DSP—CONTROL·一KAX>;SendDSPValuc(kDSLoCutoC£rc);m.DSPVals(kOSPLoCuCoCfQc)■(long).(q*DSP_CONTROI-_MAX);SemlOSPValue(kDSPLoCutoffQc)jm_DSPVals{kDSPLoCutoffScale)·<long)(-0.5*cale_factor*DSP_CONTROL_MWC);SendDSPV*lueUDSPLoCuCo£fScaXe);]voidCDSP56kKanagert:SetODXConpBypaesUon9value){i£(value>*O)SetIUwValue(v^lue,kDDXCompBypass);if(這WalsIkDDXCocc^BypAe^J)TOwDSPVaI^[kDSPODXCcmpBypaes}Ox^FFFFFclttein一DSPValskDSPDDXConq>BypaeJOiSeodDSPValuc(kD5PDDXCocnpBypAsβ);}voidCDSP55kMana9eriiSetKDCDBypass(Xcngvalue){if(value>■O)SetRaWalue<value.ScHDCDaypass>;if(mJUwVale|kHDCOB>rpaee>ra—DSPValsIkDSPHDCDBypdSe■0X7FFFTF;elsem一DSPVeilslkDSPKDCDBypaes-OjSendDSFValue(XDSPKDCD&ypaflft);)voidCDSPS^kManager:.SetKDCDQAinSc&le(longvalue)if(valueO}SetRWalue(value,KHDCDGainSc&leOff);if(ra_RawVBlkHDCDCBiiiSC&leOt£}m一DipVAletkDSPHDCDOainScaleOffl0x7FFFFF;el8em一DSPValeiJcDSPHOCDGainScaleOffJ零O;SendOSPValueOcDSPHDCDGainScaleOff);)voidCDSPS6hHnd9ertReeetAlK^{£or<i■O;i<IcUIArraySize;){mRawVals(iJmOX^oooool;Γfor(i-O;i<kDSPArraySize;!+)ImD5PVa2(i)·q;廣m_RawVals(kAnalogVolume]·OxflOOOOOL;m~RBvvals(KHainVolvm)■OxSOOOOOLrm~RawVl*(kPrevolume)■οχβοοοο^'.-m^RawValsIkBypvse)·>OxOOOOOOL;m^RsvfVAlsikHDCGSypassi-Oxoooodol;m_RavrVaX&IkDDXCCMnpB/pass)■OxOOOOOOIt;n~RwVls(kXDCDGinSCAleOf£)_OXOOOOOOL;n^RavVals(IcAnalogIn)OXOO^OOOL;tn^RftW&lstkDelay)■OxOOOOOOl·;m一RawV攏IsDcKiCutoff2Frcq■Ox^OOOOOL·;m~IUwVals(kKiCuto££20)Ox200000L;η二RevValeHcHiCUtoffPreqI·Ox600000L;n:!UWValeOcHiCutoffQ-0x2000001#;Ri=RewvalstiaoCutoffFrcq]麵0X40000IoCkLoCutof£Q!■QX200000L;InwDSPRetvmo;fQzii*O;i<kUXArrySise;U+)SetPararoValue(·1,i);)UwDSPValsCKDSPBypassMaslc]■m^RawVal(keypaesMaek]ObrSendOSPValue(U>SPBypesHae)ajvoidsSetNoCcheFreqflcngvalue)SetMotchFre^(vluef)cNotch6Freq>;voidCDSPS^kHanager:sSetNotch^QdongVAlue》StKoccbQ<value.fcNotch豸G·妨otcb系Preq)/voidCDSiSCkHanageritGetNotchCCutUongvalue)SetBooetCUt《vauft,)eMotch6Cut>;voidCDSPS^kKai-iagersSetNOCch^Freq(longvalu)5etNotchFreq(value,)cNotchPreq);voidCDSPSGkHanager::SetNotch70(loii9value)SetNotchQ(value.fcNotch70.kNotch7Freq)svoidCDSPSGkManager<StNocch7Cut(longvalue)ISetBoostCut(vluekNotcK7Cuc);intCDSPS6kManagerGetHDCOModeOHSetPartimVeIue{·J,kNainVolutne)tHreturn(ra一DSPHeturn);return(m—Comti-GetDtectStAte);}voidCDSPS^kManagerι:SetAnalogInput(longvalue){if(value>O>SetRavValue(value,kAnalogin)\i£imJlawValfiIkAnalogln>n_D5Val8IkDSPAnAlogln]■0x7FFFFFfelem一DS£>Val8kDSPAnalogln·0;SendDSPValUC(kDSPAiuilogln)?)BOOLCDSPSSkHanagersIeReady(){return!m_Coram->Cbec)cState{)>;}voidCDSP5G)cManager;:GecPureStrlngValve(intwhich,CStringtstr){intcount;GetStringVaXue(WbiclirBtc);etr,TrieiLeftO;count*str.Fiod(1')yiffcount>·O)scrstr.LeCt(count);)voidCDSPS^kHanaget::GeCStrlngValue(incWhichiCStringtatr)casekAnalogVolumecasekMainVolumetcase)cPreVoluu\e>valuesRaWValeIwhichvalue/·DSP^CCMiTROL^HAX;value20*loglO<vlue);sprintC<cvMtX0.2£dB*,value>;casekMiCutofCFreqi/·V^lue狐(which);valueADSP=CONTROLJiAX;//normalizevalue*FHCRAG53;"“iprintf(sak;.kLoCutQ£CFreqvalue糖m_RawVilsJcLoCutoffPreq<,ue/DSPjCOWTROTieMAX;//normalizevalue(PXiETOPRAKGia-FLCBOTRANGM);value4FLCBOTRA^GE2i■<pow(l0.,vlue)-1,)/{10.-1.);iprintffs,"%10.2fHs■,value);ueFHCBOTRICE2;ue■<pow(10.,value)-λ·)/<10.-1·>:ueSAMPLXNOJFREQ/2;*/ue·DoConvert7rqRngtm一RewValsIkHiCutoi£Freq,F(xiàn)HCTOPRANGE3,FHCBOTRAWCJE3Jintf(8,tl0.2fHz·,value)7ak;kHiCuco£f2Q;ue■DS一CONTROL·一MAX-ue/rnDSPmCOHTSLOhmMX;ue·■QHC2TOP-QHC3BOX;υβQHC2B0T;υ<·(pow<10.,value)-incC(β·w%10.2f*tvalue)m^RawValsCkHiCutoff2Q)//normalizeO/UO.aK;kHiCutoCCO!■n^RawVAls(kHiCutof£Q];ue/rnDSPeCONTROLeHAX;//πθΠναζβ·■QLCAANGS;·!QLCDOTRAKQSjt-(pow(10.#vlue)-l.)/(10.-l.);rlue>1,)-110.value)jak;kU>C\itoffQ■QvRawVals(kLoCutoffQj;/-5sP一CONTROL-WAX;“normalise‘”QLCRANQE;一*mQLCSOTRANGE;Ipow(10.,value}-1.)/{10.-1.);aIue1.)ue_O.99999;intf(β,ι'%Io.^^^v*le);-s;sik;klx>Shl£Freque■πι一Rawv&lekLoShelfpreq];Osy^COMTROUJWXiIJ麵FLCRAN6E;“FLCBOTRAHOT;ι_(pow(10.,value)-1.>/(10.-1.);!嗎SAMPLING一FRCQ/2;itf(s,-%10.2fHi",value);s;αΧ;kHiShelCFreqiue*ju/cDSP_C0NTR0twHAX;//normalizeueFHCBOTBASGB2;ue(pow{10.,valut:》·/tl<>·-1·>ucSAPLIN0_FREQ/2;irtfHi·,value);kMoCchlCut:JciJoceh2CUCιJtNotchJCutI0(0tch40icι)o4occh$cuts67aseKNc^chGCut;aseIC3otch7CuCiaseKNoCCheCuC;asekUotch9CutsekHotchACutaekLoShelfGainasekKiShclCGainvalue·20*ConvertBoostCutRangc<π一RawValsEwhichJ),sprintfβ,·%10.2£dB,value);StC_S;break;sekWotchlFreqase)uiotch2Freq;aseknotch3FreqtasekNotch4FreqasekNotchSFreqiakNotchfiFreqs■eekMotch7Freqsee}cMotch8FreqTavckWotchSFreqiase)cHocchAFrιaseIcAlXpassFreqtvalue■ConvertFreqRAnge(which);value·-SAMLIKe_FREQ/2;eprintf(Ar;aseJcHiCiutoe£2Freqcvalue_DoConvertFreqRangeim—ReiwVelafXHiCutoffaFrcq,F(xiàn)HC2T0P,FHC2B0T),sprintfm\10.2tHz,valuc)7scra;casekHQCchlQcasekNotch2Q:caselcNotch3QtcasekMotch4QcaseknocchSQtcasekMotch6QιcaskNotchTgιcasekKotcheQ:cafiekNotch9QcasekMotchAQcasekAllpassQ:vdlueCoavcrtQRange(m一RaWValBIvhicliJjspfintfie,10.2£*value);strs;break:c&fiekOelaytvalue·which;valuefrnKsp一CONTROL一ΜΛΧ;value·■DELAY^LSXTTU;value卜SAKPlInG_FREQ;value·■IOOD.;sprincf(6rM%10.2fmS",value);etr■s;break;de£a\]ltstr-"fixed";break;ιBOOLCOSP56kHanger:IsBusyO{^IgTransmittlngO)<voidCDSPSekHanager;:SCBypassSecclontBOOLvalue,intwhich)Ilongmask“l(fā)l><<which;if(value){mRawValsIkBypassHask)|·nusk;)“mask-masX;mRawValsIkBypassMeskmask;J一m_DSPVAls(kD5PBypassMask)·m_JlawVas[kBypassWasJtSendOSPValue(VOSPBypassMaslc);}BOOLCDSPS6kManager:GecBypassSeccion(intwhich)longmaskIL<<which;recum<(m_RawV&Xs(IcBypttssHask)bmask)I■0);)voidCDSPSfkManagerSetDelaiy(longvalue{iffVftlue>m0)SetRawVftlue{value,kDelay);π一DSPV&l丨)cDSPOela>Jm_Rawvale(HDelayJ;SendDSPValue(kOSPDelay);}UτοnunIl^iaInVolumerkboShelfPreq,kLo5helCCin4KJUshelfFreq,mShelCGain,kNotchirreq.icNotchlO.kNotchlCut.U4ot;ch2FreqtJeiotch2Q#kWotch2Cut.kN0tch3Fccq,kNotch3CutrkNocch4FxeqlkNotch40fkNoCch<Cut,kKotchSFreq.U4occh50.kKotchSCut,IcTreVoluinerIcBypasB,)cLoCuto££Freq,kLoCutoffQ,kHiCutoffFreq,JcHiCutoffQ#kHDCDBypasevkHDCDGainScaleOfC,kDDXCotrpBypass,kotch6FreqkNOCCh^Q,kHotch^CutkKotch7Freq,kNotch7QfJcNoCch7Cutr^nalogInlkAna1ogVoIume,kE>elay,kAllpassFreqkAllpasgQ,kBypasshiask,kHiCutc£f3Freq,kHiCutoff2Q#kNoCchePreq,KNotchSQlkNotchecut.k^otchsPre^i·kNotchSQ,)LNOt:ch9Cut:4JcNOtchAFc^'IoNotChAQfJtNOtchACUteJcDBHotChHidkhtfde£ineIcUIArraySice(JcDBNotchWidth+l)orphanedcontrolIDedededededcdedddeineKNotch^Freq(10000+20ineKKOtChtiQ(10000·*inekNotcli6Boo9t{10000-inekNotchlPreq<10000+2ineKNotcIHQ(10000+inekNotchlBoost<10000inekLoShel£2Freq(10000·inekLK3Shcl£26oost(1000Φ+2)inekKlShoIfSFreq(10000+28)inckHiShelf28QOet<10000^29)70//OSPIDsenufo(kDSPKainVolume.kDSPLoShelfFreq.kDSPLoShelfGain^KOSPHi^helCFreq,kDSPHiShelCGain,kDSPHotchlFreq,kDSNoCChlOKDSPHotchlCut,kDSPHoCch2Freq,kDSPHoCCh20.kDSPNotch2Cut^kDSPMoCch3Pxeq,kOSPMoCch3QkDSPH0Cch3OiC#kDSPKoCch4Fr<i,kDSPNotch4Q,JtDSPMotchiCUti)c05PNorch5Q,kDSPNotchSCut,kDSPPreVolune,kDSPByp&se_kDSPLoCutoffSCale,kD5PLoCuto££Fc,)cOSPLoCuto£fQC#kDSPUiOito££Scftle,KD5PHiCutof£A2,kDSPHiCuto£CAlkOSPHDCOBypase.kDSPHDCDGaiiiScaleOCC.IcDSPDDXC<mpBypass.JcDSPHotch6Freq,lcOSPHotcb6Q,kDSFMotCh6Cut4kDSPNotch7Freq·kDSPNotch7QfkD5PMotch7CutikDSPAnalodln,kDSPAnalogVbl,kDSPBypaseMaeX.^DSPDelayikDSPAllpaseFreq,IcDSPAllpaeeQ4kDSP2KiCutoffScale,JcD£P(guān)2HiCutoefA3vkOSP2HiCuto£tAl,kOSPMotchftPreq*XDSPMotch&Q,kDSPKotCheCut,kDSI>Hotch9Q,XDSPNOtChSCut,kDSPNotchAFreq,kDSPttotchAQlkOSPMotchACutVdeCinekDSPArraySizeOcdSPNOtchACut+l)//bitdefirticionsforJtDSPBypaaeMaeJtaboveemim{kBypassNotchl,kBypaseNotch2.kBypassKotch3.kBypaed^otc))^JcBypAeaHipass.kBypAasLopftfto.kBypaeeU>shelf,λΒ/pAfisKiShelf,kByp暴ssC。necry,kBypaseAllpasa,KBypa丨sOQHotch·kBypAesNLop^ss#if!defined(AFXDBNOTCHlCC3C5_l4D9^11D3^ffGEE_006097COB9E2一INCLUDED^)defineΑΓΧ_ΟΒΝθΤ_Η_.24σΞ35_1405~111)3_96ΕΕ_Οθ60700Β9Ε2—rMCLUDED_KendiS//_SC_VER>-iooo//DBKocch.hheader£ilItclassCTabDialog;if""…!"""tUf"""tU·"""""""""“""""""""""""",//CDBKotchdialogclassCOBMotchζpublicCPropertyPage(DEClAREwDV)4CREATB(CDBKotch)//conscructionpublicsCDBNoCchO;-CDBNotchUt//OialogData//{(APX^DATA(CDBNOtch)enum{ZDD■IDD一PPll);CButtonm^Bypass;csiiderccrltn^CompCainSlidor;CS3IderCtrlm二CotnpQSliaerjCSliaerCtclm^QSlider;CSlWerCCXinTFreqSXiaer;//}1AFX-DATA//Overrides//ClaesWizardgeneratevirtualfunctionoverride*//{{AFXeVIRTUAL{CDBHotCh).protectedιvirtualvoidDoDataExchange(CDataExcbange*pDX);//DDX/DDVeupp^rt//))AFX一VIRTUAL//Implementationprotectedι//Generatedmessagemapfunctions//{(ATXeKSO(CDBHOtch)afxemsg"voidOnVScxollCUINTnSSCode,UIHTηPos4CScrolΧΒλγ*pScrollBar)丨fx一megvoidOnPaintI,;virtualBOOLOninicDialog{);afxjusgvoidOnBypaeeU;"jTAFX一MSGDEC1ARE_KESSAGB_MAP(>CTabDialogm_ParenCWindow;voidSendScringToui(incwhich)t//{(ΛΡΧ一INSERT一LOCATION))KMicrosoftDeveloperstudiowillindercadditionaldeclarationsiicroediatelybeforetheprevioueline.Cendif//IdeCinediAPX一DKiOTCH一H一2^1CC3C5el^D9_XlDJ_9fiEE_006097CDB9E2一INCLUDED—JIlDBNotch.CPPi.tnplemcnCaCionfile//“0ncludencludcncludeeDBMotch-HencludeeTabOiaXog-Htnclude*DSPSOcHanaser.Kifdef^OEBUGCdcfine'newDEBUG一NEWiurtdefTHIS_FILE一staticcharTHISeFILEt]■一FILE一··Kendif//CDBNotchpropertypageIMPLEMEHT^DYKCREATE(CDBNotch,CPropertyPage>CDBHotctaCDBHotch()ιCPropertyPa^e(CDBNotchi:IDD)I//{{AFX^DATA_INIT(CDBKotch)//NOTEtheCXassWizardwilladdmemberinitializationher//})AFXDATAIMIT)CDBHotCh::-CDBMOCChOI}voidCOBNotch:DoDacaExchange(CDscaGxchange*pDX)(CCTopercyPageDoDacaExchange(pPX);"{AFXJ3ATA一MAP<CDBNoCcb)DDX_ControX(pDX,IDCeCHKCKSiie_BypAfl·);DDX二Control(pDX,IDC二SWDER6·ra_CoropGainSlider);DDX二ContiOlipDX,IDcZshlOEKS,m二CowpQSlider);PDJC=Control(PDX,IDC:SLIDER2,m^QSlider);ODX^ConCroKpDX,IDCeSLIOERX,m一FreqSlider);//JJATXDATAΜλΡ一)“一BEGIWeMSSSAGEeeHfcP(CDBNotch^CPropextyPagc)//{TAPXJ<SO:MAP(CDBNOtch)ONJJMieVSCROIA<>OM二WM=PAINT<)CLICKEDUDC_CHECK5,OnBypass)//TJAFX^msg^MAP“END一MESSAGEJW()//CDBKotchmessagehandlersvoidCDBMotcbsjOnVScroll(UXNTnSBCod專·UINTπΡοβ,CScrollBar*pScrollBar){//TODOxAddyourmessagehandlercodehereand/orcalldefaultCSliderCtrlelider■(CSliderCcrl*KpScrollBar;Intwhich;CPropertyPage::OnVScroll<nSBCode#nPoe,pScrolXBar);Sleep(SO)··iC<slider-stm^FrcqSlider)which■kNQtch9Freq;cleeif(eU4er4ra_QSHder)which■kl4ot:ch9Q;elseii(slider··kxajCosapOSlider)which-kMocch8Q;eleeifCelider--CimwCovnpCd1nS1i^er)which■kNoCchfiCuC;//fUinP*9.cpp·implementstion//“nclud"stdafX.)!**ifincludeeea,h"IfincludeaHainPage.h*<includewTabDialog.h"!includettDSPSCkHanager.h"8include<stdlib.h>Mitdtt一DEBUGdefinenewDEBUOeNEHIundefTHIS^riLE“scaCicCharrTJaS-FILE"·^FII-E_;IfendiC“一一//////////////"http:////////"http:////////////////////////////,////////////"/Ζ"http://////CH^inPagepropertypdgeihpl£hent_dyncreate(CHainFagercpropcrcypage)CMainPa^etCHainPageOCPropertyPagc(CMainpagcsIDD}”{{AFX_UATA_INIT(cmlnpftge)m_Byp&seCheckBoxFALSE;m:HDCDBypa(丨丨■FALSE;mjCainScaleBypas*-FKLSEtIQwaAnaloglnputFALSE;fiJ}AFX—ΟΜΛ-ΧΝτCHainPage:ι-CHainPttge(){)voidCHai&page:DODacaExcnaiige(COacxCxchanse*pDX)CPropertyPage:tDoDataCxdiaiige(pOX>;//{{AFX一DXTA-ΜΛΡCCKainPage)醫(yī)IDC一SLI0ER,丨DcXay),DDX_Control(pDX,DDX=Control(ρΟΧ#IDC_fiLXDER7OOX_Control(pDX(IOC=BUTXCmDDX^Coatrol(pDX,:DC:SIIDER3DDXeCoatioX(pox,IOC_SI#IDPOXwCheck(pDX,IDCjOTECKlDDX二IDC=CHECiaDDXeCbecH(pDX.IDC一CHKCK3DDX^ChecktpOXfIDC=CHfiCM//IJAFX^data^HXP-_AzlogVol);二ReeetAl1};iTPYeVoluaieSXlder);aTvoluaieSlider);UwBypasaCheckBOK);(HDCDfiypase};tojOainScaleDypaas);Dt一AngilogInput》多BEGIK_MESSAGE_HAPtCKainPage,CPropertyPage)/((Tafx一wso:map(CMainPage)ONeWMeVSCROLLOONJfiM:SHOWHIKDOK<}ON=BN二CLICXEDUDC一CHECJa·OnBypaseButton)OH:HM:PAIKT()一OH^BN^CLICKED(IPCwCHECK2,OnKDCDBypass)0N:BW:CLICKED1IDC:CHECK3,OnOainScftleBypass)OM=BN二CLICKED(IDC:BUTT0N1,OnRe丨ON=BN二CWCKSD<IDC二CHECM.OnAnalogInput)//J}AFXeMSO_MAP一EHD_HESSACE_MAP()"U!""""""""""Hi·"""""""H""·HHfiUf"""""""""http://CHainPagemessagehandlersvoidCHAinP9cOnVScroll(UZNToSBCode,UIKTnPoe,CScrollBar·pScrollBar)SetRenge(O·COHTROLJlAKGEi;SeCPoe(COHTROl^RAMGE-gr.^PHanas^r->GetParamValue(kAnalogVolume)1;SctTicFreq‘<cd^m>I#JU^GS’l}/16);SeCPagSize<PGCONTROti.AMT);m_BypaseCneckBox_false;mHParentwindow■(CTjtbDialo^*)QtParent()->OetPrent:O;returnTRUffj//returnTRUEunlessyousetthefocusto'acontrol//EXCCPTlOHSOCXPropertyPageshouldreturnFALSEvoidCM&iηP9eiOnShowWindow(BOOLbSbow,UINTnStatue)CPropertyPa9et:On5howWindow<bSbowfnSCAtU6);//TODOAddyourmessagehandlercodcherevoidCMainPageι:0nBypas9BuctQn(J//TODOAdd/ourcontrolnocificationhandlercodeherem^BypaeeCheckBox■Im_B/pe80ieck8ox;g_DSPHanager->SecBypa■β(u_Bypa9sCheclcBox>;voidCHainP^geOnPainc<)CN101883304A說(shuō)明書74/168頁(yè)//TODOAddYQxit:meCSliderCtrlsliderintwhich;ragehandlercodehereend/orcalldefault(CSliderCtrl·)pScrollBac;CPropertyPa$eιOnVScroll(nSBCode.pScrollBar);ccp(SO);(slidermm&n_VoluraeSlidr)Ch-XHainVoTum;itUlider■■fctn^PreVolumeSlider)ch·JcPreVolume;itUlider■■bm_AnlogVol)ChkAnalogVolume;if(slider尋·CimwDela/)ch■kDelay;whre9vD5PHaAa3r->SCParnValue(C0HTR0L_RANCC-ScndStringToui(which);“-><3etPos()#which),}BOOLCKainPseiOnInitDialogO{CPrppertyPaget0nlnitDi*2ogI);//TOOOiAddextrainitialisationherem_volumeSlider.SetRange(O,CONTROL一KANGB};CnaaVolumeSl£der.SetPo(COKlllOL^RAKGe-g^DSPMAnager->GetParamVaIue(IcMainVolxmie));wTvolumeSlider·SetTicFreq((CCSrTROLvRAmE-I-X)/X€);ttTvolumeSlider.SetPageSi*e(PG^COHTROLJWT);m^PreVoluneSlider.SetRange(O,CONTROLJlANGE];to二PreVoluroeSlider.setfo(C0lR<_RANGB-gJDSPana9er->G€tPararaVaXueCkPreVolume)>;nTpreVoXumesaidex-.SetTicFxeqi(CC)inilOL_KAMbE+l)/16);iflTpreVolumeSlider.SecPag€Size(PGeOCWTOOL_AMT);m^AnalogVol,SeCRange{O,CXiHTROL^RAHGEJsm—AnalogVol.SetPo·(CONTROL·一RANGJS-g—DSPManegei:->GtParamValue<kAnalogVoluine>);m_AnaXogVoI.setTicFreq((CONTROL_RANOel)/16J;nTAnalogVol.SetPageSi*e(PG_C一m一DelayηDl&y76CPAintDCdcUHi.);//4cviccontenttorpaintingitTOOOjXddyourhn4lercodch^tem一VoiumeSlidr:StPo(ControLmbAAMCE-^hDSPKAnnger-^oecParAinvaiue(KNaioVoluneIJιoi*PceV02une$Lidr.S*tPoc(O0WT5oL_aAHCB'gMDSI,M#nftger->G€tPereBValue(IcPreVoiuww))ni_AoalogvoX.SetPos(CONTfK)L_RAifGc"9wi>SPHn9r-C*tP*raiaVXuc<KAnlogVolume)Itm_Dtlay.SCPOltCOirrROLwRA>ICC-gMI>5piungr*'CeCPinVluotkOelvy));//DonoccellcpropcrcypageiiOnPAiat[)forpaintingmessagesvoidCHainriOsJ<DCOOypae<()//TODOiAddyourconCroXnotificationhaiKllerCOdebere^NDCOBypacsInvMOCDBypaas;gtaDSPHaiu9t->SCHDCt)eype·DCPBypeis);voidCrulnPageιtOnOAlnScsleBypase()//TODOiAddyourcontrolnotificationhandlerher·MjGsiQSo&leOypaa*_ιmjSaInSclBypaee;9_0SPHanAser->SecKDCDGain5cal(iijOln5cale8ypaBB)/voidCHelnPagcIiOnReeecXllO//TQDOAddyourconcrolnoclClcacionhandlercodeh*e”MMe/3/39AddeAextradialogwarning.it[fesftgeBox(HAreyoucureyouwaneCoreaacallprineter··,■Warhimo-.HB^TXSWO)3DYES)rttiura;SvOSPItaxiA9er*fte*etAXI(};■β二·VolueeSliderJet滬oitCCMTOOi^RANGE-g—11w:Pxev。luSlider_iitPoelCCWTiWi_KAKGi-g一PSHwnager-^tParKeV-lueikPafeVolwee));(AnaiogfVoUetiwacOilTROliJRMiCi^-DSWanAgw^^tPwcMWiklu·UArwiogVolyn^i;W一Dcley\SetPo*C0WTR0li_RMiSE-gLPsrii*nSer-0^tP3:iVeiue<kDely>);)voidCKainPAgetjOnAnAlogZnputO(//TODOiAddyourcoocrolnodfieationhandlercod*hr^AnalogXaput■ln^Analo^XnpuC;9vD5FKimg*r·StAraIogInput(ιι\_ληΑ09Input);)vpidcnalDFageiSendStrSngXoUI(intvhich>CStringstx9_D5PMana9er->GecscriA9Value(vhich,scr):ni_parentKind<7w->5et5titusString(0(Crl;*iC!defined(AFXe.MAlNPACE_H_9i4630A4_D52E^llD2_96EE-006097CDD9B2一INCLUDEO,)defineΑΓΧ_ΜΑΙΝΑΟΕ·Η一9<>Α4·Ι)52Ε二1102二96EE—006097CD09E2一INCLUDED—KiC_MSC_VER>1000Iprasnt^onceIendif//_MSCJ/ER>-1000//HainPagc.h··headerfile//classCTabDialog;"U川""""""""""""""""""""""""""""…""“"“//CHainPagedialogclassCHainPage;publicCPiopertyPag^{DECIARE^DYNCREATE(CHainPage)//Constructionpublic:CHainPascU;-CM&inPa9e()j//OlalogData//IlAFXmDATA(CMainPagt)eoun(XVD·IDD_PP2};CSliderCtrlm^Iay;CSliderCtrIra^AnalosVol;COuttonInvReaetAll;CSliderCtrlm_FreVolumeS11der;CSliderCtrXm一VolumeSlider;BOOLuHBypaBsCheckBox;B00I#n^HDCDBypass;BQOLnjSainScaleBypass;BOOLBiaAnftlogInput;//)AFX=DATA//overrides//ClassHizardgeneratevirtualfunctionoverrides//((AFXvVXRinALiCHainPage)protectedιvirtualvoidDoOfttaExchfttige(CDataBxchftUse*pDX>///DDX/DDVsupport//}AFX一VIRTUAL//ImpXementatioQprotected1//Generatedmessagenapfunctions//{(AFXJMSGtCMainPage)afxjnsgvoidOnVSerolllUINTnSBCode·UIHTnPos,CScrollBar*pScrollBar);virtualBOOLOnInitDialogOjafx.msgvoidOnShowWindow(BOOLbShow,UINTnStatusJ;jifx^nsgvoidOnBypaesBut:tonI);afxjnsgvoidOnPaint();a£x_msgvoidOnHDCDBYpass<>;&fx一megvoid0nOain$cale8ypes;AtxjnBgvoidOnRceetAll;afx_msgvoidOnAnalogInput<);//}jAFXJ4SGOECUVRE_MESSAGB_MAP()CTabOiAlog一ParentKindowvoidSendStringToUKintwhich)ιprivate;//{(AFXeIHSER^LOCATlOM})HHicrOeoCtDeveloperSCudLowillinserc:add!clonaldeclarationsimmediatelybforethepreviousline,cndifft(defined(ArX_AIWPAGE_H一S0463DA4e05ZE_1102_SiBE_006057C089E2一INCLUDED^)//l2CJPortCofwn.hrinterfaceCorthel2ClortCowmclass.///"http://////////""http://////""http://////"http:////"http:////"http://""http:///""http://////"http://IlCIdeCined(ΛΓΧI2CIP0RTC0MMH_33F9EF07_r6EFellD2_96EE_006057CDB9E2一INCLUDED^)defineΑΓΧβ20Ι^ΤΟΟΜΜ_Η_33ΓεΓθ7_Ρ6ΕΡ_1102_9€εε^00609700Β9Ε2一INCLUDED^if-MSC一VER>·1000IpragmaonceIendif//Jisc一ver1000!include"DSPComra.h·num{MI2C一STATE一CLOSED,MI2C二STATS二ΡΕΝ01Νσ·。ΡΕΝ,HI2C:STATE二OPEN,一MI2C:STATE:PEN咖GJTX,mx2c"state*'pending"rxlde£ineMI2_BOFFER^SIZE(3*3000)ClassI2ClPortConm:publicDSPCi{//shouldbemultipleot一一code;charm:tx一buffjMI2JBUFPER-SIZElongm一tx一writerm_tx_read;long_detect;&OOL·m_set_detcct;longm_reCryCounCBOOL·m^initialTryHWHOwTwnd;publicvirtualBOOLIsTransmltting(void》jvirtuallongGetDetectStotc{void};virtualvoidHe8sa$eKaQdlr(KPARAMiPortEventCode)jvirtualBOObCheckState(VOid);l2ClPorLCoiwn(HWKDρ)ιvirtual-72CIPoxtConm<);virtuallongSendDSPWordUong);virtuallongSendDSPKecnory(char*,lons>tcildif//丨defilUa(AFX_l2CIPORTCOMMJI—33MEF07_F6EF—11D2—9SEEJ)06097CDB9e2—IKCLUDED·)/ι////IncincincIncinctatde£defdefi£dundtataefendcppimplemefitaCiortOCtheT2CIPortCommclaej."""""Uum""""""""""""""""""""""""udeudeudeude"12CIPortComm.h·"COHPortChooser.udc"i2c200.h"cstructI2C—FROPi2C;c12CIPortComni*g_I2CCowm■NULL;neI2C_SLAV7_ADDRESSOxBOnel2C:MAXjJi0UNT(5*3)neI2C:REt5Y-COONTO£一DEBUGtTHIS^FILECChar^TOlSeFII-EU-—FILE—j//don'tthanthisin-shot/staticintcb_nvoidiPortMsgHandler(WPARAMiFortCventCode)ifIg^I2CConraJg_I2CCo*Ten->MessageHftirfXer(it,ortEvenCCode)j"""iI"""""""!I""""""""""""""""http://Construction/Deecruccion"…"""""""""""""""""""/staticBOOLwalt^Cor^neesa^e(void)lon9countwhile!cbκ{一Slep(lOO>;count++:iffcount>20)return(false);)return<true);I2CIortConn:I2CIPortConmUlKNDp)intr··CCOMPortChpoaerdig;dlg.DoModalO;ra_crror_code■O;m一etate·M12C_STATE_CLOSED;to—T*Req_Oj一write■m_tx_rcad縫O;fn^detecc·O;m_get_detect■fal&;m^initialTry■false;IneeHWnd·p;i2c.comport■digwhlchj(x>rC;80i2c.KmMS^NO-0;iSc.pCCDr·iPoifCMsgHendletfifde£NDEBUCi2c.pcLogFi1eHante■NULL;Ielsei2c.pcLosFiIeName*-log.txt";endifi2c.Logr<LlLevcl■1;i2c.U>9FileSizc■tOOO;i2c.Ho£tSlaveAddr*OxGC;i2c.BusTimOuc■1000;iac.HastcrOiCRate·//100kHxi2c.M&acerlUDufSizc_512;i2c.MASterTXBufSize-MI2_BUFFER_SI2E;i2c.MascerArbRecry_O;i2c.SlaveRxCCEnable·L;i2c.SlaveRxBufSize·512;i2c.SlaveTxBu£Size■512;r_I2COpen(mKWnd^AfxGetInstanceKaDdXeO,fci2c)iitir)’meerror_code0x1000;mMstaeΜ2。一STATE-PfiKDlWC-OPEM;g一I2CConvn■this;I2CXPorCCofim:t-I2CIPortCocm()I2CClQ9e();g_I2CCoiiromKULL;longI2CIPortComnitSendDSPtford(longvalue)(charbu£fer[3];i£(m_eCftCe<MIJC^STATB^pPEN>return(OL);bufferO■(value16)kOxFF;buffer(1■{vftlueB)bOxFF;buffer(2]_valuekOxFF;return(SendDSPMemoryfbuffer#3>);longX2CIPortConvnSendDSPHetnory(char"data,longlen){//makesurethelinkiavalidif(m_8tate<MI2C—STATE—OPEN)return(OL};longrval■OL;longb;longtocopy,amount,freapace;Iicopydataintochetxbufferitidata){freespace■ajtx^rcdil-W^txetWfite;it(ireeepace<ο)£recepace+·MI2_BUFFER_SI2B;ASSERT(lien3)frespce);//notenoughspaceinthebufferfor(cocopy■Ien;tocop/ο!cocopy·mount){if(m_txwritemtxread){“amount■MI2BUFFER一SIZE-m_tx_write··{amountcmcxread-wcxwrice;ι““nounc■!^{moun^-tocopy}··neencpy-(mjcxjb\iIter一twrite.data.amount);dta令·amount;TOeCxeeWriteanounC;mtxwriteMl2BUFFERSIZCi)“}//attemptcosenditiEtmstate·■MI2CSTATEOPEN){“~'Amount■m_tx_write-ei_cx_read;UASSERT(amount■·((ainount/3)*3));amount<O》mount_MI2_BUFFER_SIZE·m一tx一read;//mount(amounc/3)*3;//SendcompleteDSPWordo.atnounc-min(amount·I2C-HAX一AM0UNT1;//throttle‘h_I2CH丨tei:TMl2CSLAV£_ADORr5S(unsignedchar*)m_tx_buffCrtx^read,amount,1)jif(b_-<M"“—一“{m一etat■M12C_STATE_PENDIHGeTXjm一TXHeq*ankounC;i£(IminitialTry)Ift^retryCount■D;m_initiaXTry-true;)“i£(w一error_codemeerror_cod■b;ASSERTibO);})return(xval);voidraClPortComrotHessagftHandler(WPARAMiPortEventCode){structI2C—PROP9i2c;inCr;longtx_couJitjlongval;unsignedCbrbuffer(10);6witch(mstate){一cafieMI2C_STATEfcPEHDIG_OPEH:1C(iPortEventCode一I2COPEHSUCCESSFUL.){““m^etace■Hi2C^STATE_OPEN;i£<m_tx_read!-m^tx^write)Sen<lDSPMemOry(Nuij,ULj)elsem一error—codeiPorcSvencCode;break;CASCMI2C_STATE_PEH0IHGeRX:it(iPortGveiICCodeMRXCOMPLETE>{““r■I2CCeCHa8terRxMgO.buffer);iffr3va丄■bufferOJL·ΟΛΓΓ;val0;VdL*valI{buffer1}tval9;val-valI(burferfZl<radetect_val;OxfF);ΟχΓΓj//TO_error一codeiPortEvencCode;m_6tateΗ3C一STATE·。PEN;if<m_tx_readl_η一tx_write>SndOSPMemary(NULL,OL);break;caseHI2C_STATEJPENDINOJTX:1C(iPortEventCode"i2C_mtxcomplete{■“//MHS/20/9SOon*tcalxstatushere.//r-I30GctStatus(fcsl2c);//tx一count8i2c.HaeCrTxByteCounc;tx一count■mJTxReq;tninltlalTry_false;)~elsera—retryCount4;i£<mretryCount>I2CRETRYCOUNT)(—一BikiniCialTryfalse,'if(n^rr。r一·ο)m_error—code_iPort&ventCode;//ASSERT(w_retryCount<-irc^RBTKY^COiiNT);X2CClosei)T一"“r_I2COpn(m_HWQdAfxOetInstncHAndleUfSl12c>;ASSERT(rO);ro—etate·MlZCeSTATEeePEKDIlKJeOPEN;return;}tx一countO;_TOeCtate·I2C譯STATE-OPENw^tx^read·tx一count;!tx二readhI2b8UFFGR_5I££;if{mgetdctct")“{““一get一deteefc·falee;r-licMaBtcrRxExtU2C一SLAVE一AODRESSfii<r)“{i£(m_crror一codeO)in一error琴code■r;,D;metACe■ΗΙ20_5ΤΒPENPINGRX;J""elsei£<m一tx_read(■m^txwwrit)SendDSPMemory(NULL·,01.7;“break;caseH12CeSTATS^PENOlHO^TX:i£<iPortfiverttCOde--12C=MTX一COMPLBTE}if(II2COctStatue丄3c};m^TxReqai3c.nascerTxByceCount)m_etatc■MI2C_STATE_0PEN;x^readm_Txlleqjm"tx_radMI2_BUFFER_SIZB;if<x^readImwtx_write)send05pKemory<MVLLol);}Im^errQr_code■iPorcEvcntCode;;m_cx_read■m^tx^writcO;m^etetiHI2C~STATEwOPEN;if(x^read,·m^tic^write)SendOSPHemory(NinlLfOL);Jbre^k/BOOL{X2CIPortCocnnCheckStateOreturn(m_stteMI2C一state一OPEN);1longI2CIPortCoroiuiGeCDeteccStateO{longr,rval0;ii(merrorcode){^“rval■-m—error—code:cn_error_cod*Ojrvai·(m_dececc)?1jo;}一/i£(m一state__MI2C一STATE一PBNDINGJTX)!get一detect■true;elseif(m一stateHIZCSTATEOPEN)i"rI2CKasterRx£xC(I2CSIAVE^ADDRESS,3,1,X);if<r丨““"m^errorjoodm*r;elsernGCate·MI2CSTATEPENDING_RX;“.return(rval);BOOLI2CirortComnIeTransniittingO(return(ratxwrite1-mtxread);Jlietdefined^COlKhOOHB5DS10E6一P7D5’llD2_9fiEe一0060S7CDB,E2—υτυυοεο^e<leCir>eAFX—I3CdIaLOC一H一BSD&XOECeF7D5^11D3l96EE^O0€097CDBE2一INCUTOED—Vi£一HSCwVER1000lprA9maor\ceIendif//_MSC_vER>·iooo//I2CDiAlog.h~!headerfile//"""""m川umi!ui//CZiCOialogdie2ogclassCl2C0ialO9%puJblicCDiilogUIMTm_timer3D:intm_tte;ΠConstructionpublicCI2C0i*log<CWnd·pParnt■MU1.L);//standardconstructorifDialogDta//1(ΛΓΧ-λΤΑ(CI2Clialcg)cxmm(IDD·XDD^plALOGS);//HCTCftheClasawizardwilladddataMTriberehere//))AFXeDATA//OverridesifCiassvizardgeneretedvirtualfunction//{(AFX_VIRTUAli(Cl2CDiaaog)public)VlXtvalBOOLOllCMMsgtvitrrIUD.incnCode.protectedvirtualvoidDoDacaExchanga{c0aca£xchange*//)}APX_VIRTUAL"Itnplenentationprotecced//OenertedcwasAgemapfunctions//{{AFX一HSG(CI2CDlalog)virtu·王BOOLOaInlCDiaXogO;afx_ios3voidOnTimer<UiHTniPSvent);afxjmftgvoidOnCloseO;//)TAFX_MSGDEClARS^MeSSAGEMAPOil—void·pCxtr#AFXeCHDHANDLERINFO*pKandlerlnfo);pDX);UDDX/DDVsupport//{{APXINSERTLOCATION}),.//MicroeoCtDeveloperStudiowillinsertaddition凰1declrationetiwwdiatelyb^tox^cnepravaoueJine·Iendif(tHjefine<l(AFX_12CDIALOO_H_B5tl510E6_F7D5_.XlD2_95EE-00e097CDB9E2_IKCLUl)ED-)85//I2CDialog.cppιimplemenCAclonfile//Cinclude"eedafx.h"Iinclude"sa.h*Ifinclude*I2COialog.h"include·OSPSCkHanager.h"|<}c£incTtMERIDSSUitdct_DE8UGffdeCinenewoebvgjuzmBundefTHIS一FILE"“staticch*t"THIS_FlLEU·一FILE一;/"/W"http://"http:////////"""http://////"http://///////""http://"""""""""""""/ffCI2CDialogdialogCZ2CDia209ttCZ2CDlal09(CWnd*pParentΛ·ΝνΛ,/>χCDialog(CI2COlalogiiIDO.pprent){//{{AFX_CATft_INIT<CI2CDial09>//KOTB:theClaeeVliZArdwilladdcnemberlnicieliiationhere//})AFXDATA一ΙΚΓΓ)一—voidCX2CDialogι;DoData^xchange(COataExchanse*pOX)(CDialog;ιOooataExcbAnge(pOX);//({AFX_DATA_KIVP(CI2CDialog)//NOXSiCheClassWizardwillAddDDXandDDVcallshere//}}AFX_IATA_MAP}BSOINHHESSAG5wMJlP(CI2CDialogvCDialog)//(TaPX^MSO^MAP<CI2CDialP9)OHJWJTIMERI)OM—HM—CLOSEO//f}afxjisq一mapENDwHE5SAGBmKAP(Jmι⑴⑴⑴m!m""""""""http://CI2CDiaXogmessagehandlersSOOLCI2CDlal09i;OnInitDiaXog(}(CPialpgx;OtiInitDiAlo^()ι//TODOsAddextrainitializationhereg^DSPKanager■nwCOSP5SkMana^er(this->m_hWnd>;timerZD■o;·SetTimer50NULL);m_et裊te■ο;returntrue;//returnTKU£unlessyousetthefocustoacontrol//EXCEPTiO)OCXpropertyP&geGehouidreturnFALSEvoidCI2COlalo9:OnTimer(UINTnJDETvent)(//TODOAdd/ourneseagehandlercodehereand/orcalldefaulti£(nZDCvent■■T1H£RIDIIifC9D$pnanager·IeReadyO)ι"switch)n_stat)9apaOSPHftno9e^v>OownlodOSPCode(I\1:EndDialog(IQOK)ιbreak;deUulCi£ndz>ialog(iOOX>;break;1}el*eif(9_DSPhAna9cr-CetH0CDHode<)EndDiAlog(IOABOKT);)Le(CDilo9OnTxmer(nIOBvenc);}BOOLCI2CDilogιOnCndHsg<UINTnlD,InCnCod··void*pExtr,AFXeCMDHANDtERINFO'pHandlerlnfo{//TODOtAddyourspecUllvedcodehereand/orcallth·baseclassreturnCOialos:tOaCMM^gInZD4nCode·pExtr,pHandlrxnfo);voidCI2CDialo9;;OnCloseO//TODO:Addyouroes9·If(nuciwerlD)KillTiiner<m^tiraerIO);CDlalog:OnCloseO;.}handlercodeherend/orcalldefaultHiildefined(APXI2CCOMMEHROROALOC_H一,6C3e9E8Γββ9一liDi_9€CE_0060*3CD,ea一IIlCl-UOEDe)!defineAFX,I2CC0MMERR0RDIAJ^_H_7fiOe9EBwraeOl2e96CEM00€091CDe9E2_3NCLUDEI>-*ifVEH1000Ifpragmaonctfendif//_SC_VER1000//iscconnirrorDiaiog.hDeaderfile7////"""""http:////""http://""http://""http:////""http://""http://""""""""""""""http://CISCC^mnErrorDiAlogdialogclassClSCConvnErrorDialpgpublicCDialog(//ConstructionpublicιCZ2CC0nvnErr0rDlal09[CUnd#pParenc·NULL);//etiiidardconeccuctor//DialogDaca//(AFX一DATA(ci2CCotnmErrt>rDialoginuto{ICO_XDD_DIAL0G4};CScxIii9m^Esrorcode;//JiAlTCweDATA//cverridefi//ClflKj.zardvirtualfunctionoverride//((ATX一VIRTUAL(cisctonncrroroittlog)pi:otctdivirtualvoid2>oD*tAExchin9·(CDAtaExchaoge·pDX);//DOX/DDVsupport//一VIRTUAL·//XofsleoMntatiooprotectedιHGeneratedvm丨肩egmapivnotion·//[[KFXmKSO(CI2CConnBrrorDiAlog)fxjnegvoidOnfixiteonl()///)7AP3C_MSGDECLARE二MBSSACJJΗλΡ()l·““Π{{AFX^INSERT_LOCATIOMJ}UKicrosoCtDeveloperstudiowillinsertadditionmldecleifationsimnedietelybeforethepreviousline,Iendif//ldefiiied(AFX_I2CCOMBRRCmOIALOGJI—7SC3EJ^e9^1lD2e9€EBj)00CDMB2_IWCWJDaU//12CCoimvErrorDialog.cpp;itnpletnencacionfile//include^include"sa.h"tfincludew12CCommErrorDialog.h-Ififdef^DEBIX;BdefincnewDEB\Xi_NEW#undefTKISeFILEstaticcharTHIS一FiLfin“—FILE—;(iendif“一―iiiiiiiiUUiiin/infiituiiiuuiifiiiiuuiiuitiiιnmuuuiuuufan11CI2CCommErroi:0ialogdialogCI2CCommErrorDialog::CI2CCommErrorDialog(CWnd*pParent/*WULL·/)CDiaXog(CI2CCoTnmErrorDialogt\IOPfpParent){//{{AFX_DATA_INIT(Cl2CCowniErrorDiaZog>m^ErrorCode-一Ti··};/7}}afx_data_ihitvoidCI2CCotnmErrorDialogDoDataExchanse(CDataExchange*pDX){CDialog:DoDataExchaii9e(pDX);//{ArXJ3ATA_MAP<CI2CConroErrorDialog,DDX_TextIpDxTIDC_EDm,ra_ErrorCode);//})AFX_PATA_HAP~BEX;IN^HESSACE_MAP(C12CCoim^rrorDia1og,CDialog)//({AFX一MSG一ΜΛΡ(CI2CCon*nErrorDialog)OWeBN^CbICKED{IDC_BirrrOW1,OnBUCtcnl)//T}A^X一MSG一MAP一END_MESSAGE_MAP(J///////////////////////////////////////////////////////////"http:////""""http://////CI2CCofturtErrorDialo9messagehandlersvoidCI2CCoronErrorDialogi;OnBuctonlI)(//TODO:AddyourcontrolnotificationhandlercodehereEndDialog(IDCAMCBL);)//PEOPdram.hinterfaceCortheCPEQParamclass.//////////////////////////////////////////////////////////////"http:////"http://ir!defined(AFXPEQliARAM一Ii一733FD7AB_4A49_X1D3_96EE_006097CDB9E2一INCLUDED^)defineAFXePEQPARAM^H一7*37ΑΒ一一006077CDB9E2一INCLUDEDeKif_MSC^VER■IQOOflpragmaonceHendif//_MSC_VER”1000CloaCCloatdoublem—Gain;m^Frecfuency;m^SampleRate;m_pi;////UUindB(+orinQunitsinKzinKzpublicvoidGetCoe£{biquadcoef*)voidGetAllpas$Coef(biquadcoef*);voidSetQ(floatW{m—Qv;)voidSetQ(CStringbstr);voidSeCGain<£loatv){to一Gain麗ν··)voidSetGain(CStringtstr),·voidSetFreq(floatv){m一Frequency*v;}voidSetFreq(CStririgtstr);CPEQParamO;virtual-CPEQParamO;};endi£//ldefined(AFX_PEQPARAM_H_733FB7AB_4A49_llD3_S6EE_00607CDB9E2_lNCLUDED_ftii!defined(AfX_NOTCHPAGE2-H一5C8994C7_E2A4^11D2_9SEE_006097C£>B9E2一INCLUDED^)defineAFX_WOTCHPAGE2_H一5C3994C7_E2A42^1D2^96EE^006o7CDBSE2一INCLUDED^KiC_ksc_ver>-iogoSpragmaonccffendif//_MSC一VER>1000//NotchPage2.h;headerfileUclds&CTabOialog;///"http://"""http://////////"http://"""http://""http://"""http://""""""""""""""http://CNotchPage2dialogclassCNocchPage2publicCPropercyPageI'DECIAKE^DYWCREATE丨CN0tchiage2)//constructionpublicCNotchPage2(};*CN0CChPA9e2();//DialogData//{(AFX—DATA(CNotchPage2)enucn(XDDIDD一PPS};CBuctonm^BypassSecondButConCButtonra_flypas8FiretButton;CSliderCtrlm_SliderCuc4;CSliderCtrlm-siiderQ4;CSliderCtrlHiwSliderFrequency4;csliderccrlm二SliderCut3/CSliderCtrXm藥SliderQ3;CSliderCtrlmSliderFrequency3;//))AFXwOATA一//overrides//ClassWizardgeneratevirtualfunctionoverrides//{(AFX-VIRTUAHCNotchPag€2)protectedvirtualvoidDoDataExchdnge(CDataExchan9e*pDX);//DDX/DDVsupport//}JAFXwVIRTUAIi//implementationprotected//Generatedmessagemapfunctions//1(AFX_MSGtCW0tChPage2)afx^ioegvoidOnPaint(>;virtualBOOLOnInitDialogO;afX^msgvoidOiiVScrollUINTnSBCode,UINTnPos,CScrollBar*pScrollBarJafx_msgvoidOnBypassFirstO;afx^rnsgvoidOnBypassSecondO;.//)TAFX_MSG-DECLARE一MESSAGE—MAP<}CTabDialog·π一ParentWindov;voidSendStringToUIiintwhich);//HAFXwINSERr_LOCATIOM)).//HicroaOftDeveloperStudiowillinsertadditionaldeclarationsimucdiatclybeforethepreviousline.Kendif//!defined(AFX_NOTCHPAGE2_H—SC8991C^_E2A4_11D2_9€EE_006097CDB5E2_INCLUIED_)93//NotchPagc2.cpp//implcmentaCionCileNincXude"etdaf^.h-tfinclude"a.h·Xinclude"NotchPage2.h"tfincludeeTabDialog.h"(!include"DSPSGkManAger.h"Hlfdet_DEBUCdefinenevDEBUG_newffundcfTHILEstaticcharTHIS_FILEll-—FILE—:endif——//CNotchi>age2propertypa^eIMPLEMEMT_DYNCREATEiCNotchPage2fCpropertypage}CNotchPage2:CNocchPage2{)CPropertyPege(CHotchPageZiIDD1//{{AFX_DATA_INIT(CNotchPa9C2)"}}AFX~DATA~TNIT)“CN0CchPage2{}-CNotchPage2ODoDataC^change(CCacaExchange*pDX)voidCNotchPd9e3;{CPropertyPageDoDataExchange(pDX);"({AFXJ5ATA一MAP(CNOtChPa9e2)DDX^control(pDX.IDC一Checjcg,m_BypassSecondQutton)·IDC二CHECKS,IDC^SIiIDER6,IDC—SLIDERS,IDC=SLIDERTDC"SLIDER3,IDC二SLIDSR2,lDC*"SLIDERlfDDX一Control(pOX#DDX_CoacrolρΟΧ,DDX一ControlDDX二Control(pDX·DDX=Control(pDX,Dox_Concrol(pDx,DDX—Control(pDX,//})"afx_data-maPw^BypassFirstButtoa)xn_SlidcrCut4);BieiSlider^);OieeCllderFrequencyAJ;nTsildcrCutJ)ixn_SliderQ3)tliderFrequency3)(BEGIN_MESSAGE_MAP(CN0tchPase2,CPropertyPage)//{(AFXeeKSG^MAP(Q4otchPage2)OHJiM-PAINT。。N:HM:VSCROLL()OH二BW=CLICKEt)(IDC_CHECK5fOnBypassFirst)ON二BH一CLICKED(1DC二CHECKS,OnBypaesSecond//))AFX一MSGeMAP““END^MESSAGB^HAP//////////////////////////////////////////////////////////////////Z////////////CNocchPage2messagehandlersvoidCNotchPage2:OnPainci){CpaintDCdcthis>;“devicecontextforpainting//TODOAddyourRieseagehandlercodeherem_SliderFrequency3.SetPos(C0NTR0L_RAKGE'g_0SPManager->CetPairamVluc{kHoCch6Freq|);m一SliderQJ.SetPos(CONTROL_RANOE-PManegcr->OetParttmValve(k^otch^Q));m_siiderOat3.SctPos(CONTROL_ftAHCE'g_DSPhanagcr->GetParamValue(kNoCcheCut});rn_Sliderfrcqucncy4.SetPostCONTROL一RANGE-g一DSPManager-ParamValue()cNOCch7Freq));TsiidcrQ4.SeCPos(COKTROL_RAWOE‘g~DSPManager->GetParamVaIuekHotch7Q));m"siiderCuC4.^etPos(contrSi^KAWCe了g一DSPManager->GetParamValue()OJotCh7Cut)>;m一BypassFirtCButton-SecChecfcgeDSPManagerGetBypaesSfiction(JtBypaesWotch3i;m一BypaseSecorKiautton.SetCheck(g’DSPHanagef-^GetBypdeeSectionOcBypaeeNotchD>;itOonotcallCPropertyPage:OnPaint{)forpaintingmessages1OOOIiCNotchPage2;:OnInitOialog(3ιCPropertyP^ge:OnTnitDialog{);//100Addexctainitializationherem^siiderFrequency3.SctRangcCO1CONXROL^WWGE);m^sliderFrcquenc/3.SeCFos(CONTROLeRANGE-g_DSPManager->GetParamVaIue(kiJotcherreq))m^SlidcrFrequency3.SetTicFreq(tCONTROL^RANGE+1]/16);m_S1iderFrequency3.SetPageSize(PG_C0NTROL_AMTJ;m_SliderQ3.SetRange(O,CONTROL—RANGE};m一£liderQ3.SetPos<C0WTR0L一RANGE-3eDSPMiina3er"->GetPai:amValue(JcMotch6Q));m"sIiderQJ,SetTicFreq((C0MTR0L_RANCE+1)/IC);m^SliderQ3.SetPageSize(PG_C0NTR0L_A>!T);m_SliderCut3.SecRange(O,CONTROL^RANGE);ra_saiderCut3.SetPosICONTOOL^RANGE-g^DSPKanager-^GctParamValue(kwotchscuc));ra_SliderCut3,SetTicFreqi(COHTROL^RWiGE+1)/Xβ);ra_SliderCut3.SetPageSize(PG^COHTOOL^AMT);m一SliderfrequenciM.SetRange(0.CONTROXj-RANGEI;m_SliUerFreq^ency4.SetPos(CONTROL_RANGE-g_D5PKanager->G€tParamValueikHotch7Fire(}|);m_SlidcrFrequency4.SetTicFreq((COWTROL^RANGE+I)/16);m一SliderFrcquenc/4.SetPa^eSi(PG_CONTROL_AKT);m一SliderQ4.SetRange{O,CONTROL·一RANGE};m_SlidcrQ4.SetPos(CONTROLwRANGB-g_DSPManager'>GeCParamValue(kNotch7QJ);m_Slider04.SetTicFrcqUCOWTR01._RAKGE+l)/16)m_SliderQ4.SetPageSize(PCJeeCONTROL^AMT);m_SliderCut4.SetRange(O,COHTROX-_RANGE);m二Slm$1derCut4-SetPos(COMTROL^RANGE-g^DSPManager->GctParamVaIue(kNoCch7Cut));derCut4.SecTicFreq((CONTROL^RANGE+l)/16);dercut4.SetPageSize(PG-CONTROLi-AMT);m—ParentWindowreturnTRUE(CTabDiaXog*)GetParentO->GetParent().)I/returnTRUEunlessyoueUEXCEPTIONιOCXPropertyttiefocustoaesshouldvoidCNotchPage2::OnVScroll(UINTnSBCode,UlNTηPosfCScrolIBar*pScrollBarJ(//TODOAddyourmeesagahandlercodehereand/orcalldefaultCSliderCtrl*slider·(CSXiderCCrl*JpScroilBar;intwhich;CPropertyIage:Onvscroll(nSBCodc,nootpScrrollBar);^leep(50);(sliderstni^SiiderFrequencyS)vhichkHotch6Freq;seif(siidert.m^SlitlerQ3)which-kHotcheo;_ceif(Elider二>which■kNotchSCut;eeif(slider口4m_SliderFrequency4)whichekwotchiFreq;elseif{slider)vhichk>iotch7Q;elseif<elider■■tm_SliderCut4)whichkwocch7Cut;g^DSPManager->SetParamVa1ue(CONTROL_RW4GE-slider->GetPosO,which)ScndStringToUl(which);“voidCNoCChPageJScndSCringToUI(intwhich)(CSCringstr;9_0SPManagcr->GctStringValue{which,str);m_ParentHindow->SetScaLusString(Oistr>;]voidCKotchPage2!iOnBypassFiretOιHT000:Addyourcontrolnotificationhandlercodehereintscate_cn^B/passrirstButcon.GeCSCdCeOt0x3;g_DSPanager->SetBypassSeccion(state,^BypassNotch3);voidCKotchage2OnGypassSecondOI//TODO:Addyourcontrolnotificationhandlercodehereintstate_m_Bypas6SecondButton.GetState()&0x3;g_D$PManager)>SetBypassSection(8tat:e,)QDypa8SNoCch4),ttitdefined(AFX^NOTCMPACEI^H一OCF7E208-D790_11D2-96EE-006097CDB9B2—INCLUDED^)defineAFX^NOTCHPAGEl_H一OCfTez0S_D790~ilD2_9CEB-0Q6097CDB9E2—INCLUDED—Hf_MSC一VER>a1000ApragntaonceHendi£//_MSC_VER>-IOOO//NotchPagel.hheaderfile////CNotchPageldialogclaGsCTabOialogjclassCNoCChPagei:publicCPropercyPagcDECLWiE_DYNCiiEATElCNocchPagcl)//ConstructionpublicCNotchPagclO;-CNotchPagelO;ffDialogData//((AFX_DATA(CNOCchPageX)enuin{IDDIDD_PP4J;CButtonro^BypaesSecondflutton;CBuctonra一BypassFirBtButton;CSliderCtrlm_SliderCut2;CSliderCtrlm_Slider02iCSliderCtirlm_51iderFreqiiency2;CSliderCtrlm一SliderCutl;CSIiderCtrlm~SiiderQl;CSJiderCtrliderFrequexicy1;//})AFX_DATA//Overrides//Cla&sMizardgeneratevirtualfunctionoverrides//{{AFX一VIRTUAL(CNotchPageX)protected;virtualvoidDoDataExChange(CDataExchange^pDXJ;//DDK/DOVsupport//))afx_virtual//Implementationprotected//Generatedmessagemapfunctions//{{APX_HSG(CWotchPagcl)virtualBOOLOnIniCDialogO;afx^msgvoidOaVScroll(UIKTnSBCode,UINTnPos,CScrol!Bar*pScrollBar);afx:msgvoidOnShowWindow(BOOLbShow,UINTnScacus);afx^msgvoidOnPaint<);aCx_msgvoitfOnBypassFiret();afx^disgvoidOnBypassSecond<);//}Jafx_MSGOECIARE一MESSAGE一MAP()CTabOialogiRi^ParentWindow;voidSendstringTol)I(intwhich);//{{AFXINSERTLOCATION))..//MicrosoftDeveloperstudiowillinsertadditionaldeclarationsimmediatelybeforethepreviouslinetlcndif//lde£incd(AFX一NOTCHPAGEl—H一OCF7E208D7一11D2_36E:E_00C097CDIJ9E2一INClAiPED//NocchPagel.cppimplemenrationfile“include"stdafx.h"NincXude"ca.h·(!include"NotchPagel.h"^include"TabPialog.h"^include"DSPS6kManag€r.h"Hifdef_DEBUGDdefinenewCEBUG^NEW#undefTHISeFILEStaticCharTHIS—FILElJ■—FILE.Wendif—///////////////////////////////////////////////////////////////////////////////CNotchPagelpropertypagejMPLeMEKT^oyNCKEATElCWotciiPagel,CPropextyPage)CNotchPagelCMotchPagel()sCPropertyPage(CNotchPagelIOO){//((ArX^DATAeIMXT(CNOtChPagel)"JAFX二DATA二INITCNotchPagel-CNotchPageIOCNotchPagel.-OoDataExchange(CDataExchange*pDX)CPropertyPage·.DoDataExchange(pDX)··//{(AFX一DATA一MAP(CNOtcJiPagel)DDX^Control(pDXrIDC_CHECK6Pra一BypaesSecondBucton)丨”IDC—CHECKS,m_BypassFirscBuCton>;IDC一SWDER6,m—SliderCUt2>IDC~SI*IDER5,IDC:SL1DER4,IDC:StaDER3,IDC=SLIDEmiucTsiaDEia,DDX^concrol(pDX,DDX一Control(pDX,DDX二Coiitrol(pDXrDDX=ControlpDX,DDX二Control(pDX,DDX二Control(pDX,DDX=Control(pDX,//JJafx_data_hapIneSliderQZ);m_SliderFrequency2),m:SliderCutl>m:SliderQiJm"sii<JerFrequencyl),BEGIK-HESSAGE_MAP(CNotchPagel,CPropertyPageJ//{Tafx一MSG一MAP(CNotChPagel)ON_WM_VSCROLL()ON:WM:SHOWWINDOW)ON:WH:PAINT()ON^BKwCLICkED(IDC_CHECK5,OnBypaseFirst)ON^BN_CLICKED(IDC_CHECK6,OnBypaBSSecond)"了JAFX一MSG—MAP“END一MESSAGE一MAP()""""""""""""""""H"""""""""!UHUmHUHHiH""http://CNotchPagclmessagehandlers、BOOLCNOCchPagelOnIniCDiaIogO{CPropertyPage.-ODlnitDialogO;//ΟAddextrainitializationherem_SliderFrecruencyl·SetRange(O,CONTROL_RANGE>;m"siiderFrequcncyl.SetPoslCONTROU_RANGE-gDSPManager->GetParamValue(kNotchlFrcq));ra二SliderFrequencyl.SeCTicFrcq({CONTROL·一RANGE+l)/lfi>;m一SliderFrequencyl.5tPagSi£etPG_CONTROL_AMTJ;IderOl.SetRangc(O,CONTROL_RANGE);tn_Slide*Ol.SetPo(COMTROLeRAHGE-g_DSPH£na9cr-i-CetPararciVelue(kNocchlQ))ιm^SliderQl.SetTicFzcq{(CONTROL_RANCS*I)/16);m_siiderQi.SeePagcSize(PC_CONTROL_AMT);m^SliderCuci.SetRange(O,CONTROL__HANQE);m^SliderCutl.SetPos(CONTBOL_RANGE-g_DSPManager->GeCParamValue(JcNotchlCut));ta_slidercuci.SctTiCFreqt(C0NTR0L_RAKGE+1I/161;to_SliderCutl.SetPageSizefPG_C0NTR0L_AMT);m_SliderFrequencyJ.SetRange(O.C0NTR0L_RANG5);ra_SliderFrequency2.SetPos(COWTROD^RANGE-g^DSPManager-iCetPsramValue(kNotch2Freq);mSliderFrequency2.SetTicFreq(<CONTROL_RAiJGE4-l)/lfi>;m_SliderFrequency2.StPageSizeiPG^CONTRObAMT);m一Slider02-SctRange(0.CONTROL_RANCEJ;IicJerQZ.SetPos(CONTROL_RAHGE-g_DSPManager->GeCParamValuekNotch2QJ);misIiderQZ.SetTicFreq((CONTROL_RANCE+1)/16)··m_SliderQ2.SetPageSixe(PC_CONTROL_AMT)jm_SiidrCuC2.SetKan^e{O,CONTROL^RANGE);m_SliderCut2.SetPoS(COMTROLr_RANOE-g_DSPMana9er->GeCParamValue(JOiotchZCut));m_SliderCut2.SeiTicFrcq(<COHTROL,_RAHCE+1)/16);m_SliderCut2.SetPageSizc<PG__COHTROL_AMT);(CtatoDiaXog*)C^CParcntO->GetPairenc();//returnTRUEunlessyousettheCocustoacontrol//EXCEPTIONOCXPropertyPagesshouldrecumFALSEvoidCNotchPagei:0nVScroll(UIKTnSBCode,UINTnPos,CScrollBar*pScrollBar)(//TODOAddyourmes&agehandlercodehereand/orcalldefaultCSliderCcrl^slider·(CSlidcrCtrleJpScrollBar;intwhich;CPropercyPageOnvscrol1{nSSCodc,ηPooipScrollBar);it(slider■■tm一Sliderfrequency1)which■kHotchlFreq;elseif(sliderfcra^SliderOlJwhich■ItKoCChiQ;elecif{slidertm_SliderCutl)whichJcNotchlCut;elseif{slidertm_SliderFrcquem^yi}which■JcMotch2Freq;elseif<slider■■tm_SliderQ2)whichJO<occh2Q;elseif{slider■■tm_SliderCut2)which·)04otcl32Cut;g_DSPManager->SetParamValue(C0NTR0L_RANGE-SerdStringToUI(which);■>GetPosO,which),voidCNotchPagcl0nShowWindow(S00L·bShow,UINTnStatus)CProperCyPageOnShowHindow(bS2ioνfnSCatus);//TODOAddyourmessagehandlercodehere)voidCNotchPagei:0nPaintO(CPainCDCdc(this);//devicecontextforpainting//TODOAddyourmessagehandlercodeherem一SliderFreq^cncyl,SetPoe<CONTROL_RAGE-g_DSPManager->GetParamValuc(kiJocchirreq))m一SlidcrOl.SctPos(C0NTR0L_RANC£-g~DSPMan4gcr->GccParamVaIueIkWotchlQJ>··tn一SliderCTutl.SetPos(CONTROL_RANGE-g_DSPManager->GetParamValue(UiotchlCuc));m_Slidcrfrequency2·SecPos(IcNotch2Freq));m_Slider<)2.SetPos(COMTROb_RAWCE-g_DSPManoger->GetParomValuc{kNotch2Q));meSlidcrCut2.SetPos(CONTROL_RANGE-g_DSPHanager->GetParamVaIue(>^Wotch2Cut)J;ra一BypassPirstBvitton.SetCheck(g_DSPManager->CctBypassSeccion(kB/passNocchl))··n_BypassSecond0utton·SecChecX(9MDSPMana9er->GeC6yiissSeccion(k8ypassMoCch2))··//DonotcallCPropcrtyPagc::OnPaint()forpaintingmessagesvoidCNotchPage1SendStringToUI(incwhich){CStringscr;g_DSPHanager->GetStringValue(which,sCr);m^Parencwindow->SeCScatusstring(O,scr);jvoidCNotchPagelOnDypassFirsCOI//TODO;Addyourcontrolnotificationhandlercodehereintstate*<m^SypassFirstButton.GeCSCate()L0x3;g_DSPManager->SetBypassSecCionstate,kBypassNotchl);)voidCNotChPagei:OnBypassSecond(){//TODOAddyourcontrolnotificationhandlercodehereintccate■m^BypassSccondButton.GetSCate()Λ0x3;g_DSPMana9cr->SetBypaseSection(state,lcBypassNotch2);}100tfi£!defined(AFJ(一NEWCUTOFFPAGE一H一E272B726_E02G_llD2_9GEE_00S097CDa9E2一INCLUDED一defineAFX^WEWCUTOFFPAGB^H一一E026二11D2二36EE^0060S7CDB9E2一INCLUDED一Kif^MSCtaVER>■IOOO^piTdgmaonce8endi£H_MSC_VER1000//NewCucofCPage.h;headerfile//classCTsbDialog;!!ill!tfiUfifItUUliIilliuniUiiiIiiiUiinUUiUfiUIUUUUiiIfiUIUJlCNewCucofPagedialogclassCNewCutoffPage;publicCPropertyPage(DECLARE^DYNCREATE{CKewCUCOffPage)//ConstructionpublicCNewCutofCPage();-CNewCuCoCfPageOtUDialogData//{{AFX一DATAtCNewCutoffPage)emimfIDC■IDD—PP8);CGuttonin_&ypdS5NLopae6ButCpn;CSliderCCrlm_Nev;HiQsaider;csiiderccrlm_KewHiFreqS1i4er;CButtonm^BypassLopassButton;CButtonQinBypaasHipassBuCton;CSliderCtrlmHiOSlidcr;CSliderCtrlni_HiFreqSlider;CSliderCtrlra_LoQSlider;CSliderCtrlm—^oFreqSlider;//J}AFX-DATA//Overrides//ClassWizardgenerateviTtualfunctionoverrides//UAFX_VIRTUA!jtCNcwCaC0ffPage)public:virtualOOOIiOnSctActive(>;protectedvirtualvoidDoDataExchange(CDataExchange*pDX);//DDX/DDVsupport//JAFX_VIRTUALi{ZiPplementatiouprotectedι//GnerCedmessagemapfunctions//({AFXtaMSG<CNewCutoffPage)afx-magoidOnvscrolluintnSDCode,UTNTnPos,CScrollBar*pScrollBar);virtualBOOLOnInitDJlalpg《)*·afx_magvoidOaShowHindov{BOOLbSbow,UINXnStatus)jafx_ms9vgidOnPftinC(};afJt^msgvoidOnBypaseHipassO;afJt^msgvoidOnQypasoZo|>a8B();afx一tnagvoidOnaypaseNewLopaseO;"}TAFX一MSGDEC1ARE:MESSAGE_MAP(JCTabDialog^mwParentWindow;voidSendStringToUI(intwhich);//IlAFXINSEftT^LOCATION}}.ifMicrSeottDeveloperStudiowillinsertaddiciondldeclarationsimmediatelybeforethepreviouaLine-endif//definedΑΓΧ_ΝΕΗσΠΡΓΡΑαε_(tái)Η_Ε272Β225_ΕΟ26_1102_96ΕΕ_0Ο€097ΓΟΒ3Ε2一IKCI,UDED_)//NewCutcCCPage-CppifimplemenCationfileUincludeUinclude_sa.h”tfinclude"WewCucoffPage.Uincludc"TAbDialog.h"(iinclude"DSP56kManagcr.KifdcC_DEBUGfldefinenewDEBUC_N^WTHISFILEffenditCharTllISeFlLE》一門LE一//Ζ/////////////;//////////////////////////////////////////////////////////////CNewCutofCPagepropertypageIMPLEMent^dyhcreate<CNewCutoffPage,CPropertyPage)CNewCutoffPage;CNevfCutofCPage()tCPropercyPagciCKewCutoffPageidd){//{{AFX一DATA一INIT(CNewCutoffPage)//}}AFX一DATA二IHIT)一“CNewCuto£fPage-CHevCucoffPage()voidCNcwCutoftPageDoDataExchange(CDataExchange*pDX){CPropertyPage:ιDoDacaExchange(pDX);//{{AFX_DATA_MAP(OlewCutoCfFage)DDX一Control(pDX.DDX—Control(pDX.DDX^ControHpDX,DDX一control(pDX,DDX=Control(pDX,DDX^Control(pDX,DOX^ControlCpDX.DDX^ControlipDX,DDX二Control(pDX,//一DATA一WAPIDC_CHECK7,IDC二SLIDERSIDC二SLIPERflIDC二CHECKS,ZPCICHECM,IPC二SIjIDEKIDC二SiaDER2,IDc"*SLIDERlfra^BypassNLopassBucton),m_NcwHiQSlider);InjNewHiFrcqSlider);m_8ypftSstopassButton);m_BypassHipassButton);m_HiQSlider);in_HiFxeqSlide3ri;m_LoQSlider);m_LoFreqSlider);BSCIWMESSAGE一MAP(CNewCutoffPage,CPropertyPageJU(Tafx_msg_MAP(ciiewcutofcpage)OM_WM_VSCROLL()ON—WM二SHOWWINDOW(,ONwWMePAINTOON_BN一CLICKED(IDC_CH£CK4·OnBypaDBHipaes|ONeBN-CLICKED(IDC一CHECKS,OnBypaBsLopass)OM一BN二CXiICKED(工·OnBypaesNewLopaafi)//))AFX_MSG_MAP“EWD_MESSAGE_MAF(/"/W"http://""http://""http://"http://"http://"""""""""""""""""""""""http://CNei^TutoffPagemessagehandlersvoidCNewCuCoffPage:OnVScroll(UINTnSBCode,UINTnPos.CSCrollBar*pScrollDar)t//TODOAddyourmessagehandlercodchereand/orcalldefaultCSlidcrCtrl*sUder■(CSliderCtrl”pScrollBar;intwhich;CPxopertyPageOnVScroI1(nSBCode,nPos,pScrollBar);Slccp(50);IE(oliderfcm—LoFreqSliderJwhichkLoCutoffFreqj102slider“tm^LoOSiider>JtLoCutofCQ;*"*tm—HiFreqSlider)KKiCuCoC£Freq;slider-ρtro一HiQSlidcr)kHiCutofCQ;"slider■·trn_NcwHiFrcqSliderJkHiCutof£2Freq;slider■·tm^NewHiQSlidcrkHiCutoff2QTg_DPMana9er->SeCParamValue{CONTROL^RANGE-slider->GetPos>.whichJSendStriTigToin(which);"voidCNewCuCOffp^ge:SendStriTig7oUI(intwhich){CStringstr;g_DSPManager->CetStringValuc(which,etr);m_ParentWindow->5etStatu&Strins(O·str);BOOL·CNewCutoffPageiOnInitDialog(){Cpropertypage:OnInitDialog0;//TODOAddextrainitializationherem_LoFreqSlider.SetRange(O,CONTR0L_RANGE);ra_I^FreqSlider.SetPos<CONTROL_RAiiGE-g_DSPManager->GetParamValue{kLoCutoffFreq})iin_LoFrcqSlider.SecTicFreq((CoifTROL^RAWGE+l)/16);m_haFs:cqSlider.SetPageSize(PG_C0NTROL_AMT);m_LoQSlider.SetRangelO#COHTROL_RANGE);m_LoQSlider.SetPOs(CONTROL^RftNGE-g_DSPManager->GetParamValue(kLoCutoffQ)>;ra^LoQSlider.SetTicFreqiCONTROL^RANGE+l)/16);m_LoQSlider.SetPageSize<PG_CONTROb_ANTj;HieKiFreqSIider.SetRange{O·CONTROl·一RANGE);πι二HiFreqSlider.SetPos);m~HiFreqSlider.SetTicFxeq(tCOWTROIj_RJMiGE+l)/16);P_KiFreqS1ider.SetPageSixe(PG一COHTROL·一AMT);m_HiQSlider.SetRange(O,COHTROL_RANGE);m_HiQSlider.StPos(COWTROI/_RANGE-g_DSPManagr->GetParamVaIue*k:HiCuCo££Q)>;in^HiQSlider.SctTiqFreql(CdJTROIiwRANGEtl)Zie):m—HiQSUder.SetPageSze(PG^CONTKOL^AMT);m—NewHifreqSlider.SetRange(O,CONTROL一RANGE);m二NewHiPreqSlider.SetPos(CONTROL—RAn5e-3一DSPManager->GetParamValue(kHiCutoffZFreq)]m_NewHiFreqSlidcr.SetTicFreq((CONTROL_RANGE+l)/16);m_WewHiFreqSlider.SetPageSiie[PG_CONTROL_ftMT);m_NewHxOSlider.SeCRange(O,CONTROL·一RANGEJ;m一NewHiQSlider.SetPOsCONTROL一RANGE-g-DSPManager->GetParaniVisIue{JcHiCutoff2Q));cn_NewHiQSlider.SetTicFreqi(CONTROL^RAHGB+l)/16);m_NewHiQSlider,SetPageSiift(PG_CONTROL_AWT);m一ParentWindowrcCurnTRUE)(CTahDialog·)CetPercnC()->GeCPorentU;·//returnTRUEunlcDSyousetthefocustoacontrolπEXCEPTIONOCXPropertyPageashouldreturnFALSEvoidCNcwCutoffPage:OnShowWindow(BOOLbShow.UINTnStaCus)ICProporCyPage:OnShowWindow(bShow,nStatus);//TODOAddyourmessagehandlercodehere)BOOLCNewCuCOtfPage:OnSetActive(>(//TODOAddyourspecializedcodehereand/orcallChebdseclassreturnCPropertyPageOnSetActive);)voidCNcwCutoffPage:0nPainc()(CPaintDCUc(this);//devicecontextforpainting//TOiX):Addyourmessagehandlercodehrem_LoFreqSlider.SecPos(COWTROL_RANGE-g_DSPManager->GeCPar^mVaaueOcLoCuCoffFreq)>;m一LOQSlider.SeCPos(CONTROL^RAMGE-g^DSPManager-sCeCParamValueCXJUoCatoffQ));m—HiFreqSiider.SetPos(CONTROL—KANgS-9一DSPM3nagei:->GetParamValue(JcHiCutoffFreq)>;m^HiQSlider.SeCPos(CONTROL_RANGE-g_DSPManager->GctParamValue(kHiCutoffQ));m^WewHiFreqSlider.SetPoe(CONTROL_RANGE-g_DSPHanager->GetParamVeIucIkHiCutoff2Freq));m^NewHiQSlider.SetPoe(C0NTR0L_RANGE-g_DSPMana9er-GetParamValucIkHiCutoff2QlJ;ro^BypassHipas&ButCon.SetCheck(g_D5PManager->GctBypassSccCion()cBypas8HipaB8));mK_Byp3ssLopa8s8utton.$etCheck<g_D5PManager->GetBypa88Section(kBypdssLopass));ro_BypassMix>passButton.SctCheck(g_OSPHanagcr*>GeCBypaEsSectiontXBypassNLopass));//DonotcallCPropertyPagcOnPaintOforpaintingmessages)voidCNewCutoffpageOnBypassHipass(){//TODOAddyourcontrolnocificationhandlercodehereintstate■m^BypassKipassButton,GecStateOt0x3;g^DSPKanager->SetBypassSection(state*kdypa&sHipass);}voidCNewCutoffPageι:OnBypassLopassUt//TODOAddyourcontrolnotificationhandlercodehereintstate·>m_BypassLopaesButton.GetState()(c0x3;g_DSPManager->SeCBypassSection(state,kBypaesLopass);JvoidCNewCutoffPagelOnBypaseKewLopassO{//TODOAddyourcontrolnotificationhandlercodehereintstate■tn_8ypassNLopassButton.GetStateOt0x3;gDSPManager->5etBypassSection(state,kBypassNLopaes);]//She1£EOPa^am.cpp!implementationo£CheCShelfEQPararnclass·///////""http://""http://"http:////""""http://////"""http:////""http://////"http://"http:////"Zinclude-stdaCx-h-8include-sa.h"ftinclude"ShelfCQP^ram.h"include<6tdio.hinclude<math,h>flifdef一DEBUGdvuidefTHIS_FILEstaticcharTHIS_FILE(|-—FILE一;definenewDEBUGeMEXMendii“//////////////////////////////////////////,/////////////////"http://////////Construction/Destruction//////////////////////////////////////////////////////////////////////CShel£BQParAro;CShel£EQFarani<boolhi)ra一Frequency|0·S),mGain(0.0),m_SampleRate(44100.>,ro^HiShelfihi)1^“-acos.);]CSheIfEQParara:-CShelfEQParam()1}voidCShclf£QParamιSetGain(C5tringstr){floatv;sscaiif<£tr,"%ftv);m—Gain·v;ι一voidCShelfSQParam::SetFrcqJCStringtSCr)(floatv;sscanf(Strltv);mFrequency■v;}_voidCSlielfEQParara::GetAllpassCoe£biquadcoef*£)(doublegairma/vc;doublenormFrcq■m-Frequency/m_SanipleRatc/2;w3mjpi^normFreq;gatrcnae(tan(wc/2)-/(tan(wc/2)+Driftra.HiShelf){一f->c{Oj■(£lodC>gamma;//bOf->cll]e1.0;//bl)else{f->c(0)(float)-gammaj//bOf->cU■-1-0;//bl}£->c(2)=0;//b2f->c(3)1.;"aOf->c4)β[tloat)gamma;//al£->cIS]_OjΠα2)voidCShelCEQParamCcCCoef(biquadcocf*fJ(doubleM,L:biqfuadcoefaf;doublegain■(float)pow(10.,m一Gain/20.J;GctAllpassCoef<&af);HU.-gain)/2.;LeU.+gain)/2.;f->ciO位(£loat)Uf.Ci0;//bOf->cli],<foatJiaf.ciiJ*M+af.ci4)·!^,’//blf->cl2]-(float)ClSl4Li··"b2£->c(3J_a£*c(3];f->c4l·at.cl4lif->cj5■af.cl53;}//caolg.h:headerfile“NiCidefined(AFX_SAJ>LCJ一33D93B0B_DQBe_llD2w96EE_00609"7CDB9E2一XHCl>\JOtOJdefine一33D93BOB_iDOBa~llD2M96eE_006097CDB9E2一HifJ4SC一VER>.1000Vpr^ginaoncHendif//.HSCmVER>·1000//""http:////"""""http://""""http://////"http:////////""""""""""""""http://///CSaOlgdialogclassC5aDlgιpublicCDialo9ι//Constructionpublic*CSeDlgiCWnd*pParent■KULL);Ifstandardconstructor//DialogData//{(AFXJ)ATA(CSaDlg)enum{IDD■IDD一SA-DIAKXi]iUNOTE;theclassWizardwilladddatamenibershere//}}AFX^DATAffcla&eHizardgeneratedvirtualCuncCionoverridesff[(AFX_VIRTIWL·(CSaDlg)protectedvircualvoidDoDataEiichange(CDataExchacge*pDXI;//DDX/DDVsupport"JJAFX一VIRTUAL·//implementationprotected;HICONm_hlCOn;//Generacedmessagemapfunctions//[(AFX一MSGfCSaDig)virtualBOObOninicDlalogU;atx^msgvoidOnSysComnand{UZHTHID,LPARAH1PararaJ;afX^irvsgvoidOnPalnC(>;afx_msgJICUHSORonOueryDraglconOafx^msgvoidOnBucConlO;afx—msgvoid0nButCon2();//]Tafx_hsgDECIDEMESSAGE_MAP<>};■““//{{AfX_IHSERTLOCATION]}μicrosoitDeveloperSCUdiowillinsertadditionaldeclarationsiirenediatelybeforethepreviousline·tfendifUldfcfined(AFX^AOLGJi_nDS3BOBJ50B3_llD2_S6ES_0060S7CDDSE2—INCLUDED」//saDlg.cppimpXementaCionfile//#incl"de-stddfx.h-Minclude"sa.h"0include"saOlg.h"ttinclude*uriit_ppi.h"^include"functs.h·tfinclude"TabDialog1H"_DE3UGIideCinenewD£BUG_newtfundeCTHISeFILS“staticcharTHISFILEIJ-—FILE—;Ifendifstaticintandjdol^y■1000;staticintJLo一delay■50;/////////////////////ζ////////;/;/////////;/;//////////////////////////////////CAboutDlgdialogusedforAppAboutclassCASwutOlg:publicCDialog(publicCAl>OuCDlg0//DialogData//{(AFX一DATA(CAbouCDlg)enum{IDDIDO^AfiOUTBOXJ;//))afx^pata—//ClassWizardgeneratedvirtualfunctionoverrides//{(AFXeVIKTOAL(CAboutDlg)protected:virtualvoidDoDataBxchange(CDataExchange*pOXi;//DDX/DDVsupport//})AFX_VIRTUAL//Implementationprotected//{AFX_MSG(CAboutDig)")}AFX一MSGDECLARE二MESSAGE一KAP()CAJboutDlgi:CAbputDlg<)CDialog(CAboutDlgJsIDD)//{(AFX^OATAeINIT(CAboutDlg)//}JAFX二DATA:INITvoidCAboutDlgDoOacaExchange(CDataExchange·pDX)CDialog-DoDataCxchange(pOX);//{{ATXeDATA^MAP(CAbouCDlg)//))AFX:DATA:MAPBEGIN_MESSAGe_MAP(CAbOutDlg,CDialogJ//(TaFX_MSC^MAP(CAbOUtOlcf)//Nomessagehandlefe//}jafx_msc__mapENO_NESSAC£_MAPO"if""""iUUH⑴"""""""“"""iUUHH""""""HiHUi""/iCSaDlgdialogCSaDlgCSaDlg(CHnd4pParenc/NULL·/)ιCDialc>g(CSaDlgIDD,pparent){//{{AFX_DATA_INIT(CSftDlg)//NOTEcheClassHizardwi]1addmemberinitialisationhere//})apx_data_init//HozcthatLoadlcoiidoecnocrequireasubsequentDesCroyIconinwinJ3ηhicon■AExGetAppO->LoadIconUPRHAIDFRAME);J“voidCSeDXgDoDataExchange(C0eCExchan9c*pDX){CDLalog::DoDataExchangc<pDX);//({AFX_DATA_MAPtCSaDlg)//NOTEtheClassWlzardwilladdDDXandDDVcalle^re//}]afx_datamapIBCOI^MESSAGE^HAPiCSaiOlg,Coialog)//((ATX_MSG_MAP(CSaDlg)OM_KM_SYSCOmAND()OH^WIePAINT(JOH:KM:QUERYORACICOH()CLlC^DilDC-BUrrONl,OnBuCtonl)0)TbN_CLICKEDiIDC^BUrTCWa,OnDutton2>"T)a7x一MSC_MAP_ENl)_MESSACE_MAP()//////////////////////"http:///////////////////////////////"http://"http://Z/////////,"http:///CSaDXgmessagehandlersBOOLCSaDlg::OnInitOialog({CDilog;OnInitDialog{);//AddkAbout;-.."vtenuitemtos/sccmmenu.//IDMewXBOUTBOXmustbeinthesystemcoavnandrdnge.ASSERT<UDM一ABOUTBOXLOxFFFOi,=IDM^ABOUTBOX);ASSERT(IDM_ABOUTSOX<OxFOOO);"CHenu·pSysHenuGecSysteiQHenu(FALSE);if(pSysMenu1NULL)\CStrinsstrAbcutHeou;AtrAboutMenu.LoadString;i£(1etrAboutNenu.IsEmpty())(pSysHenu->AppendMnu{MF^SEFARATOR};pSyeKenu->Appen<Wcnu(Mr~STRIWO,IDNABOUTBOX,sCrAboutMenu);}““)//Settheiconforthisdialog.TheCxomeworkdoesthisautomatically//whentheapplication'smainwindowianotadialogSetlcon(m_hIcon,TUEJ;//SetbigiconSetIcon(ra—hlcon,;//Setsmallicon//TODOAdde^ctrainicializ&cionhereitiload^dll()falGe)MeesageBoxi_UNIT_PPInocfoundinthesystemdirectory,fixthieandrestartapplication.");returnfalse;>‘iηit_por<1);eet一delay一cnt一value(cmd-delay};aet—io—delay^cnC—value(delay);returnTKUE;//returnTRUEunlessyousetthefocustoacontrolιvoidCSaDXg:;OnSy6CO(ranand(UIHTnID,LPWlAMlParam)ιiiIInIDI,OkFFFO)·-IDM_ABOl/rOOX)CAboutOlgdIgAbout;dIgAbout.Dohodal();COialogtOnSysCommand(nID,IParanO;))UItyouaddaminimizebuttoncoyourdialog,youwillneedthecodebelowfftodrawtheicon.ForMFCapplicationsusingthedocument/viewmodel,//chisisautomaticallydoneforyoubytlieftamcwovk.voidCSaDlg:OnPaiTVt<){ifUaIconici))CPaintDCdc(chis);//devicecontextforpaintingSendMessage(KM一ICONERASEBKGNP,(WPARAM)dc.CecSafeHdci)#O);//Centericoninclientrectangleinccxlcon-OetSystecoMetrics(SM_CXICON);InCcylconGetSyBtemMctrics(SKeCYICONi;CRectrect;GetClientRectUrectJintχ(rect.Midtht)-cxlcon+1)/2;incy=<rect.Height()-cylcon+1)/2;//Drawtheicondc.Dravicon(x,y,m_Jhlcon);}_else{CDialogOnPaint(>///Thesyecemcallsthistoobtainthecursortodisplaywhiletheuserdrags//thendni^dicdwindow.HCURSORCSaDlgOrtOueryDragIcon(>Ireturn(HCUR50R)mhicon;voidCSaDlgOnButtonl(){longtlong;tlong-spixchng24ioxAA55AA>;tlon9sepi_xchngf2l(OxO);voidCSaDlg;OnButcon2(){//Longtlong;////tlong=epi_xchng24(Oxgs*321);//11ongοepi^xchng24(OxoJ;CTabDialo^dig;dig.DoHoddlO;//5a.hmainheaderfilefortheSAapplication“(defined(AFX^SA^H^aJDJ8(9eD0Ba_llD2_SEE_OOGD97CDB9E2一INCLUDED一)flde£inAFX一SA_H二二11D2二36EE二Oa6o57CDB9E2一INCLUDED一Hii^MSCmVER>■1000onceIendif//一MSC一VER>-1000Difndef—AFXWIH一H一!errorinclude‘stdefx.h‘beforeincludingChis£ileforPCHKcndifAinclude"resource.h*//maineyrobolsiu"H""""H""ium"mm""ff"""""itm"iICSaAppι//SeeOA.cppfortheimplementaciono£Chisclass//claaeCSaApp;publicCWinAppιpublicjCSaAppO;//OverridesJiCla^sHizardgeneratedvirtualfunctionoverrides//((AFXetVIRTUAL(CSaApp)publicvirtualBOOLInitInstanceO;//}AFX一VIRTUAL//Iraplementation//{(AFXeKSG(CSaApp)i!NOTE-theClassWizardwilladdandremovememberfunctionshere.fjt>0KOTEDITwhatyouseeinthesblocksofgeneratedcode1一MSGD&CLARS^MBSSACSMAE()h“一iUtiiUUUIUlUiiUiitiiiilf!liftfIHIilUUHiUUtnUUiIliUfiifKifU//{{AFX_INSERT_L0CATI0M)}r//MicrosoftDeveloperstudiowillinsertadditionaldeclarationsiirenediatelybeforethepreviouslineffendiCit!defined<AFX_SA_H_33DDO^_POBeellD2e9GEE:_0060S7CDB9E3一INCLUDED一It/sa.cpp;Defincstheclass'behaviorsCorCheapplication.//((include"scdaix,h"Iinclude"sa.h"^include"saDlg.h·iincludeiiTabDialog.h"ifinclude"I2CDialog.h"eincludeftDSPS^kManager.h"CDSPSCkManager*g__DSPManager;ttifdefJiEBUGedefine"newDEBUG—NEWfiundeiTKXS^FILE"“staticChar-TinswFILEI]—FILE__··tendi^/////////////////////////Ζ//////;//////////////////////////////////////////////CSaJ^pBEGIN_MESSAGE_MAP(CSaApprCWinApp)//(JaFX^MSG^MAP(CSaApp)//NOTE‘theClas^Kizardwilladdandremovemappingmacroshere.//DONOTEDITwhacyouseeintheseblocksoCgeneratedcodeI//)}AFX一MSGON一COMWAWDfID一HELP,CWinAppiOnHelp)end_message_mapT)///////////////////////////////////////////////////////y///////////////////////CSaAppconstructionCSaApp;CSaApp()(//TODO:addconstructioncodehere,//PlaceallsignificantinitialisationinInitXnstance///////////////////////////////////////"http://////////////,////////////////////Ζ//TheonedndonlyCSaAppobjectCSaApptheApp;;//////////////////////////////////////////////////////////////////////////////CSaAppinicializacionPOOL·CSaAppInitlnstancc<){AfxEnableControlConCainer();//Standardinitialization//IfyouarenotusingCheecfeaturesandwiehtoreducethsiic//ofyourfinalexecutable,youshouldreowsvefromthefollowing//theepGcificinitializationroutinesyoudonotneed.*ifdef一AFXDLLEnable3dControls<);//CallthiswhenusingMFCinasharedDtLHeleeEnablc3dControXsStatict);//CallthiswhenlinkingCoMFCstaticallytfendififSeCdialogbackgroundcolortoblack//SetDialogDJiColor(RGB(O,OrfOJ(RGB1255,255,25S)}inCresponse;CIJCDialogidlg;try{if((responseidlg.DoModal\)>J-IDOK)if<responseIDABORT1{AixMessageBox("Troubleinitializing"),Sleep(IOOO);//returnFALSE;))catch(CException·e>{//print£("Troubleinitializin^Xn·);//sleep(iooo);returnFALSE;}//CSaDlgdig;CTabDialogdig;m_j)MainWnd;intnKeeponse■dig.DoModal();if(nKesponse-=IOOK){//TODO;Placecodeheretohandlewhenthedialogis//dismissedwithOK}elseif{nReeponseIOCAMCCL)(//TODOPlacecodehereCohandlewhenthedialogis//dismissedwithCancel//Sincethedialoghasbeen//application,ratherthanreturnFALSE;closed,returnFALSEbothatweexitthestarttheapplication'smessagepump.113Kif!defined(AFX_TABDIALOC_H__SCB3Dr04_020F_llD2-96Ee_00€091CDBSE2一INCLUDED^}tfdcfineAFX_TABd7aI,C>3_H一SCB3Dr04_D20F_J.lD2_9€E:E_O06097COB9E2一INCl-.UOED_if_MSC_VER>IOOO丨pragmaonceKendif//_MSC_VER>-IOOO//TabDialog.hheaderfile//tfincrlud^ftinclude丨include4includeincludeIlincludeItincludeifincludeIiincluclGVinclude■Pagcl.h""MainPage.h·'"DDX-h""NotchPagel.h""NotchPageZ.h"llStWaveRejPage.eSheXvPage^h"^NewcucoffPage."AllpassPage.h""DBNotch.h"http://"http://///////////////////////////"http://///////////////////////////////"http://///////CTabDialogdialogclassCTabDlalog:publicCDialogt//ConstructionpublicvoidDisplayI2CState(longrror);virtualvoidSet5tatus£crind(intwhich,CStringfcs);CTabDialog(CWnd"pPar'entNULL);//standardconstructorifDialogData//{{AFX_DATA(CTabOialog)enum{IDDIDD一DIALOGl};//NOTEtheClassWizardwilladddatamembershere//}}AFX_DATAftOverrides//ClassWizardgeneratedvirtualfunctionoverrides//{{AFX一VIRTUAL(CTabDialog)protectedvirtualvoidDoDataExchange(CDataExchange*pDX);//DDX/DDVsupport//}}AFX一VIRTUAL·HImplementationprotectedvirtualvoidDieplayMo^e(int);cstacussarCPropcrtySheetHICON//CPagelCMainPageCDDXCKotchPagclCNotchPagc2CStHaveRejPageCShelvPageΙCCuCoffPageCNewCutoffPageCAXlpaeepageCDBNotchCBrushUINTBOOLintintra_statu9Bar;m__dlgPropSheet;m^hlcon;m一Pagel;MainPage;m一DDXPage;m一WotchlPage7πι一NoCcUZFage;ra^StWaveRejPage;re_shelvPage’m_CutofCPage;m一CutoffPage;m^AlIpassPagc;m_DBWotCh;m^brueh;m^cimerlD;m_HOCDDiEplay;mErrorCounter;ifGeneratedmeecagem^pfunctions//{IAFXeMSG(CTabDialog)115BOOLOnIniCDialog();voidOnSysCCmwand(UINTπΙΟ.LPARArtlp{iramj;voidOnPaintO;HCUKSOROnO^cryDragicon);voidOnClose();voidOnMove(intχ,inty);HBRUSKOnCtlColoc(CDCpDC,CWndipWndtUINTnCtlColor);voidOnOpenMenu;voidOnSAveMenu();_voidOnTimer(UINTnlDFvent);voidOnFiieExporcparamfile<);//}了AFX-HSGDECLARε_(tái)ΜZSSAGE^MAPt)//{(INSERT_LOCATIOKJ)//MicrosoltDeveloperSCudiowillinsertadditionaldeclarationsimmediatelybeforethepreviousline.IfendiC//!definedAFX一TABDIAL0G_H__SCB3DF04一D2flF一11D2一9CEE”00€057CDBSE3—INCLUOEDto)//TabOialog.cppimplementationfile//HincltJde"scdafx.h"Minclude*sa.h·Kincludc-TabDialog.httincludc"DSPSSkManagci.Ηνinclude"I2CCoprun£rrorDialog.h"^include<a£xdlss.h>ffifdef_DEBUGIfdefinenewdedug_newIfundeCTHIS_FILE~StaticcharTHIS一FILE"·一FILE一;BendiC“一defineTIMERIDXdefineID_HDCD_DETBCT56000define1D_ERROR_DlSPLftYCID_WDCD_DETECT+1>staticUINTauIDSCatusBarI■{ID^SEPARATOR,ID_HDCD一DETECT·ID:SEPARATOR,IOERRORDISPLAY樣defineAARRAYSXZC16staticchar*Detect一ArraylAARRAYSIZE》{■HDCD-HDCD"HDCD-,_HDCD-,■HDCD■HDCD_·,HDCD-f_HDCD“r*HDCD"HDCD_,"HDCD··■UDCDirHDCD"-DCD-CDOHOHOC"Hm"iuuf"mf"""!um"m!·ι"""""""""川Himuni""http://CTabAtKjutDlgdialogusedforAppAboutclassCTabAboutOlgpublicCDialog(publicCTAbAboutDXgti;//DialogData//{(APXfcDATA(CTabAboutDlgienum{IDD-IDD^ABOUTBOX};//"AFX-DATA*//ClassHizardgeneratedvirtualfunctionoverrides//{(AFX—VIRTUAL(CTabAboutDlg)protectedvirtualvoidDoDacaExchangeICDaCaExchange"pDX]··//DDX/DDVCUpport//})afx_virtuai.//Implementationprotected://{(AfX_MSG(CTabAbou101g)//))AFX_MSGDECLJU^E~ESSAGEMAP{)CTdbAboutDlgCTabAbou101g()‘CDielog(CTdbAboutOlgIDO)//{(AFXDATA^IMIT(CTabAbOVtDlg)"jJAFX一DATA一IMiTvoidCTabAbouCDXgDoDataExchange(COACaBXChange4pDX)COialog:DoData£xcban9€(pDX);//{{AFXDATAMAP(CTabAboutDlg)//)JAFX^OATAeMAPBEGXN_HESSAGE_MAPICTabAbOUtDlgrCDialog)//{(AFX_WSG_MAP(CTabAtooutDlg)//Nomessagehandlers//)}afx_ksg_mapEND_MESSAGEMMAP(1//////////////////////////////////////////////////////////////////////""http://///CTabDialogdialogCTabDiaI09CTabDia1ogICWnd·pParent"=NlHA1*/)CDialog(CTabDialog.-IOD,pParent){//{{AFX_DATA_INIT(CTabDiaiog)itNOTEtheClasBWizardwilladdmemberinitializationhere//))AFX一DATA一INITmhlcon'·AfxGetAppO-^LoadIcon(IDR_MAINFRAME>;}“voidCTiibDialog;DoDataExchange(CPataExchange·pDX){CDialog;OoDacacxchange(pDX);//{《AFX_DATA一MAPCCTabDialog)//NOTEtheClasswizardwilladdDDXandDDVcallshere/(J)AFX一DATA—MAPBEGIN—MESSAGE一MAPiCTabDialog,CDialog)//{lAFX_MSG~MAP(CTabDialog)ON_WM_SYSCOHMAND()ON一WM一PAIMT()ON_HM_QUERYDRAGICON(>ON_WM_CIAJSEI)onZwmZmovet)ON二WM:CTLCOLOR(ON_CCitMAND(ID一MENliITEM]2771.OnOpenHenu)ON一COMMAND(ID二MENUITEM32772.OnSavcHenu)OW=WMJTIMERi)-ON_COMMAWD(ID_FILE_EXPORTPARAMFILEfOnFileExportpararafile)//Τ)ΑΓΧ_Μ30_ΜΛΡ“END_MESSAGE_HAP()⑴…Hm"Hium"川I""""""""""""""""··‘""""""""http://CTabDialogmessagehandlersdefinePS_WIDTK222definePS一HEIGHT215BOOLCTabDialogzOnlnicDialogOintpartaList"{50.100,ISO.-1};OnInitDialog();//Add"Abgut...·menuitemcosystemmenu.//idm_ABOUTBOXmusebeinthesysttm.coornandrange.ASSERTI<1DH一ABOVTBOXb,ΟχΓΓΓΟ)■■IDM^ABOUTBOX);ASSERT(IDM^ABOUTOOXcOxFOOO];“CHenu·ρSysMenu■CeC5ysteavMnu(TAI^SC);it(pSysNcnui*KUUL^IcscringscrAboucnenuscrAbouCMenu,Load5CYing[ID5_x&0UTD0X)ιit(iscrA&ouCKenu.le&npty(>7{pSysMenu->AppndrtenuIHFeeSBPASATOR)··pSy9Menu->AppcndJ1enu<HfSTKNG,IPMΑΒΟΙΓΓΒΟΧ.etrAboutMenu>;)““)//Sectheiconforthisdialog.TheframeworkdoesChisautoratically//whenttieapplication'·mainwindowisooCadialogSetrconCOarTRUC);//Setbi^icoaSetIci>n(m_hIconfFAJLSC}t//Setsmallicon//buildbrushm_brush.CreateSoZidBx-ush{RG8(0<O,0));//buildprop&heecn_dlgPropSheC.AddPageUm^WainPoge)jni^dlgPropSheet.AddPage{fcm一DOXPege);oijdlgPropSheet.AddPage(irin_She1vPage);m_dlgPropSht.AddPage(fcm^cuto{CFage);ni^dlgProp5heb.AddPagc(LinjNotchXPosc)_·m_dlgProp5heet.AddPa9(Kim^NotchZPasc);rn^dlgfropSheet.AddpascIbmbjStWaveRejPagc);n_dlgPropSheet.AddPagePage)in一digPropSlieet.Addpage<tn\_DBWotch務(wù);v;_dXgPxopSheet.Create(this,WS_CHILD|WS_VISIBLE#Q);n^dl^PxopShcct.odifyScyleEx(0,ws__BX_COKTROL·PARENT);m_dlgPropheet.WodifyStyIc(OtHS_TABSTOP;m_dlgProp£ht.SetIiindowPo9(HULL.O,O,PS—WIDTH,PS—HEIGHT,SMP—NOZORDER|SHP_N0SI2E|SWP一NQACTIVATJi;//Tesi^edialogtofitpropβheetxACtl/RECTxcct;ni^dlgPropsheet.GetWindowR^ctIircc);//ct.traCCom+-14;//rect.right14;Settfindowpoc(LWndBoCCOin,recc,IcittrccC.cop,recc.rlghc.recc.boctcm,SWP一NOZORDeR|SWP一HOMOVE;“AddBCatuabarAECToiserect;eizerecc.top■PE_HEIGHT;q^zercct*bottooi■eikrect.cop29·-elzerect.left■O;izerecc.krighcPS^WIDTH;//m_StatueBar.CreatB<WS_CHILO|WS一VISIBLE|CCS^BOTTOH,eizerect■thl.AFX-IGH一STTVTUS—BA^i//m^scatuaflar.ShowMindow(SW_SH0WtJA7,*//m^StatueBar.$($imple();//m^ecatusDar,SCCTCXC("HelloworldI255.0);m_Ct&tueOAr.Crte(thie);/7m_Ct*cuBr.£cCIndicat:DrsUulOSCecusDar,slzeoCleu3DStatua3ar}/Bizeof(UlMTi)///ra'fitacualiAr.StPncIniro<Orm_SC*CUKSar.CecltemIDiOi.SBPS一STRETCH,MlTLLJi//m_SC*tu8r.0tstatusBarccr3<).SctTcxt("Helloworldto,;CK^CCrcClientStert;CRectrcCllontHcw;GcCClIcntKect(rcClicntStartl;RCpositionDars(AFX_IDW_CONTr6lBAH_FIRST,AFX一IDW一COMTROLBAR一LAST,OtreposQucry,rcClientNow);I!Nowmoveallchecontrolstheyai;einthesamerelative//positionwithintheremainingclientareaastheywouldbe//wichnocontrolbars./·CPointptOffset(rcClientWow.cft-rcCliencStart.left,rcClientNow.top-rcdientStdrc.cop);CRectrcChild;CHndpwndChildCeCWindow(CVieCHILD);while(pwndChild){pwndChild->GetKindowRect(rcchiid);ScreenToClient(rcChild);rcchiid.OffcetHectIptOffset>;pwndChild->HovcWindow(rcChild,FALSE);pwndChild■pvmdChild->GetHc*tWindovr()J*///AdjustChedialogwindowdimensionsCRectrewindow;GetHindowRect(rcKli>dow);rcWindow,rightrcClient5tart.Widtht>-rcClienLNow.Width();rcWindow.bottom+■rcClientStart.Kel^hC<>-rcClientNow.Height(>;rcwindow.bottom5;MoveWindowtrcWlndow,FALSE);//AndpositionthecontrolbarsRepositionBars(AFX^XDM^COKTROLBAR^FIRST,AFX_IDtf^CONTROLBAR^LAST,0);ιπ_timerIDO;m_timerIDSetTinver<TIMERII>.SOiNULDim一ErrorCounter■O;m^HDCDDisplay■false;DiepXayMo<3e(l)SetWindowTcxt(parteList(0]ηpartsListll_parccLicc12]·partsList(3]-1;m^StatusBar.GetSCatusBarCCrl<)Untitled·);rcClientNow.WidthO/4;partsLietiO]+(rcClientNow.Width(J/4).partsList(l)+ircClientNow.Hidth()/4),.SeCPartsisizeof{paxtBList)/sizeof(int).partsLisC)returnTRUE;//returnTRUEunlessyousetthefocustoacontrol//EXCEPTIONOCXPropertyPagesshouldreturnFALSE}voidCTabDialog:OnCloscUif{m一Pagel)deletem_Pagel;if(m一Page2)deletent^Page2;if{m一Page3)deletero^Pge3;if(w_timerID)KiUTimertm^timerID);deleteg一DSPManager;COialogOnClose{);voidCTabDi^log:rOnSyeConmandCUIKTnID,LPARAMlParam)IiC((nIDL·OxFFFO)IDMAfiOUTBOX)“CTAbAbcutDlgdlgAbouc;dlgAbout.DoModal();}elceιCDialogOnSysConvnand^nID,IParamJ;voidCTabOialog:0nPainC<){//CPaincDCdc(Chis);//devicecontextforpaintingifTODOAddyourmessagehandlercodehere//DonotcallCDialog::OnPaint(forpaintingmessagesi£(ZsIconic《))ICPaintDCdc(thisi;//devicecontextCorpaintingSendMessagc<WM_ICONERASEBKGND.<WPAHAH)dc.GctSafeHdc(,0);itCentericoninclientrectangleintcxIcon*GetSyetemMetrics(SM_CXICON);intcyxcon=GetSystcmHetrics(SM^CYICON);CRectrcct;GetCXienCRcct(trect);intκ■(rect.Hidthl)-cxlcon+1)/2;inty-rect-Height"-cyicon嗱1/2;//Dravtheicondc.Drowicon(xy,m^hlcon){//m一StatusBar.RedrawMindowO;COialogOnPaint(>;]voidCTabDialog:OnMove(intx,inty){CPialog::OnMove(x·y);//TODOAddyourmessagehandlercodehere}ifThesystemcallsthistoobtainthecursortodisplaywhiletheuserdragsiftheminimizedwindow.HCURSORCTabDialog:OnQueryDragicon()ιreturn(HCURSOR)m_hIcon;HBPUSHCTdbEJialog;:OnCCIColor(CDC·pDCfCWnd·pWnd,UINTnCtlColar)(HBRUSHhbr^CDialog::OnCtlColor(pDC,pWnd,nCCIColor);//TODOChangeanyattributesoftheDChere//TODOReturndifferentbrushitthedefaultisnotdesiredreturiihbr;ifοreturnm^brush;endievoidCTabDiaiogjOnOpenMeriu()(121//TODOAddyour<Qtwaodhandlercode'heref{CtwrBASED-CODEeaFilterU·-TextFiJttC.C*Cl|"I|";//CFLLeDialogfilOlg(TRUE,WOiI/,MULL,OL,CZFilCCT.'NULL)//CFileDilogfiIeOlg(TRUE);CFilDi擓lc>3filcOlg(TRUE,"txt“(NULL,ΟΓΝΗIDEREADONLlf."TextFileo(·.txt)|*.txt|AUFilsC.MlVthisJfileOl.DoKodal()■·IOOK)(intrray^eie·o;CStrirtgstring;CStringArrayarray;CStdioFilcfilc(£ileOlg.cecPattiNanie(),CFilcimodeRead|CFile:C>T>Texc;vhiIcIfile.Readscringring))(βrray.SetAtGrow(array^size,string);arraysize++··J一g_0SPManager->SecDSPSeccin9S(array);SetvindowTcxc(filcDlg,GetFileNameI));//5/13/99InvalidatecnewindowsochatwindowisredrawnInvalidace(false)voidCTabDidlog:OnSaveHeau()//TODO:AddyourcommandhandlercodahereCFileDiaiogfileDlgrXLSE,_cxt<NULL,OFMJ>VERWHrrEPKOMPT|OFM_jaDEKEADONLY,^TextFiles{*.txt)j*.txt|Jthis);i£(fileDJg.DoKodal()IDOK){InCarray_ind*·O;cscringstring;CStringArrayarrayjg_DSPMatiager->CetDSPSettings(rreyj;CSCdiorllefile(EileDlg,GetPathKameU,CFile:modeCreaCe|CFileJtnodeWciCc|CFiIcstypelcxt);while(arrayindex*arr&y.GetSize()I{一scring_arcey.CetAt<array_index);£ile.Writ:D&txin9<trin9;filo.MrlbaSCrin^(\nM);voidCTebDilogt:Onfil&Sxportp&rainfile<){CFileDialo^fileDlq(PALSE,^^-,HULL.CFN^OVERWRlTEPROMPTlOFN^HlDBREADONLY,"ParameterFiles(*.prml|·#tbia};it{(CileDld-OoModAl<)IDOK》intarray一index■O;CStringBtrlT>9;CStrlngArr*/g_D$pMana9er>GctfiItcrBlob(array);.,CStdioFlleflie[fileOlg.CecPachNameiKCFiXe:modeCreate|CFile:modeWrite|CFUc。typeB丄站^whilearceyiiidcx.<array.CeCSlzeI{“stringArray.GcCAC(anay^lndex^;file.wriCcString(Stiing);file-WritcStringCXfl-);array^index*;voidCTabOialog;OnTimerIUINTnIDEvcnt){//TOOOAddyourmessagehandlercodehereand/orcalldefaultiffπσενβπTIMiRID(OisplyMode(g_DSPManager->CetHDCOModeO);DisplaylZCState(OL);}elseιCDialog;.-OnTiroer(nlDEvent);1voidCTabDialog:.-DisplayKodeintvalue){if(I>ispla>^I2CState(-value);/*char8(1001;sprintf(AiwOxVx'.-value);m_StatueBar.Getst^tucBarCtrl().SetText<i/*if<ro一tiroeriD}KlllTimertra_timerID);CI2CContnErrorDialo9dlg;charaUOOJ;sprinCf(s,"Ox%x",-value》;<119-m_ErrorCocies;if{dig.DONOda^“IDCANC^lfJBndDialcg(IDCANCEL);.OJ;}timerlDSetTimcr(T3MERID,SO,KULX^);elseif(v&lue){if(ImHDCDDisplay)(_ra一ICnt-O;nwvidxwOm二Stfttu丨Bat.GetSt^tuaBarCCrl()■SctTxt{Detect一Arraym一+J//SctWindowText(DetectArrayiTOAlilx++!);)"—elce{ifCmXCnt>SJ{—tm^ICnt=0;m^StatusBar.GetStaCusBarCtrl().SetText(Detect_Array(m^AIdx++)(1,0),//SecHindovText(DetecteArrayIraeeAIdx++]);if(m_AldxAARAAYSIZ^)mAldxO;m丄HDCDDisplaytrue;if(HDCDDiBplayJmStatueBar.CeCStatusBarCtrl\).SetText("SADCD.-HODONUT1,0>//SetwindowTexc(-BADCD..NODONUT-);m_HDCDOieplay·ialse;voidCTabDialog:SetStatusString(intwhich,CStringts){m_StatusBar.GetStatusBarCCrl().SetTexC(G.O,O):)voidCTabDialogDisplayl2CState(longerror){i£(error)(charsIlOOJ;sprintf(ε^"θχ*χ",error);m^StatusBar.CetStatusBarCcrl《》.SetText(ε,3,0);m_ErrorCounter100;//5seconds)一elseti£(mErrorCounter)ι~m^ErrorCounter—一;£(m一ErrorCourxter>0)return;}g_DSPManager->IsBusyO){_mStatusBar.GeCStatusBarCtrH).SetText("Transmitting..",3,0);}“else{m_ScatusBar.CetStatusBarCtrl(>.SetXext("".3,0);)一))Hifidefined(AFX一STWAV£REJPACE_H一OCr7E309_D790-llD2e_96Be_0060S7CDB3E2一INCLUDEO.)defineAFX^STWAVERΕJ>Ασε_(tái)Κ一一D790二11D3二96Ee=00GC77CDB9C2一IMCLUDED_if^.MSC^VER》》XOOOCpragmaoncetfendL£//^MSCeVER>aIDOOftStwaveRejPage.hheader£ile////////////////////////////////////////////////////////////////////////////////fCStWaveRejPagedialogclassCTabOialog;οββCStWaveRejPageιp\iblicCPropertyPegeιDCCLAR5_DyNCKEATE(CStUaveRejPa9e)//Constructionpublic:CStWaveRejPagcO;-CStWaveRejPage();//DialogDat:a.//((AFX_DATA(CStWaveRejPase)enum{IDD·IDD-PPS)fCButConm—Bypass日uttoi);CSlidcrCcrlmMNotch3doo3tSllder;CSliderCCrlwjiotch3QSlider;CSlidcrCtrLra_Motch2CutSlider;C5lidcrCtrLn:Notch2QSlider;CSliderCtrlin_Notch2Fre^Slider;CSlidexCtrln_otchlCutSlider;CSlidexCtrlm一KocchlQSlJLder,.CSliderCtrlm—WotchlFreqSlider·'//))AFX_DATAiIOverrides//Cla^sHizardgeneratevirtualfunctionoverrides//{{AFX_VIRTUAlitCStWaveRejPa9e)protected;virtuaavoidDoDaca£xchange<CDdCa£xchan9e*pDX);//ddx/ddvsupport//)jAFX_V3RTUAJ>//Iniplmentationprotectedχ//Generatedmessagemapfunctions//{{AFX一MSG(CStwaveRejPige)virtualsooi.OniniCDialogt);fx_msgvoidOnVScrQll(UXNTnSBCode,UINTnPos,CSciollBar*pScrollBar);αfx^megvoidOziShowHindow{BOOLbShow,UINTnSt丨tus>&£χ_σιβ9voidOnFainc{);afx一megvoidOnBypassO;"JTafx—MSGDeclare_message_maP()CTabDialog^m_ParcntWindοw;voidSendStringToUKintwhich););//{{AFX一INSERT一LOCATION))//MicrosoftDeveloperStvdiowillinsertadditionaldeclarationeirwuediatelybeforetheprevioualine.flendiC//EdeCned(AFK_STHAVEHEJPAGK^H一0CF7E209管D730—11D2一9fiEE一00S097CDBSE2一INCLUDED^)//StWavrfRejPage.cppimplementationfile“flinclude"stdafx.h"include"sa.h"ftinclude"StWaveRejPage.h"^include"T&bOialog.h"fiinclude"DSPSekManager,h"flifdefJJEBUG((definenewDEBUG_NEWUundefTHIS_PILEstaeiccharthis一pile|_一FlLC一ttendi£“一—////""http://////""http://////////"http:////"http://"""http://////"http://"http:////"""http:////////"http:///CStWaveRejPagepropertypageIMPLEHEKT^DYNCREATE<CSCWaveRejPage,CPropertyPage)CScwavcRcjPage::CSCWaveRejPagcU:CPxopertyPage(CStWaveRejPage;IPDJ{//{{AFX—ΟΑΤΛ_ΙΝΙΤ(CStWaveRejPage)//)Jafxdata二init)““CStWaveRejPag^·■-CStWaveRejPage(){ιvoidCSCHaveRejPage;DoDataExchange(CDataExchange*pDX)ICPropertyPagej3DoDatacxchange(pDX);//{(AF3<_DATA一KAP(CStWaveRejPage)ODXeControl(pDX,IDC一CHECKS,m_BypapsBut:toiO;DDX一Control(pDX,IDC_SHD£RS(TO_Hotch3BoostSlider);DDX_ContirolpDX,IDC=SUDEfte,ra~Notch3QSlider);DDX^Control{pDX,IDC^SLIDERGim二Notch2CutSlider>,,DDX一Control(pDX,IDC二SLIDERS,m_Motch2QSlider>;DDX_COfltrol(pDX,IDC一SiaDERfl·TOMNoCch2FreqSlider>;DDX=Control(Pl)X,IDc's^IDEW,W^NoCchlCuCSlitier);DDXeControlCpDXfIDC_SLIDER2,m^NotchlQSlider);PDXwControl(pDX,IDC一SLIDER1,m:NotchlFreqSliderJ;//}JAFXDATAKAP一“)BEGIM_MESSAGE__MAP(CStHaveRejPage,CPropertyPageJ//{!AFX—MSG=MAP{CStWavcRejPage)On^wm-VscroIL(jON_WH_SHOWvriNDOW()ON一HM一PAINT(OM_BN_CLICKED(ZDC_CHECKS,OnBypaee)i/T}ΑΧ一MSG一MAP—END^MESSAGE^HAP(]/////////////////////////////////////////////////////////////////////////""http://CStHaveRejPagemessagehandlersBOOLCSCWaveRejPage:OnIrsitDialog()<CPropertyPage2iOnInitDidlogO;//TODOAddextrainitializationhereni^NotchlFreqSlider.SctRangetO^CONTRO^RANGE)m^NotchlFreqSXider.SetPos(CONTRO^RANGE-g_DSPManager->GetParamValue(KNotch3freq));m^NccchlFrqSlider.SetTiCFreqHCONTROL_RANCE+1)/16);m_NotchlFreqSXider.SetPageSiie(PG_COMTROL_AMT);m_Notchlosiider.SeCRaTigclO,CONTilOL_RANCE);m—NotchiQSlider.SetPoe{CONTROL一RANGE-g一DSPManager->GctPacamValueIkNotchJQ));m_NotchlOSlider.SetTicFreq(<COWTROL_ItAiiGE+lJ/l€);rn^NotChlOSlider.ScCPageSize(PG_CONTROL_AT)m^NotchlCutSlider.SctRange(0.COKTPOL__RANGE);m一NotchlCutSlider.SecPosDSPManagcr-CetParamValueikMotch3CutJI;m^NotchlCutSlider.SetTicFreqiCONTROL·一RA^GE+IJ/161;ra^NotchiCutSlider.SeCPageSiie(PG_CONTROL_AHT);m_Nocch2FreqSlider,SctfUnge(O,CONTROL—RANGE;m_NoCch2FrcqSlider.SetPos(CONTROL__RANGE-g_DSPManager->GetParamVaIue(Jcotch4Freq);m_Hotch2FreqSlider.SetTicFreqtiCONTRQL_RANGE+l)/16);m^NotchiFreqSlider.SetPageSiie(pg_COMTROL_amt);m一Notch2QSlider.SetRangeCONTROL二RANCE,·m^NotchiQSlider-SetPoeCCOWTROL__RANGE-g_DSPManager*>GetParamVaIue(kNotch^Ql);m^WocchSQSlider,SetTicFrcqUCoUtROL一RANGE+1》/16);m"NQCch20Slider.SetPageSiiC(PGeCONTROLeAMTJ;m_Notch2CutSlider.SecRange(O·COHTROL一RANGE》;tn_Notch2CutSlider.SeCPoe(CONTROL^RANGE-g^DSPManager->GetParamValue(WJotch4Cut));m^Notch20itSlider.SetTicFrqt(CX>NTOOL_RANGE^l)/16);ra_Notch2CuCSlider.SetPageSize<PG_C0NTR01#_AHT);m_Notch3QSXider.SctRange(O,CONTROLeRANGE);m~Notch30Slicler.SetPoe(CONTROL^RANGE-g_DSPManager->GetParatnVaaue(kNotchSQ));m_Notch3QSli<Jer,SetTicrreq(<C0NTR0L_RANGEi-i>/ie);m^Notch3QSlider.SetPageSize(PO_CONTROL_AMT);ro^NotcKaBoostslider.SetiUnge(O,COtrrROI/__RANGE);m_>lotch360ost5lider.SetPos(C0NTO0L_RAMCE-g_DSPManager'>GetParamValue(kNotch5Cut>;m"wotch3BoDstSlid.SetTicFreq{(COHTROL^RANGE+lJ/iei;ro"Notch3BoostSlider.SetPageSiietPG_CONTROL_AMT);m_PaxentWindow(CTabDialog*CeCParentO->GetParent();returnTRUE;//returnTRUEunlevsyoueettheCocuotoacontrol//EXCEPTIONjOCXPropertyPagesshouldretwainFALSB}voidCStWaveRejPageSendStringToUI(intvhich){CStringBtr;g_DSPManager->GetSCrinaValue(which,str);ro_Parentwindow->SetStit\isString(04etr);)voidCStWaveRejPage:;OnVScroll(UJKTnSBCode,UINTnPos,CScrollBar*pScroIlBar)//TODOAddyourmessagehandlercodehereand/orcalldefaultCSliderCtrlslider(CSliderCtrl*)pScrollBar;intwhich;CProperc/Page-:OnVSciroll(nSBCode,ηPosipScrollBar);Sleep(SO);it(slider--tni_WotchlFreqsliderwhichJcNotch3Freq;lseif(slider;■tm一HotchlQSlider)vhichJcMotch30;elseif(slidertm^NocchlCutSlider)which_XNotchJCut;eleeif(sliderβ·iim_Kotch2FreqS1ider)whichkNotcb4Freq;elseif{Bliderfcm_Mocch2QSlider)vhich“kMotch4Q;elseit(slider■■tm_N0Cch2CutSlidec)which_kNotch4Cuc;eleeif(slidertm_Kotch3QSlider)which_kMotchSQ;elsei£(sliderfcm_NotchJBooctSlj.acr}which·kHotchSCut;elsereturn;g_DSPManager->S€tParamValue(CONTROL^RANGE-slider->GeCPos(·which);SendStringToUi(which);>voidCStwaveRcjPageOnShowWindow(BOOLbShow,UINTnSCdtus)ιCPropertyPage:OnShowWindow(bShow,.nStatus);//TODOjAddyourmessagehandlercodehere)voidCStwaveRejPageOnPaincO(CPaintDCdc(CJiis);//devicecontextforpainting//TODOAddyourmessagehandlercodeherein_NotchlFreqSlider.SeCPos(CONTROL—RANGE-g—DSPManager->GetParamValue(kNotch3Freq));m^HocchlQSlider.SecPos(CONTROL_RANGE-9_DSPManager->GecparamValue(kNotch3Q>);m_otchlCutSlider.SetPos(CONTHOL_RANGi:"g_PSPManagcr->GetParanValue(XNocchJCut)};IneHotchiFreqSlider,SeCPos(CONTROL_RANGE-g^DSPManagcr->GctPararoValue(KNotch4Freq));m_HoCch2Q51ider.Sei:Pos(CONTROL_RANGE-g_DSPManager->GetPararaValue(kNoCch4Q)>;m_Notch2CutSlider.SetPos(CONTROIy_RANGE-g_DSPManager->GetParamValue(kWotch4Cut)J·_m_Notch3QSlider,SetPos<COMTROL_RANGE-g_DSPManager->G€tParamValue(kNotchSQ);m_Kotch3BoostSlider.SetPos(CONTROL_RAKGE-9_DSPHanager->GetPararaValueiicNotchSCut));n\_SypassButton,SeCChecJcIg^DSPManager->Get8ypa5sSection<kBypassConcry));//DonotcallCPropertyPage:OnPaint(>forpaintingmessages}voidCStHaveRejPage;OnBypass(){iiTOD0:Addyourcontrolnotificationhandlercodehereintstate■m_BypassBuCCon^GeCState()i0x3;g—DSPManager->SetBypasESection<state,JcDypassConecry>;)ΛThtcanuroberoCblocks(proc6eingunits),Thesignalflowlinearcurrently.IcemisanasciilineοtextTheIeCormat:isasfο11qwsversionnumberblockCypenumberoZparamsforblock,blockparamIflblockpararaU2blockparamft3blockparamftnblocktypnumberofparamsforblockblockparamMlbloc)cparam42blockparamN3block:paramAn//fileversionnumberdefineBW)0_FILE_VERSION1IlblocktypedescriptorCypedefenam{BLOCK一DEIAY,BLOCK二GAIN,BLOCK^PEQ,BLOCK一AP,BLOCKeLS,BLOCK二HS,BLOCK=HP,BLOCK=LP,BLOCK二LP2}ProccssType;//SPIPEMicroComn.h:interfacefortheSPIPEMicroConimclass.//-//////////////////////////////////////////////////////////////////////Kif!defined(AFX_SPIPEHICROCOMH_H_3JF3EFO$_F6EF_X1D2_96EE_006097CDB9E2一INCLUDED_tldecineAFX_SPIPEKICROCOMM_H__33F9EFOe_F6EF_llD2_96EE_006097CDB9E—INCLUOE0_*if-MSCJ/ER>e1000Hpragmaonceffendif//一MSC一VER>1000Hinclude"DSPComm.hfcclafifiSPIPEMicroComra:publicOSPCoaim(intcmd^dclay;intiο一delay;publicSPIPEMicroCoromO;virtual-SPIPEMicroCoran{J;virtuallongSendDSPHord(Iong);virtuallongSendDSPHemory(char*fIongJ;};endif//ldefinii<ArX_SPIPEMICROCOM_H一33F3EF0S—F.6EF"一11D2—96EE一0QG037CDB9E2一INCLUDED—)//sPIPEHicroCotnm.cpp;imp)emendationo£theSPlPEMicroCOWZ//"""""""""http://"〃〃""""〃"""""""""""""""Iiaclude-st<3fx.h"include*sa.b*Iincludc*SPPEMiC)roCoiirt-h·Siaclude^iuiic^ppi.h"Kiiiclude"funct$h·ilfdef_D£BUCIundefTTfIS^FILCstaticcharTHIS_F3LE(N—PILE一;na^CintnewDEBUC^HEWIcndii"“/""""""""http:////"http:////""http:////////"""""""""""""""ΖUConstruction/DestructionSPIPEHicroCoroftjSpIFEMicroCcwnOio一SO;ifload_eil()—telse>(KeBaageUoxOiULl^-UNn—notlguiidinthesystemdirectory·Fix^his^ndretrtapplication.HilXRobir\*oa",KBOK|H3ICOHSTOPI;}"““else{init_poct^spi(l);一delay一cncjalueCcrad一de!UyeetLo一delay*cntvalueilOdelay];}__--jSPIPEMiccoCoiim::-SPrPEHicroCorauO()IoagSPIPEHicroCoon::5en<30SPw'ord(longvalue){retum(spl^xchsgK(value));}longSPIPCMicroCOrmiSendDSPMcmorylchardata,long(return(OL);!flif!defined(AFXeSHElzVPACE-H一€F151624_D84D_11D2_566E_006097CD89E2一INCLUDED一KdcXineArx^SHELVPACEeH—fiflFIsa^-DeaD二石7CDB5E2__INCLUDED一nit_MSC_VZR>-1000Npragmaonce■endifif_sc_V£R>1000//ShelvPage.hheaderfile//CShelvPagedialogclassCTabOlalog;clasftCShelvPage··publicCPropertyPdge(DECLAJIE_DY>JCREATE(CShelvPagc)//constructionpublicCShelvPd^e{);-CShelvPageO;//DialogData//({AFX_DATAICShe1VPage)nun(IDDtIDO_PJ;CBuCtonra_B/passsecondBucton;CButtonTnvBypaBsriretButCon;CSliderCcrlm_HlBoostSlider;CsaiUerCtrlm_HirreqSlider;CSliacrCtrlm_L0BoosC5Xider;CSliderCtrlWTLorreqSlider;//)AFX—DATA//Overrides//CXassWizardgeneratevirtualfunction,overrides//{{afx_virtualicshelvpage)protected·‘virtualvoidDoDataExchangetCDataExchange*pDX);//DDX/DDVsupport//UAFX一VIRTUAL//IcTiplemejicatlonprotected//Generatedmeesagenapfunctions//{{AFX_msg(CSheIvPage)vircualBOObOrunitDialogf);afx一rosgvoidCmvScroll(ΙΝΤnSBCode.UINTnPos,CScrollBar·pScrollBar),aCx_msgvoidOnShowWijidov(BOOl.bShow,UIHTnStatus*;afx_jns9voidonpaincOafx_cns9voidOnBypassFirstO;afx一magvoidOnBypdssSecondC);//]TAFXwMSGDECLARE—MESSAGE一MAPUCTdbOialog·πι一ParentWindow;voidSendStringToUI(intwhich)h//{{AFX_INSERT^UOCRTIOM)}.//MicrosoftDeveloperSCudiowillinsertadditionaldeclarationsimmediatelybeforethepreviousline.^cnaiCff;OeCinedIAFXeSHELVPAGEeH一6F151624—D8HD一11D2一96EE一一lMCLUOED—J//SheIvPa笮€.cppimplementationfileU、tfinclude"stdafx.ΝΑinclude"sa.h-Iiinclude^Shelvpagc.h"^include-TiibDialog.h"fiinclude-OSP56}<Jiand9ei.h"flifdeC_DEBUGdefinenewDEBUG一NEWKundefTHIS一FILE一staticcharTHIS一FILE[J-—FILE—;Kendif///////////////////////////////////////////////////////////////////////////////CShelvPagepropertypageIHPLEMENTeDYKCREATE(CShelvPage,CPropertyPageJCShelvP39e;CShelvPa9e()sCPropertyPage(CShelvPage;2DD)I//(|AFX_DATA_INITlCSheXvPageJ//ijAFX一DATA二INIT}一■CShelvPaget-CShelvPa^e<){}voidCShelvPages>DoDataExchange(CDataExchange*pDX)iCPropertyPageDoDataExchange(pDX);//{{AfX_DATA一MAPtCShelVPage)DDX一Control(pox,IDC_CHECK3,in^BypaseSecondButtoa);OOX^Control(pDX,IDC一CHEOC1,m_BypaEsFirstButton);DDX=Control(pDX·IDC:SLIDERG,ro_HiBoostSXider);DDX__ControX(pDX,IDC:SLIDER4,m一HiFreqSUder);DD3C一Control(pDX#IDC二SLIDER3rn^LoBoostSlider);DDX一Control(pox,IDC一SliIDERl,ra_LoFrcqSlider);//)TAFXDATAMAP一“““BEGIN一MESSAGE—MAP(CShelvPage,CPropertyPage)//{{afx_msg"maP{CSheIvPage)OH_WM__VSCROLL()ON-WHSHOHWINDOW()ON二WM=PAIHT()ON=BN=CLICKEDtIDC_CHECKl,OnBypaseFiret)ON_BM_CLICKZD{idceCHECKJ,OnBypassSecond)//了}APX_MSO_HAP"ewd_message_hap()////////////////////////////////////////////////"http://////////////////"http://///////CShelvPagemessagehandlersBOOLCShelvPage::OnInitDialog}{CPropertyPageOnInitDialosCJ;//TODOjAddextrainitializationherem_LoFreqSlider.SetRange<0#CONTROL一RANGE);m_LoFreqS1ider.SeCPos(CONTROL_RAWGE-g_DSPHanager->GeCParamValueikLoShelfFreq));m^LoFrcqSlider.SctTicFreq((C0NTF0L_RANGE+1)/16);m^LoFreqSlider.SeCPageSizeiPG^COKTROL^AMT);m^LoaoOfiCSlider.SetKangeiO,CONTROL^RAWCE);m^LcDoooCSllder.SctPoe(CONTROLRANCB-g_DSPHanagcr->Getl,at,aiuValuc(KLoShelCCain));m_LoOoostSlider.StTicFreq(<CONTROb_RANGEl)/16);m_LoBooetSlider.SetPegeSirc(PG^ONTROL^AMT);m一HiFreqSlidcr.SetRangc<0·CONTROL一RANGE);m_HiFreqSXider.S€CPos(CONTROL^RANCE-g_DSPManager->CetParamValuc(kHiShelfFrcqJ);in_HiFreqSlider.SetTicFreq(C0iJrR0l>_RANCE+1>/16);m_HiFrcqSlidcr.SetPagcSiie(PC_CONTROL_AMT);m一HiBoostSlider·5eCRange(O,CONTROL_RANGE);m_i<iBoost5lider.SecPos(CONTROL一RANGE-g_DSPhUnager->GetPararnValue(kHiShelfGain));m_JI!BoostSlider.SeCTlcFreq(CONTROL^RAKGE+1)/1G);m^HisoostSlideir.ScCPageSizetrG^COKTRO^AMT);m_ParentWindow^(CTabDialog·)CetParenti)->GetParenC(J;returnTRUE;//returnTRUEunlessyousetthe£ocuscoacontrol//EXCEPTIONOCXPropertyPagesshouldreturnFAtSE)voidCShelvPageι:OnVScroll<UINTnSBCodc,UINTnPos,CScrollBar*pScrollBar)ι//TODO;Addyourmessagehandlercodehereand/orcalldefaultCSliderCtrlslider(CSliderCtrl*)pScrollBar;intwhich;CPropertyPagciOnVScroll(nSBCode,ηPos^pScrollBar);Sleep(SO);if(slider一LoFreqSlider}which瞧kLoShelfFrcq;el&ei£(eXi^lisr^m_LoBoostSlider)whichkLoShl£Gain;eleeif(sliderUn一HiFreqSlider)which-'k}JiShlEPreq;elseifCslider6mvHi5oostSlider)which-kJiiShelfSain;elsereturn;9_05^ικ9βι:->5ΜΡαΓ3Πν3ιιε|:0Ν>Ι>__ΗΑΝ。Ε-β1·(3βΓ-:^Ρθ5θ,which);SendStringToUI(which);}voidCShelvPage::ScndSCringTouHintwhich){CStringfitr;DSPManager->GetStringValue(which,str);m_ParenCWindow->SetStatusStrin9{Drotr);、.JvoidCShelvPage;OnShowwiiidow(BOOLbShow,UIKTnStatus)(CPropectyPageOnShowHindow(bShow,nStatus);//TODOAddyourmessagehandler1codehere)voidCShelvPage:OnPaint<)(,CPaintQCdc(Chie);//devicecontextCorpainting//TQDOAddyourmessagehandlercodeherem_LoFreqSlider.SfttPosiC0NTR01>eRANGE-g_DSPHanager->CetParatnValue(JcZ^ShelfFreq)>:m_lx)BooscSlider.SetPos^COrrraOL^RhNGE-g^DSPHanager->GetParaniValucIkLoShelfGainJ;Tn^HiFreqSlider-SctPoc(C0NTR0L_RANCE-g_DSPManagcr->GeCParamVa1ue(JcHiShelEFreq));m"HiBoostSlider.SctPos<CONTROL_RANCE-g_DSPMane9cr-^QetPararoValueIkHiShelfGain)J;m^BypasaFirotDutton.ScCChcck(g^DSPManeger-i-CetBypafieSection(kBypaeeLoehelf))ιm_SyP*3SSecond8utton.SetChccIc<g_DSPManager->Oeta/pas5$ection(kByp^ssHiShelf));//DonotcallCPropcrtyPdgcOnPainc()CorpointingmessagesιvoidCShelvPage.-OnSypassFirstI){//TODOAddyourcontrolnotificationhandlercodehereintstate■m_BypdSSFirstButton.GetStatcJt0x3··9_DSPHanager->SetBypassSection(state,kBypdssLoshelf);)voidCShclvPdge;On6ypassSecondUιifTODOAddyourcontrolnotificationhandlercodehereint^tatc■m^BypassSecondButCon.CeCSCBCe()h.0x3;g_£>SPManiger->SctSypassSection(stace,XBypassHiSheXf);)//Microson>rTE>e<cloF>o*nttncaiowrto^^frnrto.rAsocrc辦wcript,、/ttinclude■SMOtfHort-ff.*Bdftfinrt>SH§^0EAI>02rY_WYMo}or(n二三二二二二二r三i三in二二二二二二二…二二三二…二三二…二二三i三i//二Generatedfromrt-mTEXTI2!cr§ttwnnwour-crt.:includesafxrl.haf三……二二三二二………11i…二三……i二三…三…三…二二…fi^underllTaEADONrYOJYMcoorwI—二…三三………i…二一……三……三…fI三…二…二!二…二!三一!//Enu3li9h《c.s"resourcesii-lJCLo£inrtatAfxfRPJ(oOURCEIDLL>一一a^rI\iana(>fx_TARG_E:NU)*iHVdeflvfIN32rsoooraiG丨EKGrItnH-ttuBLANG1ENGEH—cwn-oKagmacodnItop^ftpwwN^Ucndif、/la:s32KirtaeMI二i…二二二二「…二二二三…二二三…二……二!…二……二二…n二二二////TMXHsp§E二1TWXTS9UDEDISCARDABLEOEGIse;**lrrtnOUTCe.h\0sso2TEXTINot-UDE:CWMnESSSaEGlz^include"aarnxres.hflx\K\s3HWXHMZPCOWDIMCARDABI1M09P1GIZ■wae作inc—>p^—Ko—5PLHrxERIRESOURCEW\r\n"■ttdenliscl^xIIsollore丨Rrt(n05RCEM\r\n-■^defineUA甩xIINOl1TRAolKEKIRraOURCES\r\II"Hdecixlrtlr>pxllNO1lPROPttRT5IRES§CE5\x-\p.丨丨丨丨■au-defined<AFX*RESOURCEIDLL)二defined(AFX1TARG—ENU》\r\n*屮Kldlern"LAN§ACnIgKn1,H^rasmacode_page《12in2》\r\pa■^include_*res\\sa,rc2*二OOIl-nicrosol-%rT<hsualC++editedreolourcee\x\n*IMincluAe肩-artxres.rcs霄二srranp-aro.oomponentB\r\n,■ttendi柞\0lsosendiMl二APSTUDIOMoi三I三二三…三二二二二二二二三三…二…二二二二二三…二三二二二二////Icon/、//IconwirrtrHoweetsv&luftplacrtd〔H-Mtnortnsurca匁wlicationioonzHnn^£3oonsilt:ent;oPHInygnAmu,lDIMAIKpiwICOMDISCARDABLE;rt\\3aico**…I……二……二二三ili……二三二二…一三二…三二二二三二二三…、/二Dialog〔0349|__|I-j-IDD^ABOUTBOXDTAIOGDISCARDABLE0,0,2S9,5S|WS^POPUP|WS一CAPTION|AmazingTownCrieVSTYLEOSCAPTIONFONT8,BEGINICONLTEXTMODALFRAMEAi>outKOJsMSSornsScrSYSMEML)DEFPUSHBUTTONIDR一MAINFRAME,IDC一STATIC,i1,17,21.20"KOJ*sAmazingTownCrierVersioni,C119.6,SS_NOPREFIX■Copyright(C)PMI1J99",IDC_STATIC,^■OK",IDOK#220,7,32,14,WS_GROUPIPCSTATIC.r119.MSCAPTION|WSSVSKCKUIDD一SA—DIALOGDIAIXX5EX0,0,229t175STYLEDS^HODALFRAME|KS^POPUP|WS—VISIBLEEXSTYLEWS_EX_APPWlNDOW一CAPTION"SuperAudio"FONTB."MSSansSerif■BEGINDEFPUSHBUTTON-OK".IDOK,X72,7,50,14PUSHBUTTON"CancelV10CANCEL,172,23,50,14PUSHBUTTON-PokeSequence#iMDC_BUTTONl,35,109.25PUSHBUTTON-PokeSequence2MDCMBUTT0N2,3J,123(115,28ENDIDD_t)IALOGlDIALOGDISCARDABLE0,0#236,229STYLEDS_MODALFRAME|WS^POPUP|WS_CAPTION|WS_SYSMEWUCAPTIONVKOJAliasingTownCrier"—MENUIDR_MENU1FOWT6("MSS^nsSerif"BEGINENDIDD—PP1DIAJXX3DISCARDABLEQ,STY1-EWS一CH3LD|WS一DISABLED|CAPTION"Test"一FONT8.-MSSansSerif-BEGINPUSHBUTTON"SendSPXPVSHBUTTOU"SendSPIEND195,127CAPTIONSequence_,SequenceH2'm,IDC^BUTTONl,,26t86,22IDD_PP2DIALOGDISCAROABLB0STYIEWS^CHILD}WS一DISABLEDCAPTION"Main-“FONTB4"MSSansSerifbegin0,266,14€WSCAPTIONCONTROLLTEXTCONTROLCONTROLLTEXTGROUPBOXCOKTROLCONTROLPUSHBUTTOMCONTPOLCONTROLLTEXTCONTROLLTEXTmsctlfi_trackbar32"rTBS_AUT0TICKS|BS^AUTQCHECKBOX|TDS_AUTC3TICKS|tQSAUTOCHBCKB0X|SlidcrlXDC_SLIDER1TBSVERT|WS一TABSTOPPre"IDC一milC,za,117,12,8BypassProcessing"^JDC^CHECKl,"ButtonWSwTABSTOP,173,57,76.10Sliderl*,IDC_SLIDER3,"raoctlo_trackbar32TBS一VERT|HS~TABSTQP#27,25,22,06Posf#IDC_STATIC,S7.ai7,lS,8Volume*,IDC^STATIC,19-15,135,118BypassHDCO*,IDC_CHECia,"ButtonWS_TABSTOP.173,74,76,10B/paBGHDCPGainScale",lDC__CHECK3r"Button",BS^AUTOCHECKBOX|WS_TABSTOP#173,91,96,10ResetAll-.rDC_BUTTONl,173,31,50,14AnalogInput*#IDC_CHECK4,'Qutton",BS_AUTOCHECKBOXIWSwTABSTOP4173#10B75€,10Sliderl",IDC_SLIDER7."msctls一tmckbar32TBS_VERTIWSwTABSTOPr89.2St22.Analog*,IDC一STATIC,85.117,23,eSliderl",1DC_SLIDERB,_n\3Ctl6一trackbar32TBS^VEKTIWS^TABSTOP,119,2S,22,GZDC^STATIC,117,117,\9fB,TBSAUTOTICKS|fTBSAUTOTICKSIDD一PP3DIALOGDISCARDABLE0.0,195,127STYLEWS_CHILD|HS_[>ISA3LED|WS_CAPTIONCAPTION"Cocnpression”FONT8,"MSSansSerif"BEGINCONTROL"BypassCompression",IDC一CHECTK1,WS^TABSTOP,29,24,104,10一END一Button“,BS^AUTOCHECKBOX|IDD_PP4DIALOGDISCARDABLE0,0,244,159STYLEWS_CHXtO|WS_DISABLEDjWS_CAPTIONCAPTION"ResonanceCompensation"FONTB,"MSSanfiSci£"BEGINCONTROL"Sliderl",IDC_SLIDER1TBS一VERT[WS_TABSTOPCONTROL"Sllderl",IDC一SLIDER2TSS_VERT|WS:TAB5TOECONTROL"Slider”,IDC二SLIDER5TBS—VERT|KS~TABSTOP"Frcq.".IDC_STATIC,17QMDC^STATIC,SI,113■Cut/Boost■,IDC__STATIC,71,1FirstNotch',IOCSTATIC,11bTEXTLTEXTLTEXTGROUPBOXCONTROL"msctl5^trackbar32"30,24,20,85iusctX8_tracKljar32"48,24,21,85"wsctls_trackbar32‘17fi,24,20(BS113,20,118,1135,11,TBS_AITTOTICKSrTBS_AUTOTICKSrTBS^AUTOTICKS■Sliderl■IDC^SLIDERimsctl8_trackbar32N,TBS_AUTOTICKSTBS_VERT|WS^TABSTOP,137,24,24,85一CONTROL-Sliderl_,IDC—SLIDERS,msctls一trackbar32"TBS—AUTOTICKSTBS_VERT|WS^TABSTOP,165,24,21,B5CONTROL*Sli(Ieri",XDC_SLIDERC("insctls_trackbar32",TBS_AUTOTICKSTBS_VERT|WS^TABSTOP,193,24,22,BSLTEXT"Freq.IDC^STATIC.135,113,20,11LTEXTIDC_STAT1C.16^.113,6,11LTEXT-Cut/Boost“IDC_STATIC,189,113,32,11GROUPBOX-SecondNotch".IDC^STATIC,129,15.,9B,111CONTROL-Bypass"IDC_CKECKS,"Button",BS_AUTOCHECKBOXiWSJTABSTOP.33,136.39,10CONTROL"flypaca",IDC_CHEC)CS,Button",BS_AUTOCHECKBOX|WSTABSTOP,153.136.39,10IDD_PP5DIAX/OGDlSCARDADLGQ,0#339,162SnaEWS_CHILD[W5_DISABI<EDIWS__CAPTIOScaption"standingwaveRejection"^FONT"MSSansSerif-BEGXKCONTROL"SliderlTBS一VERTCONTROL-sliderlTBS_VERTCONTROLSlider!TBS一VERT,IDC—SUlDERl,'*msctls—trackbar32碰|WS~TABSTOP,20.24,20,65,IDC_SLIOER2,wrasctle_Cracfcbar32"|WS:TABSTOP,4a,24,21,8S,idc3slider3,■msctlfl_trackJbar3Z"jWS^TAaSTOP,76,24,20,esLTEXT_Freq■,IDC一STATIC,17,113,20,11LTEXT-Q-■IDC_STATICfXILTEXT-Cut/Boost“,IDC—STATIC,70,113,35,11GROUPBOX"FirstNOtCh",IDC_STATIC,11,X5#sa,111COKTROL-Sliderl",IDC—SIICISR4,_msctla一trackbar32”TBS^VERT|WS^TABSTOP,229,24f24.8SCONTBOL"SlTderi",IDC二SLIDERS.,"mscti_trackbar32-TBS一VERTIWS二TABSTOP,257,24,21.05CONTROL-Sliderl-,IDC^SHOERC,"mctle_trackbar32"TBS一VERT|HS^TASSTOP,285,24,22,05LTEXT■Freq.",IDC_STATrC,227,113,20.11LTEXT-Q-,IDC_STAT3C,261,113,8,11LTEXT-Cuc/BOOSt",IDC_STATIC,280,113,34,11GROUPBOX-SecondWotch",IDC_STATIC,221,IS,98,121CONTROL"Sliderl",IDC__SLI0ER8,*,msct:l6wtracJcbar32'TBS一VERT|WS^TABSTOP,140,25,21.6SCOOTROL"Sliderl",IDC:SLIDER9,■rosctla_traclcbar32TBS—VERT|HSITABSTOP,168,25,22.8SLTEXT-Q〈IDC—STATIC,144,114,9,11LTEXT"CUC/BOOSCIDC^STATIC.163,114.34,11GROUPBOX-BoostCompensation*,IDC—STATIC,125,15,77,111’tbs_autoticksITBS__AUTOTXCKSITBS一AUTOTICKS)fTBS^AUTOTICKStTBS_AUTOTICKSjTBS_AUTOTICKStTBS_AUTOTtCKSItbsautoticksJCONTROL.-Bypass",IDC_CKECKS,"Button-.BS_AUTOCHECKDOXVISTAJ0STOP;146,137,,10一I0D_PP6D3AJXJGDISCAWDABtE0,0,187,162STYbEVS^CHlhD|WS一DISABLED|WS一CAPTIONCAPTION"Smiley-Face"~FONT8,"MSSansSecif-BEGINCONTROL"SlidcrlTWCVCRT■Slideri'CONTROLLTEXTLTEXTGROUPBOXCONTROLCONTROLLTEXTLTEXTCROOPBOXCONTROLCONTOL.TBS_AUTOTICKS|,TBSAUTOTICKSIDC_SLIDER1,f,msctls_trackbar32'|WS_TABSTOP(20,24,20,85IDC_SLID£R3."msctls_trackbar32"TBS-VERTIWS_TABSTOP,SOt24,20,65■Frcq,",17:113,20,11CuC/Boost",-1.43,113.34,11-Lo-Shelf",-1,11.15,70,111-Sliderl",IDC一SLIDER4■rosctls_trac)cbar32”.TBS—AUTOTICKSITBS一VERT|WS^TABSTOP,108,24,24,85—"Sllderl'1,IDC"$LIDER6,*,msctls_trackbar32TSS一VERT|WS^TABfTOP,133.24,22,85"Freq.-1,106,113,20,11Cut/Boost".-1,13^,113,33,11"Hi^Shelf,-1,100,IS.69,111"Bypass",IDC一CHECK1,-Button-,BS一AUTOCHECKBOX|WSJTABSTOP,25,136,37,12B7p3ee-.II>C_CHECK3.'Button*,BS^AUTOCHECKBOXJWffTABST0P,1XS,J36437,I2TBS-AUTOTICKS|CKO"msctls^trackbeirSS"t2Qt2(2石,85■msctls—trackbar32w,48,24,21,85*msctls_tir3ckbar32_,113,20,11,8,1111IDD_PP7DIAXXX3DISCARDABLE0,0.242,162STXb^VS_CH1U>[WS一DISABLED]WS一CAPTJOWCAPTION-CUtoC£Response"font8,_MSsanssrif,BEGINCONTROL-SIidcr1■.IDC^SLXDERl,TBS_VERTIKS^TABSTOF,CONTROL"Slldeirl",IDC:SLIDER2TBS^VERTJWS二TABSTOP,CONTROLSliderIDC^SLIDERJ.TBS_VERT}WS^TABSTOP,LTEXT"Freq."rIVC_STATICt17,LTEXT"Q",IDC_STATICrSi,113.LTEXTCUt/BooSt",IOC-STATIC,71,113,GROUPBOX-LOWCutoff",IDC_STATICP11,15,98,111control■Sliderl_,IPC一SXilDER4,"rosctls_trackbar32■TBS—VERT|WS:TABSTOP,137,2^,24,85CONTROL"Slider1、IDC二SLIDER5,"msctle_trackbar32"TBS一VERTJMS~TABSTOP,165,24BSCONTROL■Sllderl11,HX:_SLIDERG."msctls_tracWbar321TBS一VERT|WS^TABSTOP,193,34,22,85l/TEXT"Frcq-_,IDC一STATIC,135,113,20,11LTEXT"Q",IDC_STATIC,XG9,,11LTEXT-CUt/BoostIVC^STATIC,189,113^32,11GROUPBOX-HighCutoff-rl5c—STATIC,123,IS.SB,111CONTROL-Bypass",IDC_CHECK5,"Button",WS_TABSTOP,39r139,41,12CONTROL-DypaBfl',IDC_CHECK6,'Button"WS—TABSTOP,154,139,41,12EKD,TBSAUTOTICKSrTBS一AUTOTICKSrTBSAUTOTICKSfTBSAUT0TICK5rTBSAUTOTICKS|,TDSAUTOTICKSAUTOCHECKBOX.BS_AUTOCHECKBOXIIDO__PPBDIALOGDISCARDABLE0STY^EWS_CHILD|HS^DISABLEDCAPTIONHCutoffResponse"FONT8,11MSSansSerif-BEGINcontrolCONTROLLTEXTGROUPDOXSliderl"TBS—VERT0,2BS-I$4|WS_CAPTI0N.I0C_SL1DERI,*,m9cCls_trackbar32-|WS^TABSTOP.20,24,20,05XDC^SLIDER,"ra8Ctl8_^trackbar32'WS^TABSTOP,17,113,20,11Ml“11.15,-31,111,TBS一AUTOTICKS|.TBS—AUTOTICKS]CONTROLCONTROLCONTROLLTEXTLTEXTGROUPBOXCONTROL"Sliderl",IDC_SLIDEft4'mscclstracKbdr32-.XSS^AUTOTICKS|TBS_VERTIWS^TABSTOP.112.24.24.BS—"SliderIDC一SLIDEH5,"msctls_trackbar32",TBS_AUTOTlCKS|TBS—VERTIWS^TABSTOP,H0.24,21,85~Freq.-1,110,113,20,11"Q-.-l.144,113.8,11-HighCutoff-l.104.15.69,ill"Bypaec*rIDC_CECK4,-Button".8S__AUTOCHECKB0X|WS_TWiSTOP,25.136,40,13"Bypass*fIDC一CHECKS,"BuCCon"BS_AUT0CltECKJ30X|HS_TABSTOP,115,136.<0,13"Sliderl".IDC^SLIDERfl-msctls_tr^ckbar32"TBS_AUTOTICKS|TBS一VERT1WS^TABSTOP.203,25(24,BS"5liderXMDC_SLlDER9f"msctlTBS一VERT1WSJTABSTOP,231,2!"Preq..1,201(124.20.11-1,235.114,0,11-HewHighCutoff-.-1.195.15,Bypass",IDC_CHECK7,"Button'HSTABSTOP,207,137,40,13-crac)cbar32'r21.es.TSS^UTOTICKS|6,112,BS_AUTOCHECKBOX|END,■msctl_trackbar32■,20,24,20,85,_msctls_trackJbar32_,48,24,21,65,76,34,20,85,113.20,11,6#X21DDJPP9DIALOGDISCARDABLE0,0.244,1S4STYLEWS—OilLD|WS一DISABLED|MS^CAPTIONCAPTION"RceonanceCorapcnsaCionFONTB,"MSSansSerifBEGINCONTROL"SIiderl-,IDC^SLIDERl,TBS一VERTjWS二TABSTOPCONTROLSllderi',IDC:SLIDER2,TBS—VERT|WS^TABSTOP,CONTROL■Sliderl-.IDC^SLIDfiRJ,TBS一VERT|WS二TABSTOPLTEXT"Freq.IDC^siATIC,17LTEXT,IDC_STATIC,51,X13L.TEXTCut/BoostMDC_STATlC,"71#113.33,11CROUPBOX"ThirdNotch*,IDC^STATIC^ll,15,9B,111CONTROL■Sliderl"IDC_SLIDERflf-mscCls一trackijar32TBS一VERTjWSJTABSTOP,137,24,24,B5CONTROLsiiderl“rIDC^SUIDERS,*msctl8_trackbar32TBS—VERT|WS~TABSTOP,24,21,65CONTROL-Slidcrl-,IDC"SLIDBR6,_msctls一tr玖ckbar32TBS一VERT|WS_TABSTOPf133,24.23,BSLrTEXT"Frcq,-,IPC^STATIC,13S,113,20,11LTEXT"Q1,IDC^STATIC.169f113,8,11I/XEXT"Cut/BoosC",IDC一STATIC,189t113,32,11GROUJBOX■FourthKOtch",IDC^STATtC,129,IS,9B.111CONTROL“Bypass',XDC_CHECK5,-Button*,BS_AOTOCHECKBOX[KS^TABSTOP,CONTROLBypasb■,IDC_CHECK6,■Button",BS_AUTOCKECKBOX|H5_TABST0P.155,135,40,12ENDTBS一AUTOTICKS|TBS一AUTOTICKSjTBSAUTOTICKSTBS^AITTOTICKSTBS一AUTOTICKSTBS一AUTOTICKS3DD__DIAL0G2DIALOGDISCARDABLE0,0,175,66STYLEDS_MOEALFRAME|HS一POPUP|WS_CAPTI0N|WS_SYSMENUCAPTION"Dialog"FONT8,^KSSansSerif*SECZNPUSHBUTTON"Cancel\IDCANCEL,55,34,50,14LTEXT"InitializingX2C.PleaseWait.....II>C_STATIC,43,17,6EKDJDD_DlALOG3DIALOODISCARDAfiliCSTYLEDS_MODALFRAHE|WS陽(yáng)POPUPCAPTIOM"Dialog"FONT8,-MSSaneSerif"BEGINCJEFPUSHBUTTON"OK-,IIX3K,107,35,S0,Ur0r186,WS一CAPTION|WS^SVSMENUCONTROLCONTROl,-C0M1"10"COM2'、IC>C_RADI01,-euCton",BS_AUTORADIOBUTTON,23,-BuCton".BS_AUTORAJDIOBUTTON.23,57,36,70,36,140CONTROLCONTROLLTEXTCROUPBOX10-COM3-.IOC_.RADI03,"DutCon“,BS_AUTORADr08UTT0M,23,92,H10-COM4-,IDC—RADI04.-ButCon-,BS^AUTOfUVDIOBUTTON.23,95.36,10"ChooseCOMportandresetDSPboard".IDC_STATIC,28,21,12S,a-COMPortMDCSTATIC.I5r4S,6C,69IDO_DIALOG4DIALOGDISCARD^BliC0,0(X66121STYLEDS一MODALFRAMEJWSPOPUP|WS_CAPT10N|WS_SYSMENUCAPTION-Dialog““FONT6.-MS5dnsSerifBEGINDEFPUSHBUTTON"OK",IDOK,27,72.50,14PUSHBUTTON"QuitApp-rIDC_BUTTON1(101,72.48,14l/TEXT*I2CcomnunicationerrorIDC—STATIC*EDITTEXTIDC_EDIT1(49,42,68,12.ES_AUTOHSCROLLEND.25,IDOPPX0VIMjOGDISCARDABLE0,187,162STYLEWS一CHILD|CAPTION"AlXpaseFONT8,"MSSansBEXSIMCONTROLCONTROL.LTEXTLTEXTGROUPBOXCONTROLWS_DI5ABLED|HS_CAPTION垂Sliderl_,IDC一SLIDER1,"rasctls_traC)tbar32-#TBS_AUTCrriCK5TBS一VERT}WS~TABSTOP.20,24,20,85SlTderl■,IDC~Sl>IDER3,_rasct;1s^tracXbar^Z",TBS一AUTOTICKSTBS一VERT|WS_TABSTOPf50.24,20,OSFreq.B#-l,17,113,20,11W-l,53,113.aAHpaoa"#-l#11,15.70,111■Bypass",IDC_CHECK1,"Button“,BS^AUTOCHECKBOX|WS^TABSTOP.25,136,37,12IOD_PllDIALOGSTYLEWS_CKILD|CAPTION"Double-FONTB,"MSSanaSEX^IKCONTROLCONTROLLTEXTLTEXTGROUPBOXCONTROLCONTROLLTEXTLTEXTGROUPBOXCONTROLENDDISCARDABLETunedNotch*Serif*,0,244,;59WSCAPTION-SliUerlIDC_SUIDER1"msctlB_trackbar32TBS-VERT|WS^TABSTOP,20,24,20,"Sliderl","rasctlstrackbar32TBS一VERT|WS^TABSTOP,48,24,21,BS嚇-、1,17了113,20,1151,113,8,11Notch",-1,11,15,70,111Sliderl",IDC^SLIDERS,"m3ctls_trckbar32TBS^VERTjWSJTABSTOP,105,24,21,85slider!"msctls_trackbar32TBS^VERT|WS二TABSTOP,137,24,22,05"Cut/Booet",-1,133,113,32.11■CompenBation*,-1,99,15,71,111-Bypass",IDC一CHECKS,Button",BS_AUTOCHECKBOXWS^TABSTOP^^Ufi,39,10TBS^AUTOTICKS|TBS^AUTOTICKS|TBS^AUTOTICKS|TBS一AITTOTICKS|料ifndeCMAC////////7//////////////////////////////////////////////////////////////W///////Version"VS-VERSION-INFOVERSIOHINFOFILEVERSION0,7,4,0PRODUCTVERSION0,7,4.0FTLEFIAGSMASK0x3fLUifdcf_DEDUGFILEFLAGSOXILKelscriLBFUXCSOxOLIIendifΓILEOS03C4LFILETlfPEOxlbFILESUBTYPEOxOLBEGINBLOCK*StringFileIn£o"BEOINQLOCK-040904b0"BCCINvalue"CompanyNatne","PacificMicrosonicsIncΛO"VALUE"PileDescription","saMFCApplicacion\0MVALUE-Filevcrsion1·.·ο·ita.0\0"VALUE_InternalNaraeVALUE"Lega3Copyright·."Copyrisht(C)pmii9$9\oVALUEeOrigiralFilename"r_sa.EXE\o"VALUE■ProductName"saApplication\0"VALUE-ProductVfcraion",-OrIt4,Q\0mENDENDBhOCK-VarFileInfO-GEClNVALUETranslation",t>x409#1200END//i-MACm""""""""""""""Η""""""""""υ"""""""""""if//DESIGNINFO“iiifdefAPSTUOIO^INVOKEDGUIDELIMCSDESICMtKFaDISCARDABLEBCGIMIPD-ABWTBOX·DIALOGbeginLEFTMARGINf7RIGHTMARGIN,252TOPKARGIN.7BOTTOMMARGIHi4BIDD_SAeDlALOG.DIALOG.BEGIN“LEFTHARCtNp7RIGHTMAJtOINf322TOPMARGIN,7BOTTOMMARGIN,168ε卯IDD一DIAL0G1,DIALOG咖InLEFTWARGIK,7RIGKTHM1G2N,22$TOPMARGIH,7BOTTOMHARGIN,222ENDIDDePPlfDIALOGBEGINLEFTMARGIN,7RIGHTMARGIN,IBSTOPMARGINr7eOTTOMHARQIN,120E^PIDD_tP2,OIAUOC-142BECtNLEFTMARGIN,7RIGHTKARGIW,2Q1TOPMAJIGIN,7BOTTOMMARCIN,139ENDBEGINLEFTMAKGIN,7FIGHTWARCINt188TOPKARGIW,7ΒΟΤΤΟΜΗΛΛΟΙΝ,120EKDIDD_PP4·DIAX^OGBEGINLEFTMARGIN,7RIGKTMARGINi23*TOPMARGIHr7BOTTOMNAilGIM#152IDD一PPS,DIALOGB£GIKLEFTMARGIN,7RIGHTMARGIN,332TOPMARGIK,7BOTTOMMARGINi155IDD一PP6,DXALCXSBEGIMLEFTMARGIHr7RIGHTMARGINf180TOPMARGIN,7BOTTOKMARGIN,155END10JPPTtDIALOGBEGINLEiT1MARCIN·7RIGtrmAKGlNf235TOPHARGINf7BOTTOMMARGIH,IS5ENDIDD_PP9#DIALOGB£GTHLEFTMARGIN,7RIOHTMARGIMi27TOPMARGINi7BOTTOKMARGIN,157ESDIDD_PP9(DIALOGBEGIKLEFTMARGIN,7RXGHTKAKGIN,237TOPKARGIN.7BOTTOMMARGIN.ISENDXDD_DIALOG2,DIALOGBEGINLEFTMARGIN,7RIGHTMARGINf168TOPMARGIN,7BOTTOMKARGINiS9EKDIDD一DIAXOG3,DIM>OGBSGlNLEFTTOAHGIN,1RIGHTWUiGINi179TOPMARGINt7DOTTOMMAPGIN.125ENDΙ00_ΙΑΙΧΧ4.DIALOGbegTnUEFTMARGlNf7RIGHTMARGIN,179TOPMAKC1N,7BOTTOHWVRGIN,114ENQIDD一PPlO,DIALOGLEFTWARGIN.7RIGHTMAftGn^ISOΤΟΡΚΛΛσΚ.7BOTTOMHARGIN,155EN&IDD_PP11,DIALOGBEGINLEFTHARGIN,7RIOKTMWIGIH,237TOPMARGIN,7BOTTOMMARGIN.153ENDENPtfendif//APSTUDIINVOKED//////////////////////////////////////////////"/""""http:////////"http://////////////MenuIIIDR一MENUlMENUDISCARDABLEBEGINPOPUP"File"BEGINMEMUITEM"Open",MEKUITEM-Save",MENUITEM"ExportParamFileENDENDID_MENUITEM32771ID~KEKUITEH32772ID-FlLEEXPORTPARAMFII/E////stringTatoleftSTRINGTABX/BDISCARDABLEB£GINIDSABOUTDOXwLAbOUCKOJ'sAmazingTownCrier·,·"flendiC//English(U-S.>resources"…!"“…⑴"""""……"""""""""""川丨…""“""“⑴·illUIftiUliilUiiiilUiIUIiiIilUUIfifIiUIiIinnJi/UiIUUUtUiunaU//QcneracedCroroCheTEXTINCLUDE3resource.//*dCine_AFX_NO_SPLITTER_RESOURCESdefine_AFX_NO_OLE_RESOURC8Sdefine_AFX_NO_TRACKER_RESOURCESdefine_AfX_HO_PROPERTTf_RESOURCESeif!de£incd(AFX^RESOURCE^DLLi||defined<AFX_TAHG_ENU)|i£dc£一WIN32““LANGUAGE9,1DprAgmacode_page(1252)Hendifinclude"res\sa‘rc2h//non-MicrosoftVisualC*+editedresourcesNinclude"afxres.re"http://StandardcomponentsHendiC"http://"http://"http://"http:////////////////"http://"http://////"""""http://""http://"http://"""""http:///tfendiC//notAPSTUDIO^INVOKEDopt_ere,loc#SOtTnufTnexDEFINEOEFZNBFASTTABLE^COCFKTERRUN一COUNTERINITCOUNTEREQlfIOεουοEW10orgy(!0|:$100orgρ《10>:$9β0SECTIONSUPERHDCOdetectandexpandcodeinclude*dctect.ainclude^expgain.AdoptedfromMocorolasamplecode·confxgure_spxmovemoveiHOxOpageincludeincludeincludeincludeincludeincludeincludeincludeIiacWVCROXOXιH_HSAR132,601ioecfa.&sin1'vectors.asm**tnbiquad.asm*'mpeq.asm*lTOshelv.Asm*lInhipass.asm1'mlopdss.asm1tAllpaiss.asm1HHCKRte13(12HFMl:tXCPOLtOCFKAfiltersetting(off)00XXXXCXXXXXOl}moveNlXOJwove0XO/moveXO4XiHMCKKcommentedoutcodeshouldyeildavalueof0forM_CKR.M一HCSRC13:12HCSRHRIEt11HCSRHTlεt10HCSRΗΒΕC9HCSRIdle(nocare)t6:7KRQEHost-requestenable!assertedC6HMSTNasCcrmode{disabled)tSHFIFOFIFOcontrol(disabled)tiHCKfKClockfreezeiott)t1:2HHXtObitmodeC1HI2CEnablesI2Cn>odetoHENEnableportbifreadyCoreceive)fcontrolHDCD_DETECT_INIT,HDCD一DETECT,lebcntlItempfrtcmpdcontrolHDCDJ3AIN—INIT,HDCO^DTTNAMICSdecoctmodel,bitent1SPITXDEFequ$444444orgARXBVFFBASExidsTXBUFF8ASEdsunprocessedfollowedbyproceoeed··RX^FTRTXPTRd&;?OCOl0010OOOxxooimovetf$1209,xomoveXO1XiMJICSft··GetcOnwnandto)cnovmvalmoveΛδΡΖΤΧΟεΓ,χΟinovex0,Xispixmic;movcpχspixrait,κ:M_HTXENOMCONFIGUREI2CMACKO·.curnof£moveito·movexO,portxoX:MHCSR;leaveaddressalonenoveKO.xOtnovexO,X:MHSARclearI2CaddressCQirenentedoutcodeshouldyeildavaH—HCKRbits1J12KFMl:OnoisefiltersettingonJCXXXXXXxxOOIl>$3000rx0xO,X:MHCKRofOforHHCKR.MJiCSRbit13J12HCSRHRIEbit11HCSRMTIEbit10HCSRHBIEbit9HCSRIdle<nocare)bitβ7HRQEKost*reouest:enable(assertedifreadytoreceive)bit6HMSTMastermode(disabled)bit5HFIFOFIFOconCrol(disabled)bit4HCKFRClockEreeie(off)bit3:2HHl:O24bitmodebit1HI2CEnablesI2CmodebitOHEHEnablepottXXOl1100IOlX1010movemovemCAA,xOX0,X:MHCSRGetconvnandtoknownvalueUOtXOχ,χ.·.B^imit'χtspimvit,xKmHTXENDMPffffffεε££EtqEXrlXRXRi啦SXJLEXR147fXageccnC<RighCRccciveSPIRcceivcSPJOverrunSPIFIFOFMllSPlUnderrujiSPITranscniCSPiStaceBitspxxmxtcpirccvGhie^veAlshie^veXOshiBaveR4NADArightcontrolindexDat^.dpleECdprightetackdedsds^sdsdsdsdedsdedsdsds20interleaveddelaylineindependentlylocatedorgκ(20)$200DEUVYLENedelayleftedelayrightEQU128dsmPELAYLE34dsmDElAYL四orgyiWADAvolumeprefaderbypasshdcdlspgalnscalebpddxcompbpanaloginavolumebypassKvaskdedsdsdsdsdsdsdsdsdsβYPASSJtOTCH1EQUBYPASS二MOTCH2EQUBYPASS_N0TCH3EQUBYPA5S_NOJCH4EQUBXPASS二HIPASSEQUBYPASS^tOPASSEQUBYPASS二XOSHELVEQUΒPASS:KISHELVEQUBYPASS^CONECRYEQUBYPASSeALLPASSEQUBYPitSS二DBNOTCH£QUBYPASS_NLOPASSEQU91011delavval;2.9nSdelayline;left;rightEQ/fliterdeclarations;οmileyfaceflheKEQileftchannelDECIARE_LSHIXzi1..-O.067DECLA1RE"HSH2L,1..-0.067;rightctiaruieiDECLARE一LSH1R,-0.B67DECUUE_HSH2R,Iw-O.867;xeeon^ncecompcneationPEQ1481卯卯;IcCtChann^1OECL-AJlE_PEQ1L,DECt-ARE^PEQ2h,.9S10S6S..91,0.5DECU^RE_PEQDECLARE-EQ7L,.9S10S65,.91,O.S0.726S42S;rightchannelDECLARE一PEQ1R,I.,-0.Slt0.SDECLAREPHQ2R,1.,-0.92.0.5DGCLARE_P£Q6R.1.DECLARE二fEQ7R,1.Ossioses91r0.5standingwaverejectionPEQ!Ie£tchannelDECLWIE_PEQ3Lf1.DECl-ARS_fEQHL,1.,-0.91.0.DECU^lEPEQSb,1.-0.91,0-O,726S425/rightchannelDECLARE一PEQDECLARE一PEQ4Rtl.DECIAKE:PEQSRjX.r0.hiandIopassfilters;leftDECLARE_HPhplefC,0.0099733,DECIARE^LPlpleft,1,1921β5€,.25,0.3537205.€303885,1.411287170Hi14000HZI.22;rightDECLARE_HPhpright,0.0059733.0.25,0-998*7285DECLARE二U>Xpright,X.1321S56.0-6303886,1.4112871;newlopas5;leftDECXAREeLPlplef1.·0.,0■;right"DECLARE—LPlpright2,1.,0·,0.70Hz14000HzallpassfiltersDECLARE—APaplett,-0.91.0.5DECLARE一APapright,-0.Si,0.5Keithnewnotchwith2$aiuaroundit.DECLAREPEQHT1L,1,.-0.9999005#O.9937365PECIARE^PEQDECLARE二PEQDECLARE一PEQKT1R,X,DECLARE一PEQDECLAREPCQNT3R,1,-91,.91.-0.91,0.5■0.91,0.5,0.5337365STARTtnaiaM^PCTLorgpt$100#$03(mr#$05000BfOmr,epH5000007,XiM_IPRPAstack,r6move0>1,mCmaskinterruptsree^thardwarestackpointerESAXint'senabledandtopPrioritySHI(1)andCSAI(i)int·senabledinitializestackpointerlinearaddressingO,XO.O,XO,xotDRX_BUFF_BA2ErDRX_0UFF^OASE+;AJa-BOFF^BASEeetupvolumeoutputvolumebedownloadedandbypasscwitchesissettozerosothatfil,followedbyvolumebeing(>$000000,XOx0,yvolumexo.yiprefaderxOtysavolumeff>$7FFFFFfxOx0(y:bypassxO,XOiXO-*0.XO.XO1xo.hdcdJbpgainscalfibpddxcompbpanalogin.bypassmas):delay-valindcxDatamove0>edclayleft.xOmovexOfx:dpleftmoveS>sdelayrightx0wovexo·xjdpright;initializeCQparamsINIT_PEQ_PARAMILIMIT二PEQ:PARAMIRINIT-PEO=PARArt2LIWIT二PEQ一PAftAM2RINIT二PEQ二PARAM3L·INIT二PEQ:PARAN3RΙΝΤ二ΡΕ0:ΡΑΛΑΜ4LINIT二4RINIΤ_ΡEQ^PAftAKSLNτ一PEQ一PARAWSTNITeiPEO^PAftAM€LINIT:PEQ:PAKAW€RINIT-PEQ一PARAM7Lινιτ_ρεοΙραλαη7R11T_PEQ_PAJIAMNTlLIN1TPEQ^PJVRAMNT2LINITPBQ^PAJtWINT3L150movemovex0.XO.xo(*ofxo.AJUC__BUFF_BASE*1TX—BUFf-BASETX一BUFF—BAJSEITX-BUFE+2TX-BUFFBASCt3clrmovea.flagssent;HDCOdecoderinitializemoveIi^1.xOmovexo.χcontrolmoveλ>16.x0movex0,xlebcriCljsrKDCD^DETECTeINITmove|j>1,xomovexOfx:4controlδΓHDCDGAZNINIT01234567mm^mmmmmXHIT^PEQ^PARAMNTlRIKITwPEOwPARAMKT2RIKIT_PEQ_PARAMNT3RIWIT^SH^PARAMIMIT_SK_PAJAHIWIT=SK二PAKAM1NIT:SH:PARAHILIR2b2RIHIT_LP_PARAMIHITLPPARAMlpleftlprightINIT^PJePARAMTNIT二。P2二PARAMlpleft2lpright2ΙΝΙΤ_ΑΡ_ΡΑΛΑΜepleftΙΗΙΤ_ΑΙ>:ΡΑΛΑΜapxighChi-p^ssdoe$notneedinitializingasallpararasaredownloaded;eccupri^lhostinterface;;COMFIGUREeSPXCONFIGUREI2C;fst/fsrandSCKT/SCKRareseneracedCromthePLO;andfedtotheDSP,A/0^ndD/Aconverters;putesaiinresetstate.;IFeDEF(,AHALOGXN1)-0cnOV€p$000000,>C:M_PCRC··KLS12/20/97movcp(i$000000,x:M二PRRC;HbS12/20/97;DiDirniovep8$Oc0200.x:H_TCCRrSTisinputexternalclocksourcedriveaSCKTnegativeFSTpolaritydataStFSTclockedoutonriflingedge2wordsperfzrame(blt220)(bit210)(biC18>>l)<bitX3900001)movepU$0c0200,x:M_RCCRFSRieinputexternalclock,sourcedrivesSCKRnegativeFSRpolarityc.FSRclockedinonrisingedge2wor<36perfrroc<bit22o)(bitl9-l)fbitieeO)BAK(12lS9)(bit"13:9^00001)movep$000000^SAXCR^ovepN$dlD03·χiM_RCRRXl.RX^enabledRX2tRX3disabledreservedKSBshiftedfirstwordleCt*ali9nednetworkmode32-bitsloelength.24-bitwordlengthwordvlengtriiframesyncframesyncoccursιclockcycleearLierreservedRLIE,RI£(REIEenabledt23RLIEt22RlCt2IREtUEC20RCIEbitl;0ll)bit3:200)biC5:4=00Jbit6_0)bit7a0)biC9eQi)biCX4:10elllH)bitlS=0)bitic^l)bitl9Λ7-000}C23:200aoiJmovepMJTCTlTXO#TXlnabledTX2,TX3#TX4,TXSdisabledMSBshiftedfirst—wordleft-aligned‘networkinode32-bitslotlength,24-bicwojrdlengthwordlengthframesyncframesync,occurs1clock,cycleearlierTIE,TEIEenabledMt23TXIE-'biC22TIE^bit2lTEDXE'biC20TEIε;J4LSΧ2/20/9(bit3i00011)(bit7-0)(bit9:e^01)(bitl4:X0-Hlll]lbitl5-0)(bitl60)(bitXS;17=000)(bit23:20-0101)movepinovcp<f$OOOedb,x:M_PCRClt$Q00edbfPRiicMtS12/20/夕7MLS12/20/91roovepmovepmoveρmovepmovepmovepmovepmovepbsetbstlsecbaecbset#$£fff££rx:M_RSMA*$£fffff,XiM^KSHB4$oooao3,#$000003,#$000000,H$0000Q0,#$000000,fl$00000040.ntβ八2,XiHJTSHAχ:M二TSMBXM二TXGX;Μ:ΤΧ2χ:Μ_ΤΧ3rrrrrtctctctcrc;MLS12/20/9*7;MLS12/20/31quctransmiccerρouttransmitter1outtraXiecaitCer*2out:transmitter3nowenaliXcTXOnowenableTXlnowenableTX2nowenableTX3andT£3rouGtbosectoiTX3<LQddioblcHX2jturnon6bsetAO.rialhoetinterface:M_HCSRandill$FCnu:;enableallinterruptlevels;clearscalingbiCabeIrARightReceive,X£Xags*RightReceive,X:Clagsf#RightRcccivc,X-IagaAftightJleceiveiX:flags,#>RJC_BUFF_BASE(xOXOiK:RX^PTRfl>TX一BUFF—base,XOx0,X:TXPTR;MainloopUOOV152βRighcReceive·eRighCRcceivc,analo9inDRX_aUFF_DASB,XCDRX_BUFF_BASE+1.xlARX^BUFFeBASE.XOARJTBUFFBASE^l.xl,.rcceiveleftright;scoreunprocessed(withvolumeloutputfirstmovey;avolume,yOmpyry04xO,ampyryO,xX,L·;MM5/20/39SwappedchannelstfrX0,aa,xTX-BUFF一BASE+2titxl.bb,*TX一BUFP一BASE;transmitIeit;transmitrightinpucincodelayline(|DE1AYLEN-I,m0*DELAYLEN-l.ml.dpleft,rOdpright*rldelayval.yO#>DE1AYLEK,X0xO,yO,aa,x:(rO)-b,x:[cl)-Λ,ηΟa,nlx:<rO+nO),axt(ri+nl)tb-1,mOr0x:dple£t:rl,XidprightJSR5TEREO_PROCES5;KM5/20/99Swappedchannelsmoveb,xTX_BUFF_BASE+1movea.χTXeBUFF_BASE+5move||>lfxOmoveχ;ecntfaaddxO,a.movealfx:6cnCjmpLOOP;transmitXefttransmit;rightdpn·cQacurat;eSubroucineoSTEREOPROCESSa,χleftbrX:rightcopyparametersfromleftchannelEQstorightchannelEQeU,IRCOPY一SHwPARAM21,2RCOPY一PEQ一PARAHlh.IRCOPli-PBQ=PARAW2L.2HCOPY_PEQ_PARAM3RCOPY二PEQ:PARAM4RCOPY-PEQPARAM^ΠΡΡΡ*ΓΙPARAHSL16L·SRSRCOΡ_PEQ一PARAM7L.7RCOPY_PEO_PARAMCOPY_PEO_PAilAHCOPY一PEQ二PARArtCOPYJIP_PAKAMCOPY=LP=PARAHcopy"lp""paramWTlL.KXlRNT2L.NT2RNT3L.NT3Rhpleft,hprighclple£t,lprightIplcft2.1pri9ht2COPY_AP_PARAMapleft,aprightKDCOprocessingjscCmovetf22·y:hdcdbp■docq:IcCtfaιright:,b,Xiltemp,x:rtempclrbmovemovetetteqy:gainscalebpιaxO.bbl.xsdcontroljsrHI>CD-DETECT;destroycodemovetf>3rxOmovex;rtnodel,aCmpXO,αbnes)cip_code一<3estmovett>8,XOmovex:biccnci,aοφxO,abneskip一code_destmovexItempraeorff>$00010Qfamoveafxltecnpmovea.xle£Cs>;ip一code—dest:movemovemoveHDCDDYHAHICSbtst.IF.ELSE<CC>move.enorjmpxIcecnpva*22,y:hdcdbpa.xleftb,x:rightχ:detect.xOxO.xicpi^anitx0<x:epixjnitdoeql^oeq;0,xo,:spiicmicdoeqljjoct22,yibypaee,dopostvolxsleit.ximp/rmpyrtfrjcright.yly:prcfadec,χο-x0,xi,ayl,bskiplslrightbypaesmask,^skiplslilBYPASS^HISIIELV,y:bypassmask:._Ekiphsl;smileyfacejsetHBYPASS_U)SHELVUSK1L.“HSH2L^skiphsl;cut-offresponsejsctBYPASS^HIPASS^ibypasemasJc^filciphplHFhpleft_skiphpljsetttBVPASS_LOPA5S,y;bypassmas)cF_s)ciplplLPlpleft一_Bkiplpl一jsetBYPASS^KLOPASS^yibypessmasJc^skiplpZlLPlpleft2“_okiplp2l“EQ8BYPASS_NOTCMl,y:bypasHmasX,_eJcipll_ekip21_ekip41#BYPASS一NOrCH2·y:bypassmask,一ekip2I#BYPASS_WOTCH3■y:bypassraasit,_skip31SBYPASOTCH4,y:bypassraask,一ekiρ41cryBYPASS_CX)NECRY(y:bypaBBniaBki_skipccljsetPEQILjsetPEQ2LjsetPEQ6LjscCPEQIh;cone-jsetPEQSLPEQ3LPEQ4LXipCCl;doub1-tunednotchjecCβBYPASS_DBNOTCH,γbypaesraaslc,_e)cipdbnlPEQNTlL一PEQNT2LPEQNT3L^elcipdbnl;all-passjcetSBYpASSeAI-LPASS,y.bypasEmaek^GJcipaplAPaple£C一skipaplmovebvxileCtmovex;righc,b;smileyfacejeecBYPASS_L0SHELV(y:bypaflsma6lc#_e)ciplsrLSHIRrjsettfBYPASS_HISHELVty:bypaSBmask(_e)ciphsrHSH2Rcut-o££responsejset|fBYI>ASS_HIPASS,y:bypaBsmasJc._s)tipliprHPhprightrtBYPASS^bOPASS.yibypasotnaek(_ekiplprLPlpright_eKipl^skipheiBkiplprjsetMBYPASS_NLOPASS,y:bypaasmaok,_e)ciplp2r_skiplp2i一skiplr_skip3i_ε)ρ4ιLPlpright2jresonanceEQjsetABYPASS^NOTCH1,ρεοiR:bypas$mask.(_skipl3jsetPEQ2RjsetPEQGRiiBYPASS_NOTCH2,y:bypassmasH,_skip2i<|BYPASS_NOTCH3,y:bypassmask._skip3iBYPASSKOTCH4,y:bypassmask,_skip4xcryBYPASS^CONECHY,jsetPEQ7R;coae-jsetPEQ5RPEQ3RPEQ4R^ekipccr;double-tunednotchjeetflBYPASS_DBNOTCH,PEQKTlRρεοNT2RPEQHTiR_Ekipdbnr;all-passjsetBYPASS一AlXPASS·APapright_skipiprmoveb,x:right;bypassmask,一skipccribypassmask.^ekipdbnry:bypassmask,^skipaprdopostvol5plainvolmoveyrvolume,yOmoveXjleftxOmovexrighc,xlmpyr-xO#yO,ampyr-xl,yofbresorgχι5org156SHIinterrupts^gotDataindexal,χindcxDataHSPIStdCe&iC.XexiclncχindcxOac^,n4Mpptre.r4f^agsbclrSPlSCaCeBiC.χ{lagsmovemρ{r4),r4moveal,y(r4)_exitlnt;6hieaveAl,shisaveXO,shisaveR44BhisaveN^1xOr4n4;----SHI/I2Creceiveoverrunerrorshi_rxe一isrmoveρKM_HCSR,xNADAmovepχ:MerHRXiχιNADAbsetHSPIOvermnfXiflagsbclrtfSPIStateBic,x^flagsrti;SHIReceiveFIFOFullrxf—icrmovepκιM_HCSR,χsNADAmovepXtM^HRX,X:ΚΛΟΛbsetSPlFlFOruH^x£lag&bclrSPIStateBiteXiflagsrti;SHITransmitDacaiSHITransmitUnderrunError^SPIUnderrun,xflagsX一HCSR,*:MADAχspixniit,XsMeeKTXIiSPIStateBiciXiflagsehi一txU-isrmovepbsetrtixSpiXmit4XjMefcHTXesPXTransiQicrxflags;SHiBu5Errorehi^bus^error;movep;bsecχJH^KCSR,XiNADAflS£*lHeceivc4-4fx:flagsehiUOtXihHCSRχ:一HCSKSPl5tateBit(xiflagsSubroutinesinclude'iflr^dig^asra'InterruptserviceRoutineseeai_txe_ier,bclresaitxisrm·:MSAlSRESAXTRANSMITISKReadSAISRcocleartransmitunderruaerrorflag13,x:HSAXSRrTxLefCSlOCTX一BUFF-BASE*2.TK:BUPF:BASE3.tx^suff'base··3.MJTXlM:TX0h"TX2writevmproce6eedmovepXTX一BUFF一BASE·χW_TX3rti一一TxJ-eicsiocmovepX:TX_BUFF_UASE·一TXl}writeunprocessedd&tamovcpXiTX_BUFF^BASE*I,XtMJTXOmovepκTXfcBUFF=BASE+1,XιM_TX2moV€pX:TX二BUrF"BASE+M一TX3rti--一csaicxleisrrtiro,x(r6)CTX_BUFF_BASE.rOΓΟ,χ:TX—PTRx-(r6)rr0ESAITRANSMITLASTSLOTXSRSaverocothestackReseCpointer‘ResettKbufferpointerjustincaseitwascorrupcedRestorerOcsai^rxc^ier"bclroverruncrrojsctbeetmovepmoveprti■7,X:MSAISRflag“ESAIRECEIVEISRKeadSAISRtoclearreceivcoverrunerrorflag$6,χjM_SAISR,LeftSloC#RightReceive,χflags;itrightchanneldatathenX:M-RXO,X:ARJC_BUFF__BASE+1JUMRXl,XDWC-BUFFBASE+1Leftsiocmovep一BUrF一BASEmovcpx:M=RXl·X;DRX二BUFF一BASKrti——一esai_rxls_isrmovemoveRX一BUFf一BASE·Γ0rO,X1RX^PTRχ-(r6)fXVESAIRECEIVELASTSLOTISRSaverOtocherxbufferpointerjustinitwascorruptedUpdaterxbufferpointerRestorero;variablelookuptabicpptrsdcvolumedcsh一gamma一ILdc""dcβganvnaw2Ldc“dcgamma一1Ldcpeq^beta^lLdcdcpegqanroa一2Ldcpcq_bete_2Ldcpe<3^k—2Ldcpeq^gamna^tdcpeq_beta_3l>dcpeq^k_3Iidcpeq_ga陽(yáng)dcpcq__t)eta_4L·dcpeq^4Ldcpeq^gamma_5Ldcpeq_beca_5Ldcpeq^K^SLdcpreiaderclcbypassdchp^scale^hplcftdchp_fc—hplcftdchpqc_hple£tdcp_ecalc一pieftdclp_a2_lplcfcdcIplcftdchdcdbpdcgainscalebpdcddxcotnpbpdcpcq^gairtiaa一6L·dcdcpeq^Jc一6Ldcpeq_^gatnma_7Ldcpeq_beta_7Ldcpeq_k—dcandlogindcavolumedcbypassmaskdcdelayvaldcap—ganvna^apleftdcap_bcteftdclp__ecale_lpleft2dcIpwa2_lplcft2dclp_al_lpleft2dcIp二b2二lpleft2dcIp一bl_lpleft2dcpeq^gamma—NTlLdcpec^beta一NTlLdcpeq_k_NTlLdcpeq_gatreua—HT2Ldcpeq^beCa一NT2Ldcpeq—k一NT2L·dcpeq^garwtva一NT3l>dcpeq_t>eta_NT3Ldcpeq_Jc_NT3LdcYKADAdcYNAPAdcYNADAENDSECendSII_SCAXB_FACTOREQU3SHSCALE一DIVIDEEQU[\<cSH_SCALE_FACTOR)isgainlo/hipassfiltercutpass-ChruboostgafwnadrivescriticalfrequencyDECtAKELSHMACROorgxish一x—\namedcsh—y—\namedcorgyiish_gamma_\namedcBh^miηυβwone^\namftdcsh_k_\naraedcshdcEHDHDECLAREHSHMACROnametk,gammaO;x(n-l)ο;y(n-1)93irend-1.0k/SH_SCALE_DIVIt)E1,/SH^SCALB^DIVIDEname,DECLARE^LSHndme,kgAiriroaENDMCOPf_SK_PARAMMACROfrom,tomovey:sh_ganiroa—\from#xOmovex0,ysh_gaiwna_\toWKiveysh—lc_\from.x0moveysh^k^\toENDMINIHPARAMMACROnamemove{.Ojfx0movexO,y:sh_minus—one^Nnamemove(1./SH一SCALi-DIVIDE),xOmovex0,ysh^k^XnainemovexO,y:sh_l^\nameENDMinputdataisinxOinputiescaledby0.5Copreventi/iternalclippingintheall-passcomputesall-passy(n)·-gamma·yc(η)-χ(η·1)-gancna*yin-X)(lo-shelvjy(n)gamma*x(n>+χ(n*l)-gamma·y(n-1)(hi-shelv)alL-passoutputisscaledbygainoutput-(il+k)/2)*x(n)+[(l-k)/2)*y(n)assumesmo,m4,mS·-lLSHMACROnamecomputey(n)ttsh—gatnma—\name,jname,rOb,xO~-x0,y0.t-yo.xi.b-passoutputinb,x0,yo,b-yi.yO'bxO.yOfbyi.yo.bscaleoutputtogetrealηsh_scale_factor),b.bb一χ(rO)χιχ(rO)▼,χιχ(r0>-fnowscalebyb,x(rO)-;(r4>,yO丨Ιγ)+,ylENDMKSHMACROrtldbmovecomputey(n)Hsh^gatwnaeXnante,r4Ksh—x_\name,rOb.xOymacmac;nowaslrodxO/yotb-yO,xl#boutputinbxO.yO.b-yi/yo.bx04yOfbyi^yo.bscaleoucpuctogeerealrcsulcUtSH_SCALE_FACTOR).b.b(r4)+,yO(Γ4)+,yl.yoy(r4)bygain/cutfactory(r4)4,y0ENOM162PEO—SCALE_FACTORPEQSCALE*"tnviDEEQU3EQU(1<<PEQ^SCALFACTOR)kisgaingarnrnadrivesb^tadefines>notchfilterP>CUC>pass-thruboostcriticalfrequencyDECLARE^PEQMACROorgXX·.peq^y__\namepen\namedcdcdcdcorgyxpeηamepeq^beta_\namoPeq^keeXnamepeq^y^XnaroePenameENDMCOPY-PEQ一PAKAM£N0MIMIT_PEQ_PARAMMACROgamma,betagammabeta)C/PEQ_SCALE_DIVIDE1./PEQ一SCALE一DIVIDE00from,tonameCCCQCCd*OT>dd'dMACROypeq_gaTnma_\£rom#3C0x0,ypcq_ganroa^XtοyJpeq^beta^\from^x0xo,Ytyipeq_.X_\from(x0χΟ,γιρβαk\comove{1,/PEQ^SCALE一DIVIDE)·xOwoveXO,y:pecL,k,_\namemovexO(yPeqwI^XnameENDMinputda丨tai;5inbinputscaledbycomputesall-passν(n)*9dmrr^y(nw<n)^clRVTld*x(n-Yin)<ιWin)tbetaall^passoucputistopreventinternalclippingintheall-passoutput,assumesraO.mA.m5)-gamma■w(nx(n)-beta*v<n)caledbygainx(n)4t(l-ki/2)‘y(n)1)1)PEQHACROmovemove;coinpuCeν(π)niacxl,yo,amac-yl,yO,a;computew(n),νmacxl,yO.bmac-yl(y0.b;computeyIn),w(n)mac-xl,yO,bmacxOryO,b;all-passoucputinmpymacmacmac;nowaslmdWpcqy\name.rOffpcq^gaomajnanw·r4·Γ5”b,xOx;(rO)t#ax<rO)+rxlx(ro)+.bκ-,(ro),xl(n)isnowinaa,xlx(rO)·aisnowinbxO.x(ro)(rO)-b,nowscalexO,yO,bχ(rO)-,a-yl,yOfb3c0,y0,bλ4χ(ro)yl,x(rO)-scaleoutput:togetrealresult#IPEQ-SCALE一FACTOR)(bfbb-"(rO(rS),/O.yi(r5)-.yiy(rS)+ENDM164LP一SCALE一FACTOREQU6LiCsCALE二DIVIDEEQU(1<<LP_SCALE_FACTORmodiledchambcrlinlo-pos丨{bochχ(n)andχ(n-l))qalsodefinesgaininputiesealedCOavoidinternalclippingtm2*sin(w/2}fonlyvalidwhenlessthanl.implementedasadirectformbiqu在過(guò)withcoefficientsanddatascaled,needsh^^droomforgainDECLARELPMACROorgxi;lp_w_\nameds2orgyical\nameal_\nameb2_\riameip_bi_\nameENDMdccb/16.dcca2/Z.dccal/2.dc0.0dc1.0/2.COPYLPΡΑΛΑΜMACROfrom,comoveylp—scele_\from,xOmovex0rylp_scale^\torooveya2^\frotn#xQmovex0,y:ip-a2_\tomovey:lp_al—rom,xOmovexO.y:lp—al_\tomoveyj\from#xQmovexO^yjlp^b2_\tomovey:rom,xOmov龜xO,y;ENDMINITLPPARArtMACROmoveovovewovemovemovemovecnovKO,XO1XO1xO,XO1>XO1xO,(1IpJblepSn^meal_\name/Ι6,)7κ01ρ_βCA1e^\riAnioEMDMINlTLP2ΡΑΗΛΗMACROXO^ysIp一xO,y11>0.5,χ0xO,ylp^b2_\nameR>1.#XOxO,ylp_bl_\namemoveU>(0.2S/16.),XOmoveκΟ,y;Ip^scaXe^Nnaiwe~EHDt^assumesmO·,m5LPMACROEHDHX0n^.mr*ip_ftcalc_\name,rl丨lp—wjnamcroxO.yQ.b-xl^yO^hxo,y0,bxl,yo,bx(r0)xOχ<r0)-,xlxl.x(rO)+b.^j(ro)-yO;XOx<n|·yo·yo;XO■w(η-21,yoyo;XlCIl·yoyo·*w(n-2)w(η·1)yo;wtn-1)*a,yO■a2alyOblb2HP-SCAI/E一FACTOREQU6HP_SCALE_DIVIDEEQU<1<<HP^SCALE^FACTOR)chanvberlinhi-pass(fromlopass)qalsodefinesgaininputisscaledto丨t=2esin(w/2)0<q<1implementedasneedsheadroomDECUUlB_HPMACROorgxiihp__y_\nameorgyishp^scale_\namcCe\natnehp—cjc_\nameinternalclippingonlyvalidwhenlessthan1.adirectiormbiquadwithcoefficientsandforgainscaled.,Cc.qc,dsdsdcdcdcqcENDMCOPYHPPARAMMACROfroro,toyhp^eca1e_\from,xOxOry:hp_scale_\toyhp_fc_\Crom,xOy!hp一qc_\from·χx0,y:hp_qc_\toE^DMassumesTnO4m4rm5-1HPMACROmove<Oip^Bcale_\name,r4move霣hp—s2_\naroe,rOmoveb·xO;aβx<n}*scalempy-yo‘xO,aXi(r0|+,Xl;bs2(n-1)·fcmpyrxl,yO,bx(rO),xO;b*82(η)*fc+y1)addXOfb;a胃x(n)-s2(n-1)*fc-yCn-1)eubsl(n)*χ(n)-xl,yi#a32(nj■e2(nχΟ,γΟ,b<r4)4-,-yo;yo(r4)+1-yo;yo(ri).yi;yib,x:<r0)-s2(n-1)·fc.Xlfba,K.0-1)+fc·9l(n)κι(rO)-,xoscalefcqcy(n-1)-qc*s2(n-1)IF9DZF(*LO‘JtfrXO,bb,x《r(UELSEtfra,bb,x:<r0)ENOIFENDM168P_SCALEeFACTOREQU3P=SCALE一DIVIDEEQU(X<<AP_SCALE_FACTOR>ganmadrivescriticalfrequency-betadefinesQDECLARE-APMACROorgxiap—\nameap—\naraeorgyiap—gawma__\naraeap_becaM\nameap^w^Vnamename.ganvna.betadcdcdcdcdcdcdcdc^ainmabeta£NDMCOPPARAMMACROmovemovemovefrom,toyap_gamma^\from^x0XO,y:ap一ganroa—\toyiap__l>eca_\fromfxOx0fyiap_beta_\toENDMINXT_AP_PAAMMACROENDNinputdacaieinbinputisscaledby.5topreventinternalclippinginChcall-passcomputesall-v(η)βgamma*y(nwCn>gaima*x(n'y《n)-w(n)+beta■1)+y(ri-2)-gamma·v(n-l)-1)4-x(n-2)-gamma*w(n-l)*x(n)-beca·v(n)assumesmO.m4,mSAPMACROnameifap_y一、nanierr0tfap_gamna_\name^r4ffap-V_\name·r5b.xO;computev(n)macxl,/0,amac-yl,yo.a;computew(η),ν(n)macχλγΟ^bmac-yl,yO,b;computey(n).w(n)macy0.bmacx0,yO,b!(ro”!(ro).,Xlχ(r0)bχ:(r0),xlisnowinaa,xlx:(ro)·aisnowinbxO,χ(rO)-a,κ<ro>-(r4J+ry0(r5)+,yi(rS)-,ylyt(r5)+(i:4)yOyits)-bXi(rO、ab,ylba,χ(rO)4γ,χ(rO)-權(quán)利要求一種用于改變輸入到具有相關(guān)行為特征的聲音再現(xiàn)設(shè)備的電聲頻信號(hào)的聲音補(bǔ)償系統(tǒng),所述系統(tǒng)包括所述聲音再現(xiàn)設(shè)備的模型,具有模擬所述聲音再現(xiàn)設(shè)備的行為特性的多個(gè)濾波器,其中每個(gè)所述濾波器具有相關(guān)的響應(yīng),可被結(jié)合以定義所述模型的整體響應(yīng);以及對(duì)應(yīng)于所述聲音再現(xiàn)設(shè)備的一單個(gè)組件的至少一個(gè)所述濾波器可響應(yīng)于所述聲音再現(xiàn)設(shè)備的所述單個(gè)組件被另一單個(gè)組件替換而被另一濾波器替換,其中所述另一濾波器模擬另一單個(gè)組件的行為特性。2.如權(quán)利要求1所述的系統(tǒng),其特征在于,所述單個(gè)組件對(duì)應(yīng)于揚(yáng)聲器的一單個(gè)組件。3.如權(quán)利要求1所述的系統(tǒng),其特征在于,行為特性是由所述聲音再現(xiàn)設(shè)備的各單個(gè)組件的組定義的。4.如權(quán)利要求1所述的系統(tǒng),其特征在于,一個(gè)或多個(gè)所述濾波器對(duì)應(yīng)于所述聲音再現(xiàn)設(shè)備的外殼。5.如權(quán)利要求1所述的系統(tǒng),其特征在于,所述聲音再現(xiàn)設(shè)備包括揚(yáng)聲器,所述多個(gè)濾波器中的至少一個(gè)濾波器包括至少一個(gè)相關(guān)聯(lián)的可調(diào)節(jié)參數(shù),該參數(shù)的值是基于所述揚(yáng)聲器的物理特性計(jì)算的。6.如權(quán)利要求1所述的系統(tǒng),其特征在于,所述揚(yáng)聲器的物理特性包括錐盆和線圈質(zhì)量、空氣體積、機(jī)械聲順、輻射面積、阻尼、運(yùn)動(dòng)質(zhì)量及電機(jī)特性中的至少一個(gè)。7.如權(quán)利要求1所述的系統(tǒng),其特征在于,所述聲音再現(xiàn)設(shè)備包括揚(yáng)聲器,所述多個(gè)濾波器中的至少一個(gè)濾波器包括至少一個(gè)相關(guān)聯(lián)的可調(diào)節(jié)參數(shù),該參數(shù)的值是從標(biāo)準(zhǔn)揚(yáng)聲器模型導(dǎo)出的。8.如權(quán)利要求1所述的系統(tǒng),其特征在于,所述多個(gè)濾波器中的至少一個(gè)濾波器具有至少一個(gè)相關(guān)聯(lián)的可調(diào)節(jié)參數(shù),該參數(shù)的值是使用標(biāo)準(zhǔn)測(cè)試測(cè)量以實(shí)驗(yàn)方式確定的。9.如權(quán)利要求1所述的系統(tǒng),其特征在于,所述聲音再現(xiàn)設(shè)備包括揚(yáng)聲器,并且調(diào)制至少一個(gè)其它參數(shù)的一個(gè)參數(shù)與所述揚(yáng)聲器的磁鐵結(jié)構(gòu)和音圈有關(guān)。全文摘要一種聲音補(bǔ)償系統(tǒng)改變用于輸入到具有相關(guān)行為特性的聲音再現(xiàn)設(shè)備的電聲頻信號(hào)。設(shè)備的行為特性由聲音再現(xiàn)設(shè)備的各單個(gè)組件的個(gè)體或群組定義,并且包括機(jī)械、聲學(xué)及電磁行為。模型包括模擬聲音再現(xiàn)設(shè)備的行為特性中的至少一個(gè)的多個(gè)濾波器。濾波器由數(shù)字信號(hào)過(guò)程或由模擬電路定義,并且以相關(guān)聯(lián)的頻率、時(shí)間、相位及暫態(tài)響應(yīng)中的一個(gè)或多個(gè)為特征。這些響應(yīng)結(jié)合以定義模型的整體響應(yīng)。濾波器包括可調(diào)節(jié)參數(shù),用于改變?yōu)V波器響應(yīng),以產(chǎn)生與未經(jīng)改變的濾波器的響應(yīng)共軛并因而與聲音再現(xiàn)設(shè)備的響應(yīng)共軛的響應(yīng)。一控制器修改參數(shù)。文檔編號(hào)H04R25/00GK101883304SQ20081008176公開日2010年11月10日申請(qǐng)日期2000年8月10日優(yōu)先權(quán)日1999年8月11日發(fā)明者亞歷克斯·里姆伯里斯,基思·O·約翰遜,蒂莫西·E·昂德斯,麥茨·米爾博格申請(qǐng)人:微軟公司