#include #include #include #include MixerScope::MixerScope(GUIWindow &parentWnd,UINT controlID,UINT extraStyles,const Rect &initRect,const Font &bannerFont) : Graphic(parentWnd,"SCOPE",controlID,extraStyles,initRect,bannerFont) { } MixerScope::~MixerScope() { } bool MixerScope::setData(WaveForm &waveForm) { mWaveForm=waveForm; FormatChunk &formatChunk=mWaveForm.getFormatChunk(); String strCaption=String("Ch:")+String().fromInt(formatChunk.channels())+String(" Bps:")+String().fromInt(formatChunk.bitsPerSample())+String(" Sps:")+String().fromInt(formatChunk.samplesPerSecond()); setCaption(strCaption); invalidate(true); return true; } // ************************************************************************************************** // virtuals void MixerScope::postPaint(PureDevice &pureDevice) { int penWidth=2; PureSampleEx &pureSampleEx=mWaveForm.getPureSample(); Pen pen(RGBColor(0,128,0)); Pen outlinePen(RGBColor(255,255,255),Pen::PSolid,penWidth); int max=0; float factor; int x=0; SampleData sample; for(int index=0;indexmax)max=sample.b16; } factor=(float)height()/(float)max; for(index=0;index