FreeBSD Bugzilla – Attachment 179334 Details for
Bug 216499
[new port] audio/eq10q: Set of mono and stereo parametric equalizers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
eq10q.shar
eq10q.shar (text/plain), 99.04 KB, created by
Goran Mekić
on 2017-01-26 17:33:15 UTC
(
hide
)
Description:
eq10q.shar
Filename:
MIME Type:
Creator:
Goran Mekić
Created:
2017-01-26 17:33:15 UTC
Size:
99.04 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># eq10q ># eq10q/pkg-descr ># eq10q/files ># eq10q/files/patch-CMakeLists.txt ># eq10q/files/patch-gui_widgets_bodeplot.cpp ># eq10q/files/patch-gui_widgets_bandctl.cpp ># eq10q/Makefile ># eq10q/distinfo ># eq10q/pkg-plist ># >echo c - eq10q >mkdir -p eq10q > /dev/null 2>&1 >echo x - eq10q/pkg-descr >sed 's/^X//' >eq10q/pkg-descr << '2dca460784177dbe20f25d6fca48f3d9' >XEQ10Q is an audio plugin bundle over the LV2 standard (http://lv2plug.in) >Ximplementing a powerful and flexible parametric equalizer and more. >X >XAll audio processing developed in this project is written in C language and >Xhighly optimized focusing on DSP load reduction yet keeping a superb audio >Xquality, the audio engine is always working in 64 bits floating point maths but >Xinterfacing with LV2 ports using the standard 32 bits numbers. >X >XWWW: http://eq10q.sourceforge.net/ >2dca460784177dbe20f25d6fca48f3d9 >echo c - eq10q/files >mkdir -p eq10q/files > /dev/null 2>&1 >echo x - eq10q/files/patch-CMakeLists.txt >sed 's/^X//' >eq10q/files/patch-CMakeLists.txt << 'f144b14ea50cb59fca1c21e1ffb54861' >X--- CMakeLists.txt.orig 2017-01-26 12:09:30 UTC >X+++ CMakeLists.txt >X@@ -3,10 +3,10 @@ cmake_minimum_required(VERSION 2.8) >X PROJECT(eq10q) >X >X ##ADD_DEFINITIONS(-Wall -O3 -fPIC -finline-functions -finline-functions-called-once -msse -mfpmath=sse -std=c99) >X-set(CMAKE_C_FLAGS "-Wall -O3 -fPIC -finline-functions -finline-functions-called-once -msse -mfpmath=sse -std=c99") >X+set(CMAKE_C_FLAGS "-I/usr/local/include -Wall -O3 -fPIC -finline-functions -finline-functions-called-once -msse -mfpmath=sse -std=c99") >X #set(CMAKE_C_FLAGS "-Wall -O0 -g -fPIC -finline-functions -finline-functions-called-once -msse -mfpmath=sse -std=c99") >X >X-set(CMAKE_CXX_FLAGS "-Wall -fPIC -std=c++11") >X+set(CMAKE_CXX_FLAGS "-I/usr/local/include -Wall -fPIC -std=c++11") >X #set(CMAKE_CXX_FLAGS "-Wall -O0 -g -fPIC -DPIC -std=c++11") ##Debuging GUI >X >X ##ADD_DEFINITIONS(-Wall -O0 -g -fPIC -DPIC) ###USED FOR DEBUG >X@@ -18,7 +18,7 @@ set (LV2_BUNDLE "sapistaEQv2.lv2") #LV2 >X set(EXECUTABLE_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/bin") >X set(LIBRARY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/bin") >X >X-add_subdirectory(gui) >X+add_subdirectory(gui) >X add_subdirectory(dsp) >X >X #===========================BUILD EQ10Q ALL DSP FILES============================================= >X@@ -157,7 +157,7 @@ target_link_libraries( matrix_ms2lr lib_ >X set_target_properties(eq1qm eq1qs eq4qm eq4qs eq6qm eq6qs eq10qm eq10qs gate compressor compressor_sc gate_stereo compressor_stereo compressor_stereo_sc bassup matrix_lr2ms matrix_ms2lr PROPERTIES PREFIX "") >X >X #CLEAN generated .c files on run 'make clean' >X-SET(generatedEqConfigFiles >X+SET(generatedEqConfigFiles >X ${PROJECT_SOURCE_DIR}/eq1qm.c;${PROJECT_SOURCE_DIR}/eq1qs.c >X ${PROJECT_SOURCE_DIR}/eq4qm.c;${PROJECT_SOURCE_DIR}/eq4qs.c >X ${PROJECT_SOURCE_DIR}/eq6qm.c;${PROJECT_SOURCE_DIR}/eq6qs.c >X@@ -176,4 +176,3 @@ INSTALL( TARGETS eq1qm eq1qs eq4qm eq4qs >X >X INCLUDE(CPack) >X # cpack -G TGZ >X- >f144b14ea50cb59fca1c21e1ffb54861 >echo x - eq10q/files/patch-gui_widgets_bodeplot.cpp >sed 's/^X//' >eq10q/files/patch-gui_widgets_bodeplot.cpp << 'bdffb4a1bb299c4d83a26b30890793e9' >X--- gui/widgets/bodeplot.cpp.orig 2017-01-26 12:12:00 UTC >X+++ gui/widgets/bodeplot.cpp >X@@ -41,7 +41,7 @@ >X PlotEQCurve::PlotEQCurve(int iNumOfBands, int channels) >X :width(PLOT_WIDTH), >X height(PLOT_HIGHT), >X-m_TotalBandsCount(iNumOfBands), >X+m_TotalBandsCount(iNumOfBands), >X m_NumChannels(channels), >X m_Bypass(false), >X bMotionIsConnected(false), >X@@ -49,7 +49,7 @@ bBandFocus(false), >X m_BandRedraw(false), >X m_fullRedraw(false), >X m_justRedraw(false), >X-SampleRate(0), //Initially zero to force the freq vectors initialization >X+SampleRate(0), //Initially zero to force the freq vectors initialization >X m_FftActive(false), >X m_minFreq(MIN_FREQ), >X m_maxFreq(MAX_FREQ), >X@@ -58,25 +58,25 @@ fft_gain(0.0), >X fft_range(80.0), >X m_bIsSpectrogram(false), >X m_bFftHold(false) >X-{ >X+{ >X //Allocate memory for filter data strcuts >X m_filters = new FilterBandParams*[m_TotalBandsCount]; >X for (int i = 0; i<m_TotalBandsCount; i++) >X { >X m_filters[i] = new FilterBandParams; >X } >X- >X+ >X //Allocate memory for f and pixels arrays >X f = new double[CURVE_NUM_OF_POINTS]; >X xPixels = new int[CURVE_NUM_OF_POINTS]; >X- >X+ >X //Allocate memory for Y axes arrays >X main_y = new double*[m_NumChannels]; >X for (int i = 0; i<m_NumChannels; i++) >X { >X main_y[i] = new double[CURVE_NUM_OF_POINTS]; >X } >X- >X+ >X band_y = new double*[m_TotalBandsCount]; >X band_state = new MSState[m_TotalBandsCount]; >X for (int i = 0; i<m_TotalBandsCount; i++) >X@@ -91,7 +91,7 @@ m_bFftHold(false) >X band_state[i] = MONO; >X } >X } >X- >X+ >X //init curves to zero state >X for(int i = 0; i<CURVE_NUM_OF_POINTS; i++) >X { >X@@ -104,23 +104,23 @@ m_bFftHold(false) >X band_y[j][i] = 0.0; >X } >X } >X- >X+ >X //Allocate memory for band redraw vector >X m_Bands2Redraw = new bool[m_TotalBandsCount]; >X m_curve_surface_ptr = new Cairo::RefPtr<Cairo::ImageSurface> [m_TotalBandsCount]; >X- >X- //Allocate memory for FFT data >X- xPixels_fft = new double[(FFT_N/2) + 1]; >X- xPixels_fft_bins = new double[(FFT_N/2) + 1]; >X+ >X+ //Allocate memory for FFT data >X+ xPixels_fft = new double[(FFT_N/2) + 1]; >X+ xPixels_fft_bins = new double[(FFT_N/2) + 1]; >X fft_pink_noise = new double[(FFT_N/2) + 1]; >X fft_plot = new double[(FFT_N/2) + 1]; >X fft_ant_data = new double [(FFT_N/2) + 1]; >X- >X+ >X fft_log_lut = GenerateLog10LUT(); >X resetCurve(); >X >X set_size_request(width, height); >X- >X+ >X //Init zoom widget >X m_zoom_widget.center_focus = false; >X m_zoom_widget.center_press = false; >X@@ -131,14 +131,14 @@ m_bFftHold(false) >X m_zoom_widget.x1 = 0; >X m_zoom_widget.x2 = 0; >X m_zoom_widget.x_ant = 0; >X- >X- >X+ >X+ >X //Connect mouse signals >X add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::SCROLL_MASK | Gdk::LEAVE_NOTIFY_MASK); >X signal_button_press_event().connect(sigc::mem_fun(*this, &PlotEQCurve::on_button_press_event),true); >X signal_button_release_event().connect(sigc::mem_fun(*this, &PlotEQCurve::on_button_release_event),true); >X signal_scroll_event().connect(sigc::mem_fun(*this, &PlotEQCurve::on_scrollwheel_event),true); >X- >X+ >X //The timeout signal used to refresh the display is now connected at first run of on_expose_event to run it with freq vector correctly initialized >X signal_motion_notify_event().connect(sigc::mem_fun(*this, &PlotEQCurve::on_mouse_motion_event),true); >X signal_leave_notify_event().connect(sigc::mem_fun(*this, &PlotEQCurve::on_mouse_leave_widget),true); >X@@ -146,7 +146,7 @@ m_bFftHold(false) >X >X //Init FFT vectors >X setSampleRate(44.1e3); >X- >X+ >X //Allow this widget to get keyboard focus >X set_can_focus(true); >X } >X@@ -160,26 +160,26 @@ PlotEQCurve::~PlotEQCurve() >X } >X delete[] m_filters; >X delete[] m_Bands2Redraw; >X- >X+ >X //Delete freq and pixels pointers >X delete[] f; >X delete[] xPixels; >X- >X+ >X //Delete Y array pointers >X for (int i = 0; i<m_NumChannels; i++) >X { >X delete[] main_y[i]; >X } >X- delete[] main_y; >X- >X+ delete[] main_y; >X+ >X for (int i = 0; i<m_TotalBandsCount; i++) >X { >X delete[] band_y[i]; >X } >X delete[] band_y; >X- >X+ >X delete[] band_state; >X- >X+ >X //Delete FFT plots >X delete[] fft_pink_noise; >X delete[] xPixels_fft; >X@@ -194,50 +194,50 @@ void PlotEQCurve::resetCenterSpan() >X { >X //Compute center and span for the full range spectrum >X double sp = log10(MAX_FREQ/MIN_FREQ); >X- double cn = MIN_FREQ * sqrt(pow10(sp)); >X+ double cn = MIN_FREQ * sqrt(pow(10, sp)); >X setCenterSpan(cn, sp); >X } >X >X void PlotEQCurve::setCenterSpan(double center, double span) >X-{ >X- m_minFreq = center / sqrt(pow10(span)); >X- m_maxFreq = center * sqrt(pow10(span)); >X- >X+{ >X+ m_minFreq = center / sqrt(pow(10, span)); >X+ m_maxFreq = center * sqrt(pow(10, span)); >X+ >X //Initalize the grid >X const double f_grid[GRID_VERTICAL_LINES] = {20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, >X 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 900.0, >X 1000.0, 2000.0, 3000.0, 4000.0, 5000.0, 6000.0, 7000.0, 8000.0, 9000.0, >X 10000.0, 20000.0}; >X- >X+ >X for(int i=0; i < GRID_VERTICAL_LINES; i++) >X { >X xPixels_Grid[i] = freq2Pixels(f_grid[i]); >X } >X- >X+ >X //Initialize freq vector and pixels for the new limits >X for(int i=0; i < CURVE_NUM_OF_POINTS; i++) >X- { >X+ { >X xPixels[i] = (double)(i)*(((double)(width - 2*CURVE_MARGIN-CURVE_TEXT_OFFSET_X))/((double)(CURVE_NUM_OF_POINTS - 1))); >X f[i] = Pixels2freq(xPixels[i]); >X } >X- >X+ >X //Recalc freq bins to fit fft into widget size >X const double wrangePx = (freq2Pixels(MAX_FREQ) - freq2Pixels(MIN_FREQ)); >X for(int i = 0; i <= (FFT_N/2); i++) >X { >X xPixels_fft_bins[i] = round(xPixels_fft[i] * wrangePx)/(wrangePx); >X } >X- >X+ >X //Clear spectrogram to fit the new zoom windows >X if(m_fft_surface_ptr) >X { >X- Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_fft_surface_ptr); >X+ Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_fft_surface_ptr); >X cr->save(); >X cr->set_operator(Cairo::OPERATOR_CLEAR); >X cr->paint(); >X cr->restore(); >X } >X- >X+ >X //Redraw all by timer >X m_fullRedraw = true; >X } >X@@ -246,9 +246,9 @@ void PlotEQCurve::setCenter(double cente >X { >X //Limit center to the possible range according the current span >X double sp = log10(m_maxFreq/m_minFreq); >X- double cmin = MIN_FREQ * sqrt(pow10(sp)); >X- double cmax = MAX_FREQ / sqrt(pow10(sp)); >X- >X+ double cmin = MIN_FREQ * sqrt(pow(10, sp)); >X+ double cmax = MAX_FREQ / sqrt(pow(10, sp)); >X+ >X double cn = center; >X cn = cn > cmax ? cmax : cn; >X cn = cn < cmin ? cmin : cn; >X@@ -259,11 +259,11 @@ void PlotEQCurve::setSpan(double span) >X { >X //Limit center to the possible range according the current span >X double sp_act = log10(m_maxFreq/m_minFreq); >X- double cn = m_minFreq * sqrt(pow10(sp_act)); >X+ double cn = m_minFreq * sqrt(pow(10, sp_act)); >X double smax1 = 2.0*log10(cn/MIN_FREQ); >X double smax2= 2.0*log10(MAX_FREQ/cn); >X double smax = smax1 < smax2 ? smax1 : smax2; >X- >X+ >X double sp = span > smax ? smax : span; >X sp = sp < MIN_SPAN_DEC ? MIN_SPAN_DEC : sp; >X setCenterSpan(cn, sp); >X@@ -271,13 +271,13 @@ void PlotEQCurve::setSpan(double span) >X >X void PlotEQCurve::recomputeMinFreq_fromX1Pixel(double x1) >X { >X- >X+ >X if( m_zoom_widget.x2 - x1 < 30) return; //To avoid crossing control points >X- >X+ >X double desp = x1 - m_zoom_widget.x1; >X- double local_x1 = m_zoom_widget.x1 + desp; >X- double local_x2 = m_zoom_widget.x2 - desp; >X- >X+ double local_x1 = m_zoom_widget.x1 + desp; >X+ double local_x2 = m_zoom_widget.x2 - desp; >X+ >X double fmin = MIN_FREQ*pow((MAX_FREQ/MIN_FREQ),((local_x1 - 3.5)/((double)m_zoom_surface_ptr->get_width()))); >X double fmax = MIN_FREQ*pow((MAX_FREQ/MIN_FREQ),((local_x2 + 3.5)/((double)m_zoom_surface_ptr->get_width()))); >X setSpan(log10(fmax/fmin)); >X@@ -286,11 +286,11 @@ void PlotEQCurve::recomputeMinFreq_fromX >X void PlotEQCurve::recomputeMaxFreq_fromX2Pixel(double x2) >X { >X if( x2 - m_zoom_widget.x1 < 30) return; //To avoid crossing control points >X- >X+ >X double desp = x2 - m_zoom_widget.x2; >X- double local_x1 = m_zoom_widget.x1 - desp; >X- double local_x2 = m_zoom_widget.x2 + desp; >X- >X+ double local_x1 = m_zoom_widget.x1 - desp; >X+ double local_x2 = m_zoom_widget.x2 + desp; >X+ >X double fmin = MIN_FREQ*pow((MAX_FREQ/MIN_FREQ),((local_x1 - 3.5)/((double)m_zoom_surface_ptr->get_width()))); >X double fmax = MIN_FREQ*pow((MAX_FREQ/MIN_FREQ),((local_x2 + 3.5)/((double)m_zoom_surface_ptr->get_width()))); >X setSpan(log10(fmax/fmin)); >X@@ -301,12 +301,12 @@ void PlotEQCurve::recomputeCenterFreq(do >X >X double local_x1 = m_zoom_widget.x1 - CURVE_MARGIN - CURVE_TEXT_OFFSET_X + xDiff; >X double local_x2 = m_zoom_widget.x2 - CURVE_MARGIN - CURVE_TEXT_OFFSET_X + xDiff; >X- >X+ >X double fmin = MIN_FREQ*pow((MAX_FREQ/MIN_FREQ),((local_x1 - 3.5)/((double)m_zoom_surface_ptr->get_width()))); >X double fmax = MIN_FREQ*pow((MAX_FREQ/MIN_FREQ),((local_x2 + 3.5)/((double)m_zoom_surface_ptr->get_width()))); >X- >X+ >X double sp_act = log10(fmax/fmin); >X- double cn = fmin * sqrt(pow10(sp_act)); >X+ double cn = fmin * sqrt(pow(10, sp_act)); >X setCenter(cn); >X } >X >X@@ -319,7 +319,7 @@ void PlotEQCurve::resetCurve() >X main_y[j][i] = 0.0; >X } >X } >X- >X+ >X for (int i = 0; i<m_TotalBandsCount; i++) >X { >X m_filters[i]->bIsOn = false; >X@@ -327,7 +327,7 @@ void PlotEQCurve::resetCurve() >X m_filters[i]->fType = PEAK; >X m_filters[i]->Gain = 0.0; >X m_filters[i]->Q = 2.0; >X- >X+ >X //Reset band_y to zero >X for(int j = 0; j < CURVE_NUM_OF_POINTS; j++) >X { >X@@ -337,12 +337,12 @@ void PlotEQCurve::resetCurve() >X } >X >X void PlotEQCurve::ComputeFilter(int bd_ix) >X-{ >X+{ >X if(m_filters[bd_ix]->fType != NOT_SET) >X { >X CalcBand_DigitalFilter(bd_ix); >X } >X- >X+ >X //Compute Shape >X for(int i = 0; i < CURVE_NUM_OF_POINTS; i++) >X { >X@@ -359,20 +359,20 @@ void PlotEQCurve::ComputeFilter(int bd_i >X case MONO: >X main_y[0][i] += band_y[j][i]; >X break; >X- >X+ >X case DUAL: >X main_y[0][i] += band_y[j][i]; >X main_y[1][i] += band_y[j][i]; >X break; >X- >X+ >X case ML: >X main_y[0][i] += band_y[j][i]; >X break; >X- >X+ >X case SR: >X main_y[1][i] += band_y[j][i]; >X break; >X- >X+ >X } >X } >X } >X@@ -409,7 +409,7 @@ void PlotEQCurve::setBandEnable(int bd_ >X m_filters[bd_ix]->bIsOn = bIsEnabled; >X cueBandRedraws(bd_ix); >X } >X- >X+ >X void PlotEQCurve::setBypass(bool bypass) >X { >X m_Bypass = bypass; >X@@ -419,9 +419,9 @@ void PlotEQCurve::setBypass(bool bypass) >X //==========================SIGNAL SLOTS=========================================================== >X //Mouse grab signal handlers >X bool PlotEQCurve::on_button_press_event(GdkEventButton* event) >X-{ >X+{ >X grab_focus(); >X- >X+ >X //Check if is a double click or simple >X if(event->button == 1 && bBandFocus) >X { >X@@ -461,16 +461,16 @@ bool PlotEQCurve::on_button_release_even >X m_zoom_widget.center_press = false; >X m_zoom_widget.f1_press = false; >X m_zoom_widget.f2_press = false; >X- return true; >X+ return true; >X } >X >X bool PlotEQCurve::on_scrollwheel_event(GdkEventScroll* event) >X { >X //Check if is over some control pointer >X- >X+ >X const double x = event->x - CURVE_MARGIN - CURVE_TEXT_OFFSET_X; >X const double y = event->y - CURVE_MARGIN; >X- >X+ >X for(int i = 0; i < m_TotalBandsCount; i++) >X { >X if( x > freq2Pixels(m_filters[i]->Freq) - BALL_DETECTION_PIXELS && >X@@ -478,36 +478,36 @@ bool PlotEQCurve::on_scrollwheel_event(G >X y > dB2Pixels(m_filters[i]->Gain) - BALL_DETECTION_PIXELS && >X y < dB2Pixels(m_filters[i]->Gain) + BALL_DETECTION_PIXELS ) >X { >X- if (event->direction == GDK_SCROLL_UP) >X- { >X+ if (event->direction == GDK_SCROLL_UP) >X+ { >X // up code >X m_filters[i]->Q += SCROLL_EVENT_INCREMENT*m_filters[i]->Q; >X m_filters[i]->Q = m_filters[i]->Q > PEAK_Q_MAX ? PEAK_Q_MAX : m_filters[i]->Q; >X- } >X- else if (event->direction == GDK_SCROLL_DOWN) >X- { >X- // down code >X+ } >X+ else if (event->direction == GDK_SCROLL_DOWN) >X+ { >X+ // down code >X m_filters[i]->Q -= SCROLL_EVENT_INCREMENT*m_filters[i]->Q; >X m_filters[i]->Q = m_filters[i]->Q < PEAK_Q_MIN ? PEAK_Q_MIN : m_filters[i]->Q; >X } >X- >X+ >X //Redraw with timeout >X cueBandRedraws(m_iBandSel); >X- >X+ >X // emit the signal >X m_BandChangedSignal.emit( i, m_filters[i]->Gain, m_filters[i]->Freq, m_filters[i]->Q); >X break; >X } >X } >X- >X+ >X return true; >X } >X >X bool PlotEQCurve::on_mouse_motion_event(GdkEventMotion* event) >X-{ >X+{ >X const double x = event->x - CURVE_MARGIN - CURVE_TEXT_OFFSET_X; >X const double y = event->y - CURVE_MARGIN; >X- >X+ >X if(bMotionIsConnected) >X { >X //Recompute curve on current band and redraw >X@@ -516,7 +516,7 @@ bool PlotEQCurve::on_mouse_motion_event( >X m_filters[m_iBandSel]->Freq = Pixels2freq(xclipped); >X m_filters[m_iBandSel]->Freq = m_filters[m_iBandSel]->Freq > FREQ_MAX ? FREQ_MAX : m_filters[m_iBandSel]->Freq; >X m_filters[m_iBandSel]->Freq = m_filters[m_iBandSel]->Freq < FREQ_MIN ? FREQ_MIN : m_filters[m_iBandSel]->Freq; >X- >X+ >X if (m_filters[m_iBandSel]->fType == PEAK || >X m_filters[m_iBandSel]->fType == HIGH_SHELF || >X m_filters[m_iBandSel]->fType == LOW_SHELF ) >X@@ -525,14 +525,14 @@ bool PlotEQCurve::on_mouse_motion_event( >X m_filters[m_iBandSel]->Gain = m_filters[m_iBandSel]->Gain > GAIN_MAX ? GAIN_MAX : m_filters[m_iBandSel]->Gain; >X m_filters[m_iBandSel]->Gain = m_filters[m_iBandSel]->Gain < GAIN_MIN ? GAIN_MIN : m_filters[m_iBandSel]->Gain; >X } >X- >X+ >X else >X { >X m_filters[m_iBandSel]->Gain = 0.0; >X } >X- >X+ >X redraw_cursor(xclipped, dB2Pixels(m_filters[m_iBandSel]->Gain)); >X- >X+ >X //Redraw with timeout >X cueBandRedraws(m_iBandSel); >X >X@@ -544,12 +544,12 @@ bool PlotEQCurve::on_mouse_motion_event( >X else >X { >X redraw_cursor(event->x -CURVE_MARGIN - CURVE_TEXT_OFFSET_X, event->y - CURVE_MARGIN); >X- >X+ >X //Check if is over Zoom widget >X if((event->x > m_zoom_widget.x1 - 10 && >X event->x < m_zoom_widget.x2 + 10 && >X event->y > height -CURVE_MARGIN - CURVE_TEXT_OFFSET_Y + ZOOM_WIDGET_BORDER_Y && >X- event->y < height -CURVE_MARGIN ) || >X+ event->y < height -CURVE_MARGIN ) || >X m_zoom_widget.center_press || m_zoom_widget.f1_press || m_zoom_widget.f2_press) >X { >X if(m_zoom_widget.center_press) >X@@ -569,7 +569,7 @@ bool PlotEQCurve::on_mouse_motion_event( >X m_zoom_widget.f1_focus = true; >X m_zoom_widget.f2_focus = false; >X m_zoom_widget.center_focus = false; >X- recomputeMinFreq_fromX1Pixel(event->x); >X+ recomputeMinFreq_fromX1Pixel(event->x); >X m_fullRedraw = true; >X } >X else if(m_zoom_widget.f2_press) >X@@ -577,10 +577,10 @@ bool PlotEQCurve::on_mouse_motion_event( >X m_zoom_widget.f2_focus = true; >X m_zoom_widget.f1_focus = false; >X m_zoom_widget.center_focus = false; >X- recomputeMaxFreq_fromX2Pixel(event->x); >X+ recomputeMaxFreq_fromX2Pixel(event->x); >X m_fullRedraw = true; >X } >X- >X+ >X else if(event->x > m_zoom_widget.x1 + 10 && >X event->x < m_zoom_widget.x2 - 10 ) >X { >X@@ -621,7 +621,7 @@ bool PlotEQCurve::on_mouse_motion_event( >X redraw_zoom_widget(); >X m_justRedraw = true; >X } >X- >X+ >X //Check if is over some control pointer >X bBandFocus = false; >X bool vFocus[m_TotalBandsCount]; >X@@ -636,7 +636,7 @@ bool PlotEQCurve::on_mouse_motion_event( >X x < width - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_X && >X y > 0 && >X y < height - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_Y ) >X- >X+ >X { >X m_iBandSel = i; >X bBandFocus = true; >X@@ -658,7 +658,7 @@ bool PlotEQCurve::on_mouse_motion_event( >X } >X } >X } >X- >X+ >X if(bBandFocus) >X { >X m_BandSelectedSignal.emit(m_iBandSel); >X@@ -667,10 +667,10 @@ bool PlotEQCurve::on_mouse_motion_event( >X { >X m_BandUnselectedSignal.emit(); >X } >X- >X+ >X m_BandRedraw = true; //Force a redraw of curve in next timer without computing bands >X } >X- >X+ >X if( event->x > CURVE_MARGIN + CURVE_TEXT_OFFSET_X && >X event->x < width - CURVE_MARGIN && >X event->y > CURVE_MARGIN && >X@@ -695,7 +695,7 @@ bool PlotEQCurve::on_mouse_leave_widget( >X m_zoom_widget.f2_focus = false; >X redraw_zoom_widget(); >X m_justRedraw = true; >X- >X+ >X if(!bMotionIsConnected) >X { >X redraw_cursor(event->x - CURVE_MARGIN - CURVE_TEXT_OFFSET_X, event->y - CURVE_MARGIN); >X@@ -708,9 +708,9 @@ bool PlotEQCurve::on_mouse_leave_widget( >X >X //Timer callback for auto redraw and graph math >X bool PlotEQCurve::on_timeout_redraw() >X-{ >X+{ >X bool bRedraw = false; >X- >X+ >X //Full redraw request >X if(m_fullRedraw) >X { >X@@ -723,11 +723,11 @@ bool PlotEQCurve::on_timeout_redraw() >X m_Bands2Redraw[i] = true; >X } >X m_BandRedraw = true; >X- >X+ >X m_fullRedraw = false; >X bRedraw = true; >X } >X- >X+ >X //Redraw if curve changed >X if(m_BandRedraw) >X { >X@@ -744,8 +744,8 @@ bool PlotEQCurve::on_timeout_redraw() >X m_BandRedraw = false; >X bRedraw = true; >X } >X- >X- >X+ >X+ >X if(bRedraw || m_justRedraw) >X { >X m_justRedraw = false; >X@@ -755,7 +755,7 @@ bool PlotEQCurve::on_timeout_redraw() >X Gdk::Rectangle r(0, 0, get_allocation().get_width(), get_allocation().get_height()); >X win->invalidate_rect(r, false); >X } >X- } >X+ } >X return true; >X } >X >X@@ -766,108 +766,108 @@ bool PlotEQCurve::on_expose_event(GdkEve >X Glib::RefPtr<Gdk::Window> window = get_window(); >X if(window) >X { >X- >X+ >X Gtk::Allocation allocation = get_allocation(); >X width = allocation.get_width(); >X height = allocation.get_height(); >X- >X+ >X if( !(m_background_surface_ptr || m_fft_surface_ptr || m_zoom_surface_ptr || m_maincurve_surface_ptr || m_grid_surface_ptr || m_xAxis_surface_ptr || m_yAxis_surface_ptr || m_cursor_surface_ptr)) >X- { >X+ { >X m_background_surface_ptr = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, width, height); >X m_fft_surface_ptr = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, width - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_X, height - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_Y); >X m_zoom_surface_ptr = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, width - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_X, CURVE_TEXT_OFFSET_Y - ZOOM_WIDGET_BORDER_Y); >X- >X+ >X //Set initial x1 and x2 >X redraw_zoom_widget(); >X- >X+ >X m_maincurve_surface_ptr = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, width - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_X, height - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_Y); >X for(int i = 0; i < m_TotalBandsCount; i++) >X { >X m_curve_surface_ptr[i] = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, width - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_X, height - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_Y); >X } >X m_grid_surface_ptr = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, width - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_X, height - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_Y); >X- m_xAxis_surface_ptr = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, width - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_X, CURVE_TEXT_OFFSET_Y); >X+ m_xAxis_surface_ptr = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, width - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_X, CURVE_TEXT_OFFSET_Y); >X m_yAxis_surface_ptr = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, CURVE_TEXT_OFFSET_X, height - CURVE_TEXT_OFFSET_Y); >X m_cursor_surface_ptr = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, width - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_X, height - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_Y); >X redraw_background_widget(); >X resetCenterSpan(); >X Glib::signal_timeout().connect( sigc::mem_fun(*this, &PlotEQCurve::on_timeout_redraw), AUTO_REFRESH_TIMEOUT_MS ); //Connectin timer here to avoid using plot with unitialized freq vector >X } >X- >X+ >X Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context(); >X >X //Draw the background >X if(m_background_surface_ptr) >X { >X- cr->save(); >X- cr->set_source(m_background_surface_ptr, 0, 0); >X+ cr->save(); >X+ cr->set_source(m_background_surface_ptr, 0, 0); >X cr->paint(); >X cr->restore(); >X } >X- >X- //Draw zoom widget >X+ >X+ //Draw zoom widget >X if(m_zoom_surface_ptr) >X { >X- cr->save(); >X- cr->set_source(m_zoom_surface_ptr, CURVE_MARGIN + CURVE_TEXT_OFFSET_X, height - CURVE_MARGIN - CURVE_TEXT_OFFSET_Y + ZOOM_WIDGET_BORDER_Y); >X+ cr->save(); >X+ cr->set_source(m_zoom_surface_ptr, CURVE_MARGIN + CURVE_TEXT_OFFSET_X, height - CURVE_MARGIN - CURVE_TEXT_OFFSET_Y + ZOOM_WIDGET_BORDER_Y); >X cr->paint(); >X cr->restore(); >X } >X- >X+ >X //Draw FFT data >X if(m_FftActive && m_fft_surface_ptr) >X- { >X- cr->save(); >X- cr->set_source(m_fft_surface_ptr, CURVE_MARGIN + CURVE_TEXT_OFFSET_X, CURVE_MARGIN); >X+ { >X+ cr->save(); >X+ cr->set_source(m_fft_surface_ptr, CURVE_MARGIN + CURVE_TEXT_OFFSET_X, CURVE_MARGIN); >X cr->paint(); >X cr->restore(); >X } >X- >X- //Draw the grid >X+ >X+ //Draw the grid >X if(m_grid_surface_ptr) >X { >X- cr->save(); >X- cr->set_source(m_grid_surface_ptr, CURVE_MARGIN + CURVE_TEXT_OFFSET_X, CURVE_MARGIN); >X+ cr->save(); >X+ cr->set_source(m_grid_surface_ptr, CURVE_MARGIN + CURVE_TEXT_OFFSET_X, CURVE_MARGIN); >X cr->paint(); >X cr->restore(); >X } >X- >X+ >X //Db Scale Axis >X if(m_yAxis_surface_ptr) >X- { >X- cr->save(); >X- cr->set_source(m_yAxis_surface_ptr, CURVE_MARGIN, 0); >X+ { >X+ cr->save(); >X+ cr->set_source(m_yAxis_surface_ptr, CURVE_MARGIN, 0); >X cr->paint(); >X cr->restore(); >X } >X- >X+ >X //Hz scale Axis >X if(m_xAxis_surface_ptr) >X- { >X- cr->save(); >X- cr->set_source(m_xAxis_surface_ptr, CURVE_MARGIN + CURVE_TEXT_OFFSET_X, height - CURVE_MARGIN - CURVE_TEXT_OFFSET_Y); >X+ { >X+ cr->save(); >X+ cr->set_source(m_xAxis_surface_ptr, CURVE_MARGIN + CURVE_TEXT_OFFSET_X, height - CURVE_MARGIN - CURVE_TEXT_OFFSET_Y); >X cr->paint(); >X cr->restore(); >X } >X- >X+ >X //Draw the cursor position >X if(m_cursor_surface_ptr) >X { >X- cr->save(); >X- cr->set_source(m_cursor_surface_ptr, CURVE_MARGIN + CURVE_TEXT_OFFSET_X, CURVE_MARGIN); >X+ cr->save(); >X+ cr->set_source(m_cursor_surface_ptr, CURVE_MARGIN + CURVE_TEXT_OFFSET_X, CURVE_MARGIN); >X cr->paint(); >X cr->restore(); >X } >X >X //Draw the curve >X if(m_maincurve_surface_ptr) >X- { >X- cr->save(); >X+ { >X+ cr->save(); >X cr->set_source(m_maincurve_surface_ptr, CURVE_MARGIN + CURVE_TEXT_OFFSET_X, CURVE_MARGIN); >X cr->paint(); >X cr->restore(); >X } >X- >X+ >X //draw de outer grind box >X cr->save(); >X cr->set_source_rgb(0.3, 0.3, 0.3); >X@@ -876,7 +876,7 @@ bool PlotEQCurve::on_expose_event(GdkEve >X cr->stroke(); >X cr->restore(); >X } >X- return true; >X+ return true; >X } >X >X void PlotEQCurve::glowBand(int band) >X@@ -915,7 +915,7 @@ double PlotEQCurve::Pixels2dB(double pix >X >X double PlotEQCurve::Pixels2freq(double pixels) >X { >X- return m_minFreq*pow(10, ((pixels /*- CURVE_MARGIN- CURVE_TEXT_OFFSET_X */)/((((double)width) - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_X)/(log10(m_maxFreq/m_minFreq))))); >X+ return m_minFreq*pow(10, ((pixels /*- CURVE_MARGIN- CURVE_TEXT_OFFSET_X */)/((((double)width) - 2*CURVE_MARGIN - CURVE_TEXT_OFFSET_X)/(log10(m_maxFreq/m_minFreq))))); >X } >X >X >X@@ -952,10 +952,10 @@ void PlotEQCurve::CalcBand_DigitalFilter >X m_fil.fs = SampleRate; >X m_fil.InterK = 0.0f; >X m_fil.useInterpolation = 0.0f; >X- >X+ >X //Calc coefs >X calcCoefs(&m_fil, m_fil.gain, m_fil.freq, m_fil.q, m_fil.iType, m_fil.enable); >X- >X+ >X //Digital filter magnitude response >X double w, A, B, C, D, sinW, cosW; >X //Precalculables >X@@ -963,11 +963,11 @@ void PlotEQCurve::CalcBand_DigitalFilter >X double BK = m_fil.b0 - m_fil.b2; >X double CK = 1 + m_fil.a2; >X double DK = 1 - m_fil.a2; >X- >X- >X+ >X+ >X for(int i=0; i<CURVE_NUM_OF_POINTS; i++) >X { >X- w=2*PI*f[i] / m_fil.fs; >X+ w=2*PI*f[i] / m_fil.fs; >X sinW = sin(w); >X cosW = cos(w); >X A = m_fil.b1 + AK*cosW; >X@@ -976,7 +976,7 @@ void PlotEQCurve::CalcBand_DigitalFilter >X D = DK*sinW; >X band_y[bd_ix][i]=(double)20*log10(sqrt(pow(A*C + B*D, 2) + pow(B*C - A*D, 2))/(C*C + D*D)); >X } >X- >X+ >X //Compute 3 and 4 order m_filters >X if(m_fil.filter_order) >X { >X@@ -985,10 +985,10 @@ void PlotEQCurve::CalcBand_DigitalFilter >X double BK = m_fil.b1_0 - m_fil.b1_2; >X double CK = 1 + m_fil.a1_2; >X double DK = 1 - m_fil.a1_2; >X- >X+ >X for(int i=0; i<CURVE_NUM_OF_POINTS; i++) >X { >X- w=2*PI*f[i] / m_fil.fs; >X+ w=2*PI*f[i] / m_fil.fs; >X sinW = sin(w); >X cosW = cos(w); >X A = m_fil.b1_1 + AK*cosW; >X@@ -1001,25 +1001,25 @@ void PlotEQCurve::CalcBand_DigitalFilter >X } >X >X void PlotEQCurve::setSampleRate(double samplerate) >X-{ >X+{ >X if(samplerate != SampleRate) >X { >X SampleRate = samplerate; >X- >X+ >X if( !(m_background_surface_ptr || m_fft_surface_ptr || m_zoom_surface_ptr || m_maincurve_surface_ptr || m_grid_surface_ptr || m_xAxis_surface_ptr || m_yAxis_surface_ptr)) >X { >X //Init FFT vectors using real sampleRate >X double fft_raw_freq; >X for(int i = 0; i <= (FFT_N/2); i++) >X- { >X+ { >X fft_raw_freq = (SampleRate * (double)i) / ((double)(FFT_N)); >X- xPixels_fft[i] = log10(fft_raw_freq/MIN_FREQ)/log10(MAX_FREQ/MIN_FREQ); >X+ xPixels_fft[i] = log10(fft_raw_freq/MIN_FREQ)/log10(MAX_FREQ/MIN_FREQ); >X fft_pink_noise[i] = 3.0*(log10(fft_raw_freq/20.0)/log10(2)); >X fft_plot[i]= 0.0; >X fft_ant_data[i] = 0.0; >X //std::cout<<"freq["<<i<<"] = "<< fft_raw_freq[i]<< "Pixels = "<< xPixels_fft[i] <<std::endl; >X } >X- >X+ >X //Redraw all by timer >X m_fullRedraw = true; >X } >X@@ -1042,13 +1042,13 @@ void PlotEQCurve::setFftActive(bool acti >X m_bIsSpectrogram = isSpectrogram; >X >X //Clear plot screen >X- Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_fft_surface_ptr); >X+ Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_fft_surface_ptr); >X cr->save(); >X cr->set_operator(Cairo::OPERATOR_CLEAR); >X cr->paint(); >X cr->restore(); >X- >X- >X+ >X+ >X m_justRedraw = true; >X } >X >X@@ -1071,7 +1071,7 @@ void PlotEQCurve::setFftRange(double r) >X void PlotEQCurve::setPlotdBRange(double range) >X { >X m_dB_plot_range = 2.0*range; >X- >X+ >X //Redraw all by timer >X m_fullRedraw = true; >X } >X@@ -1079,19 +1079,19 @@ void PlotEQCurve::setPlotdBRange(double >X void PlotEQCurve::redraw_background_widget() >X { >X if(m_background_surface_ptr) >X- { >X+ { >X //Create cairo context using the buffer surface >X Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_background_surface_ptr); >X- >X+ >X //Paint backgroud >X cr->save(); >X cr->set_source_rgb(BACKGROUND_R, BACKGROUND_G, BACKGROUND_B); >X cr->paint(); //Fill all with background color >X cr->restore(); >X- >X- >X+ >X+ >X //Draw an interesting frame >X- cr->save(); >X+ cr->save(); >X double radius = height / 50.0; >X double degrees = M_PI / 180.0; >X cr->begin_new_sub_path(); >X@@ -1099,34 +1099,34 @@ void PlotEQCurve::redraw_background_widg >X cr->arc (width - CURVE_BORDER - radius, height - CURVE_BORDER - radius, radius, 0 * degrees, 90 * degrees); >X cr->arc (CURVE_BORDER + radius, height- CURVE_BORDER - radius, radius, 90 * degrees, 180 * degrees); >X cr->arc ( CURVE_BORDER + radius, CURVE_BORDER + radius, radius, 180 * degrees, 270 * degrees); >X- cr->close_path(); >X- Cairo::RefPtr<Cairo::LinearGradient> bkg_gradient_ptr = Cairo::LinearGradient::create(width/2, CURVE_BORDER, width/2, height - CURVE_BORDER); >X- bkg_gradient_ptr->add_color_stop_rgba (0.0, 0.1, 0.1, 0.1, 0.6 ); >X- bkg_gradient_ptr->add_color_stop_rgba (0.5, 0.2, 0.3, 0.3, 0.3 ); >X- bkg_gradient_ptr->add_color_stop_rgba (1.0, 0.1, 0.1, 0.1, 0.6 ); >X+ cr->close_path(); >X+ Cairo::RefPtr<Cairo::LinearGradient> bkg_gradient_ptr = Cairo::LinearGradient::create(width/2, CURVE_BORDER, width/2, height - CURVE_BORDER); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.0, 0.1, 0.1, 0.1, 0.6 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.5, 0.2, 0.3, 0.3, 0.3 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (1.0, 0.1, 0.1, 0.1, 0.6 ); >X cr->set_source(bkg_gradient_ptr); >X cr->fill_preserve(); >X cr->set_line_width(1.0); >X cr->set_source_rgb(0.3, 0.3, 0.4); >X- cr->stroke(); >X+ cr->stroke(); >X cr->restore(); >X } >X- >X+ >X } >X >X void PlotEQCurve::redraw_zoom_widget() >X-{ >X+{ >X if(m_zoom_surface_ptr) >X- { >X+ { >X //Create cairo context using the buffer surface >X Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_zoom_surface_ptr); >X- >X- //Clear current context >X+ >X+ //Clear current context >X cr->save(); >X cr->set_operator(Cairo::OPERATOR_CLEAR); >X cr->paint(); >X cr->restore(); >X- >X+ >X //Draw a box >X cr->save(); >X cr->begin_new_sub_path(); >X@@ -1141,7 +1141,7 @@ void PlotEQCurve::redraw_zoom_widget() >X cr->set_source_rgba(0.6, 0.6, 0.6, 0.6); >X cr->stroke(); >X cr->restore(); >X- >X+ >X //Draw a freq axis >X cr->save(); >X cr->set_source_rgb(0.6, 0.6, 0.6); >X@@ -1149,21 +1149,21 @@ void PlotEQCurve::redraw_zoom_widget() >X Pango::FontDescription font_desc("sans 8px"); >X pangoLayout->set_font_description(font_desc); >X pangoLayout->set_alignment(Pango::ALIGN_RIGHT); >X- >X- //Initalize the grid >X+ >X+ //Initalize the grid >X const double f_grid[4] = {20.0, 100.0, 1000.0, 10000.0}; >X int gridPix[4]; >X for(int i=0; i < 4; i++) >X { >X gridPix[i] = round(((double)m_zoom_surface_ptr->get_width())/(log10(MAX_FREQ/MIN_FREQ))*log10(f_grid[i]/MIN_FREQ)) + CURVE_MARGIN + CURVE_TEXT_OFFSET_X; >X } >X- >X+ >X //Hz scale 20 Hz >X cr->move_to( gridPix[0] - 5 - CURVE_MARGIN - CURVE_TEXT_OFFSET_X, 0.5*m_zoom_surface_ptr->get_height() - 4); >X pangoLayout->set_text("20"); >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X- >X+ >X //Hz scale 100 Hz >X cr->move_to( gridPix[1] - 5 - CURVE_MARGIN - CURVE_TEXT_OFFSET_X, 0.5*m_zoom_surface_ptr->get_height() - 4); >X pangoLayout->set_text("100"); >X@@ -1174,16 +1174,16 @@ void PlotEQCurve::redraw_zoom_widget() >X cr->move_to( gridPix[2] - 5 - CURVE_MARGIN - CURVE_TEXT_OFFSET_X, 0.5*m_zoom_surface_ptr->get_height() - 4); >X pangoLayout->set_text("1k"); >X pangoLayout->show_in_cairo_context(cr); >X- cr->stroke(); >X- >X+ cr->stroke(); >X+ >X //Hz scale 10 kHz >X cr->move_to( gridPix[3] - 5 - CURVE_MARGIN - CURVE_TEXT_OFFSET_X, 0.5*m_zoom_surface_ptr->get_height() - 4); >X pangoLayout->set_text("10k"); >X pangoLayout->show_in_cairo_context(cr); >X- cr->stroke(); >X+ cr->stroke(); >X cr->restore(); >X- >X- //Get pixel position in surface acording max freq span range (freq2pixels function is not valid here!) >X+ >X+ //Get pixel position in surface acording max freq span range (freq2pixels function is not valid here!) >X m_zoom_widget.x1 = round(((double)m_zoom_surface_ptr->get_width())/(log10(MAX_FREQ/MIN_FREQ))*log10(m_minFreq/MIN_FREQ)) + 3.5; >X m_zoom_widget.x2 = round(((double)m_zoom_surface_ptr->get_width())/(log10(MAX_FREQ/MIN_FREQ))*log10(m_maxFreq/MIN_FREQ)) - 3.5; >X >X@@ -1193,48 +1193,48 @@ void PlotEQCurve::redraw_zoom_widget() >X cr->save(); >X cr->rectangle(m_zoom_widget.x1 - 5, 2, 10, m_zoom_surface_ptr->get_height() - 4); >X cr->set_source_rgb(0,0.9,0.9); >X- cr->fill(); >X+ cr->fill(); >X cr->restore(); >X- >X+ >X cr->save(); >X cr->rectangle(m_zoom_widget.x2 - 5, 2, 10, m_zoom_surface_ptr->get_height() - 4); >X cr->set_source_rgb(0,0.9,0.9); >X- cr->fill(); >X+ cr->fill(); >X cr->restore(); >X } >X- >X- >X- //Draw the button >X+ >X+ >X+ //Draw the button >X cr->save(); >X- cr->begin_new_sub_path(); >X+ cr->begin_new_sub_path(); >X cr->arc( m_zoom_widget.x1, 6.5, 3, M_PI, -0.5*M_PI); >X cr->arc( m_zoom_widget.x2, 6.5, 3, -0.5*M_PI, 0); >X cr->arc( m_zoom_widget.x2, m_zoom_surface_ptr->get_height() - 6.5, 3, 0.0, 0.5*M_PI); >X cr->arc( m_zoom_widget.x1, m_zoom_surface_ptr->get_height() - 6.5, 3, 0.5*M_PI, M_PI); >X cr->close_path(); >X- >X- Cairo::RefPtr<Cairo::LinearGradient> bkg_gradient_ptr = Cairo::LinearGradient::create(0, 0, 0, m_zoom_surface_ptr->get_height()); >X+ >X+ Cairo::RefPtr<Cairo::LinearGradient> bkg_gradient_ptr = Cairo::LinearGradient::create(0, 0, 0, m_zoom_surface_ptr->get_height()); >X if(m_zoom_widget.center_focus) >X { >X- bkg_gradient_ptr->add_color_stop_rgba (0.0, 0.2, 0.3, 0.3, 0.7); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.0, 0.2, 0.3, 0.3, 0.7); >X bkg_gradient_ptr->add_color_stop_rgba (0.4, 0.2, 0.4, 0.5, 1 ); >X- bkg_gradient_ptr->add_color_stop_rgba (0.6, 0.2, 0.4, 0.5, 1 ); >X- bkg_gradient_ptr->add_color_stop_rgba (1.0, 0.2, 0.3, 0.3, 0.7 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.6, 0.2, 0.4, 0.5, 1 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (1.0, 0.2, 0.3, 0.3, 0.7 ); >X } >X else >X { >X- bkg_gradient_ptr->add_color_stop_rgba (0.0, 0.2, 0.2, 0.2, 0.7 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.0, 0.2, 0.2, 0.2, 0.7 ); >X bkg_gradient_ptr->add_color_stop_rgba (0.4, 0.3, 0.3, 0.3, 1 ); >X- bkg_gradient_ptr->add_color_stop_rgba (0.6, 0.3, 0.3, 0.3, 1 ); >X- bkg_gradient_ptr->add_color_stop_rgba (1.0, 0.2, 0.2, 0.2, 0.7 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.6, 0.3, 0.3, 0.3, 1 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (1.0, 0.2, 0.2, 0.2, 0.7 ); >X } >X- cr->set_source(bkg_gradient_ptr); >X+ cr->set_source(bkg_gradient_ptr); >X cr->fill_preserve(); >X cr->set_line_width(1); >X cr->set_source_rgba(1,1,1, 0.7); >X cr->stroke(); >X cr->restore(); >X- >X+ >X //Draw text on button >X cr->save(); >X cr->set_source_rgb(0.6, 0.6, 0.6); >X@@ -1253,7 +1253,7 @@ void PlotEQCurve::redraw_zoom_widget() >X ss1<<divider; >X } >X } >X- >X+ >X cr->move_to( m_zoom_widget.x1 + 5, m_zoom_surface_ptr->get_height()/2 - 4); >X pangoLayout->set_text( ss1.str() ); >X pangoLayout->show_in_cairo_context(cr); >X@@ -1261,7 +1261,7 @@ void PlotEQCurve::redraw_zoom_widget() >X pangoLayout->set_text("~Zoom~"); >X pangoLayout->show_in_cairo_context(cr); >X cr->move_to( m_zoom_widget.x2 - 25, m_zoom_surface_ptr->get_height()/2 - 4); >X- >X+ >X std::stringstream ss2; >X if(m_maxFreq<1000) >X { >X@@ -1276,12 +1276,12 @@ void PlotEQCurve::redraw_zoom_widget() >X ss2<<divider; >X } >X } >X- >X+ >X pangoLayout->set_text( ss2.str() ); >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X cr->restore(); >X- >X+ >X //Update coords including global offsets >X m_zoom_widget.x1 += CURVE_MARGIN + CURVE_TEXT_OFFSET_X; >X m_zoom_widget.x2 += CURVE_MARGIN + CURVE_TEXT_OFFSET_X; >X@@ -1289,21 +1289,21 @@ void PlotEQCurve::redraw_zoom_widget() >X } >X >X void PlotEQCurve::redraw_curve_widgets(int band) >X-{ >X+{ >X if(m_curve_surface_ptr[band]) >X { >X //Create cairo context using the buffer surface >X Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_curve_surface_ptr[band]); >X- >X- //Clear current context >X+ >X+ //Clear current context >X cr->save(); >X cr->set_operator(Cairo::OPERATOR_CLEAR); >X cr->paint(); >X cr->restore(); >X- >X+ >X //Draw curve area in band color >X cr->save(); >X- double Y_fil0, Y_fil1; >X+ double Y_fil0, Y_fil1; >X switch(m_filters[band]->fType) >X { >X case PEAK: >X@@ -1312,7 +1312,7 @@ void PlotEQCurve::redraw_curve_widgets(i >X Y_fil0 = dB2Pixels( m_filters[band]->Gain); >X Y_fil1 = dB2Pixels((-1.0)* m_filters[band]->Gain); >X break; >X- >X+ >X case NOTCH: >X Y_fil0 = (double)m_curve_surface_ptr[band]->get_height(); >X Y_fil1 = 0; >X@@ -1322,11 +1322,11 @@ void PlotEQCurve::redraw_curve_widgets(i >X Y_fil0 = 0.75*(double)m_curve_surface_ptr[band]->get_height(); >X Y_fil1 = 0.25*(double)m_curve_surface_ptr[band]->get_height(); >X } >X- >X- Cairo::RefPtr<Cairo::LinearGradient> bd_gradient_ptr = Cairo::LinearGradient::create(0, Y_fil0, 0, Y_fil1); >X+ >X+ Cairo::RefPtr<Cairo::LinearGradient> bd_gradient_ptr = Cairo::LinearGradient::create(0, Y_fil0, 0, Y_fil1); >X if(m_filters[band]->bIsOn and !m_Bypass) //If band is enabled and not bypass >X { >X- Gdk::Color color(bandColorLUT[band]); >X+ Gdk::Color color(bandColorLUT[band]); >X bd_gradient_ptr->add_color_stop_rgba(0, color.get_red_p(), color.get_green_p(), color.get_blue_p(), 0.3); >X bd_gradient_ptr->add_color_stop_rgba(0.5, color.get_red_p(), color.get_green_p(), color.get_blue_p(), 0.01); >X bd_gradient_ptr->add_color_stop_rgba(1, color.get_red_p(), color.get_green_p(), color.get_blue_p(), 0.3); >X@@ -1356,8 +1356,8 @@ void PlotEQCurve::redraw_main_curve() >X { >X //Create cairo context using the buffer surface >X Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_maincurve_surface_ptr); >X- >X- //Clear current context >X+ >X+ //Clear current context >X cr->save(); >X cr->set_operator(Cairo::OPERATOR_CLEAR); >X cr->paint(); >X@@ -1367,19 +1367,19 @@ void PlotEQCurve::redraw_main_curve() >X { >X //Draw the curve color area for each band >X if(m_curve_surface_ptr[i]) >X- { >X- cr->save(); >X+ { >X+ cr->save(); >X cr->set_source(m_curve_surface_ptr[i], 0, 0); >X cr->paint(); >X cr->restore(); >X } >X } >X- >X+ >X if (!m_Bypass) >X { >X //Draw the main curve >X cr->save(); >X- >X+ >X cr->set_line_width(1); >X for(int j = 0; j < m_NumChannels; j++) >X { >X@@ -1395,20 +1395,20 @@ void PlotEQCurve::redraw_main_curve() >X cr->move_to(xPixels[0], dB2Pixels(main_y[j][0]) + 0.5); >X for (int i = 1; i < CURVE_NUM_OF_POINTS; i++) >X { >X- cr->line_to(xPixels[i], dB2Pixels(main_y[j][i]) + 0.5); >X+ cr->line_to(xPixels[i], dB2Pixels(main_y[j][i]) + 0.5); >X } >X cr->stroke(); >X } >X cr->restore(); >X- >X+ >X //Draw curve control ball >X- cr->save(); >X+ cr->save(); >X double ball_x, ball_y; >X Cairo::RefPtr< Cairo::RadialGradient > ball_gradient_ptr; >X for(int i = 0; i < m_TotalBandsCount; i++) //for each band >X { >X ball_x = (double)freq2Pixels(m_filters[i]->Freq); >X- if( m_filters[i]->fType == PEAK || >X+ if( m_filters[i]->fType == PEAK || >X m_filters[i]->fType == LOW_SHELF || >X m_filters[i]->fType == HIGH_SHELF ) >X { >X@@ -1419,26 +1419,26 @@ void PlotEQCurve::redraw_main_curve() >X ball_y = (double)dB2Pixels(0.0); >X m_filters[i]->Gain = 0.0; >X } >X- >X+ >X Gdk::Color color(bandColorLUT[i]); >X ball_gradient_ptr = Cairo::RadialGradient::create( ball_x - 2, ball_y - 2, 0, ball_x - 2, ball_y - 2, 8); >X ball_gradient_ptr->add_color_stop_rgba (0.0, 1.0, 1.0, 1.0, 0.7); >X- ball_gradient_ptr->add_color_stop_rgba (1.0, 0.0, 0.0, 0.0, 0.0); >X+ ball_gradient_ptr->add_color_stop_rgba (1.0, 0.0, 0.0, 0.0, 0.0); >X cr->arc(ball_x, ball_y, 5.0, 0.0, 6.28318530717958647693); >X cr->set_source_rgb(color.get_red_p(), color.get_green_p(), color.get_blue_p()); >X cr->fill_preserve(); >X- cr->set_source(ball_gradient_ptr); >X+ cr->set_source(ball_gradient_ptr); >X cr->fill_preserve(); >X cr->set_line_width(1); >X cr->set_source_rgb(0.1,0.1,0.1); >X cr->stroke(); >X } >X- >X+ >X //Draw Focused band >X if(bMotionIsConnected || bBandFocus) >X { >X ball_x = (double)freq2Pixels(m_filters[m_iBandSel]->Freq); >X- if( m_filters[m_iBandSel]->fType == PEAK || >X+ if( m_filters[m_iBandSel]->fType == PEAK || >X m_filters[m_iBandSel]->fType == LOW_SHELF || >X m_filters[m_iBandSel]->fType == HIGH_SHELF ) >X { >X@@ -1449,7 +1449,7 @@ void PlotEQCurve::redraw_main_curve() >X ball_y = (double)dB2Pixels(0.0); >X m_filters[m_iBandSel]->Gain = 0.0; >X } >X- >X+ >X Gdk::Color color("#00FFFF"); >X cr->set_line_width(1); >X cr->set_source_rgb(color.get_red_p(), color.get_green_p(), color.get_blue_p()); >X@@ -1457,7 +1457,7 @@ void PlotEQCurve::redraw_main_curve() >X cr->stroke(); >X } >X cr->restore(); >X- >X+ >X }// end Bypass check >X } >X } >X@@ -1469,14 +1469,14 @@ void PlotEQCurve::redraw_grid_widget() >X { >X //Create cairo context using the buffer surface >X Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_grid_surface_ptr); >X- >X- //Clear current context >X+ >X+ //Clear current context >X cr->save(); >X cr->set_operator(Cairo::OPERATOR_CLEAR); >X cr->paint(); >X cr->restore(); >X- >X- cr->save(); >X+ >X+ cr->save(); >X cr->set_source_rgb(0.3, 0.3, 0.3); >X cr->set_line_width(1); >X for(int i = 0; i < GRID_VERTICAL_LINES; i++) >X@@ -1485,7 +1485,7 @@ void PlotEQCurve::redraw_grid_widget() >X cr->line_to(xPixels_Grid[i] + 0.5, m_grid_surface_ptr->get_height()); >X cr->stroke(); >X } >X- >X+ >X for(int i = -m_dB_plot_range/2; i <= m_dB_plot_range/2; i+=(int)(m_dB_plot_range/10.0)) >X { >X cr->move_to(0, dB2Pixels(i) + 0.5); >X@@ -1502,13 +1502,13 @@ void PlotEQCurve::redraw_xAxis_widget() >X { >X //Create cairo context using the buffer surface >X Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_xAxis_surface_ptr); >X- >X- //Clear current context >X+ >X+ //Clear current context >X cr->save(); >X cr->set_operator(Cairo::OPERATOR_CLEAR); >X cr->paint(); >X cr->restore(); >X- >X+ >X //Draw text with pango to grid >X cr->save(); >X cr->set_source_rgb(0.6, 0.6, 0.6); >X@@ -1516,54 +1516,54 @@ void PlotEQCurve::redraw_xAxis_widget() >X Pango::FontDescription font_desc("sans 9px"); >X pangoLayout->set_font_description(font_desc); >X pangoLayout->set_alignment(Pango::ALIGN_RIGHT); >X- >X+ >X cr->move_to( xPixels_Grid[0] - 5, 3.5); >X pangoLayout->set_text("20"); >X pangoLayout->show_in_cairo_context(cr); >X- cr->stroke(); >X- >X+ cr->stroke(); >X+ >X //Hz scale 50 Hz >X cr->move_to( xPixels_Grid[3] - 5, 3.5); >X pangoLayout->set_text("50"); >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X- >X+ >X //Hz scale 100 Hz >X cr->move_to( xPixels_Grid[8] - 10, 3.5); >X pangoLayout->set_text("100"); >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X- >X+ >X //Hz scale 200 Hz >X cr->move_to( xPixels_Grid[9] - 10, 3.5); >X pangoLayout->set_text("200"); >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X- >X+ >X //Hz scale 500 Hz >X cr->move_to( xPixels_Grid[12] - 10, 3.5); >X pangoLayout->set_text("500"); >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X- >X+ >X //Hz scale 1 KHz >X cr->move_to( xPixels_Grid[17] - 5, 3.5); >X pangoLayout->set_text("1k"); >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X- >X+ >X //Hz scale 2 KHz >X cr->move_to( xPixels_Grid[18] - 5, 3.5); >X pangoLayout->set_text("2k"); >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X- >X+ >X //Hz scale 5 KHz >X cr->move_to( xPixels_Grid[21] - 5, 3.5); >X pangoLayout->set_text("5k"); >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X- >X+ >X //Hz scale 10 KHz >X cr->move_to( xPixels_Grid[26] - 5, 3.5); >X pangoLayout->set_text("10k"); >X@@ -1585,13 +1585,13 @@ void PlotEQCurve::redraw_yAxis_widget() >X { >X //Create cairo context using the buffer surface >X Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_yAxis_surface_ptr); >X- >X- //Clear current context >X+ >X+ //Clear current context >X cr->save(); >X cr->set_operator(Cairo::OPERATOR_CLEAR); >X cr->paint(); >X cr->restore(); >X- >X+ >X //Draw text with pango to grid >X cr->save(); >X cr->set_source_rgb(0.6, 0.6, 0.6); >X@@ -1607,38 +1607,38 @@ void PlotEQCurve::redraw_yAxis_widget() >X cr->move_to( 0, dB2Pixels(i) - 3.5 + CURVE_MARGIN); >X pangoLayout->set_text(ss.str()); >X pangoLayout->show_in_cairo_context(cr); >X- cr->stroke(); >X+ cr->stroke(); >X } >X- >X+ >X } >X } >X >X void PlotEQCurve::redraw_cursor(double x, double y) >X-{ >X+{ >X if(m_cursor_surface_ptr) >X { >X //Create cairo context using the buffer surface >X Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_cursor_surface_ptr); >X- >X- //Clear current context >X+ >X+ //Clear current context >X cr->save(); >X cr->set_operator(Cairo::OPERATOR_CLEAR); >X cr->paint(); >X cr->restore(); >X- >X+ >X //Draw text with pango to grid >X if( x > 0 && >X x < m_cursor_surface_ptr->get_width() && >X y > 0 && >X y < m_cursor_surface_ptr->get_height() ) >X { >X- >X+ >X if(bBandFocus) >X { >X x = freq2Pixels(m_filters[m_iBandSel]->Freq); >X y = dB2Pixels( m_filters[m_iBandSel]->Gain ); >X } >X- >X+ >X cr->save(); >X cr->set_source_rgba(0.9, 0.9, 0.9, 1.0); >X cr->set_line_width(1); >X@@ -1651,13 +1651,13 @@ void PlotEQCurve::redraw_cursor(double x >X cr->move_to(x + 0.5*BALL_DETECTION_PIXELS, y + 0.5); >X cr->line_to(m_cursor_surface_ptr->get_width(), y + 0.5); >X cr->stroke(); >X- >X+ >X Glib::RefPtr<Pango::Layout> pangoLayout = Pango::Layout::create(cr); >X Pango::FontDescription font_desc("sans 9px"); >X- pangoLayout->set_font_description(font_desc); >X+ pangoLayout->set_font_description(font_desc); >X std::stringstream ss; >X- double freq = Pixels2freq(x); >X- double gain = Pixels2dB(y); >X+ double freq = Pixels2freq(x); >X+ double gain = Pixels2dB(y); >X int precision = 1; >X if(freq < 100 || (freq >= 1e3 && freq < 1e4)) precision = 2; >X if(freq >= 1000) >X@@ -1670,11 +1670,11 @@ void PlotEQCurve::redraw_cursor(double x >X } >X if( x > (m_cursor_surface_ptr->get_width() - 45)) >X { >X- cr->move_to( x - 45, m_cursor_surface_ptr->get_height() - 10); >X+ cr->move_to( x - 45, m_cursor_surface_ptr->get_height() - 10); >X } >X else >X { >X- cr->move_to( x + 2, m_cursor_surface_ptr->get_height() - 10); >X+ cr->move_to( x + 2, m_cursor_surface_ptr->get_height() - 10); >X } >X pangoLayout->set_text(ss.str()); >X pangoLayout->show_in_cairo_context(cr); >X@@ -1683,16 +1683,16 @@ void PlotEQCurve::redraw_cursor(double x >X ss<< std::setprecision(2) << std::fixed << gain << " dB" ; >X if(gain > 0) >X { >X- cr->move_to( 2, y +1 ); >X+ cr->move_to( 2, y +1 ); >X } >X else >X { >X- cr->move_to( 2, y - 10); >X+ cr->move_to( 2, y - 10); >X } >X pangoLayout->set_text(ss.str()); >X pangoLayout->show_in_cairo_context(cr); >X- cr->stroke(); >X- cr->restore(); >X+ cr->stroke(); >X+ cr->restore(); >X } >X } >X } >X@@ -1702,17 +1702,17 @@ void PlotEQCurve::redraw_fft_widget() >X { >X const double m = (-1.0)/(fft_range); >X float val; >X- >X- Cairo::RefPtr<Cairo::LinearGradient> fft_gradient_ptr = Cairo::LinearGradient::create(0, 0, 1.0, 0); >X+ >X+ Cairo::RefPtr<Cairo::LinearGradient> fft_gradient_ptr = Cairo::LinearGradient::create(0, 0, 1.0, 0); >X >X double binMax = 1e6; >X double binX[(FFT_N/2) + 1]; >X double binY[(FFT_N/2) + 1]; >X- int binCount = 0; >X+ int binCount = 0; >X fft_plot[0] = 1e6; //I don't care about DC >X- >X- for (int i = 1; i <= (FFT_N/2); i++) >X- { >X+ >X+ for (int i = 1; i <= (FFT_N/2); i++) >X+ { >X if(m_bIsSpectrogram) >X { >X val = sqrt((float)fft_raw_data[i]); >X@@ -1723,40 +1723,40 @@ void PlotEQCurve::redraw_fft_widget() >X val = sqrt((float)fft_ant_data[i]); >X } >X fft_plot[i] = m*(20.0f*fastLog10((int*)(&val), fft_log_lut) + fft_gain + fft_pink_noise[i]); >X- >X+ >X if(xPixels_fft_bins[i] == xPixels_fft_bins[i-1]) >X { >X //Inside bin code >X binMax = fft_plot[i] < binMax ? fft_plot[i] : binMax; //Yes it is reversed because binMax is really a pixel min >X } >X else >X- { >X+ { >X binX[binCount] = xPixels_fft_bins[i-1]; >X binY[binCount] = binMax; >X- fft_gradient_ptr->add_color_stop_rgba (binX[binCount], 0.5, -1.0*binMax + 1.0, 1.0, -1.0*binMax + 1.0); >X+ fft_gradient_ptr->add_color_stop_rgba (binX[binCount], 0.5, -1.0*binMax + 1.0, 1.0, -1.0*binMax + 1.0); >X binCount++; >X binMax = fft_plot[i]; >X- >X+ >X } >X- } >X- >X+ } >X+ >X //Create cairo context using the buffer surface >X- Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_fft_surface_ptr); >X- >X+ Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_fft_surface_ptr); >X+ >X //Store a copy of the image >X Cairo::RefPtr<Cairo::ImageSurface> img_ant = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, m_fft_surface_ptr->get_width(), m_fft_surface_ptr->get_height()); >X- Cairo::RefPtr<Cairo::Context> cr_ant = Cairo::Context::create(img_ant); >X+ Cairo::RefPtr<Cairo::Context> cr_ant = Cairo::Context::create(img_ant); >X cr_ant->save(); >X cr_ant->set_source (m_fft_surface_ptr, 0, 0); >X cr_ant->paint(); >X cr_ant->restore(); >X- >X- //Clear current context >X+ >X+ //Clear current context >X cr->save(); >X cr->set_operator(Cairo::OPERATOR_CLEAR); >X cr->paint(); >X cr->restore(); >X- >X+ >X if(m_bIsSpectrogram) >X { >X //Draw the FFT spectrogram >X@@ -1765,29 +1765,29 @@ void PlotEQCurve::redraw_fft_widget() >X cr->rectangle(0, SPECTROGRAM_LINE_THICKNESS, m_fft_surface_ptr->get_width(), m_fft_surface_ptr->get_height() - SPECTROGRAM_LINE_THICKNESS); >X cr->fill(); >X cr->restore(); >X- >X- cr->save(); >X+ >X+ cr->save(); >X cr->translate(freq2Pixels(MIN_FREQ), 0); >X cr->scale(freq2Pixels(MAX_FREQ) - freq2Pixels(MIN_FREQ), m_fft_surface_ptr->get_height()); >X cr->rectangle(0, 0, 1.0, SPECTROGRAM_LINE_THICKNESS/( m_fft_surface_ptr->get_height())); >X cr->set_source(fft_gradient_ptr); >X cr->fill(); >X cr->restore(); >X- } >X+ } >X else >X { >X- >X+ >X //Draw the FFT plot Curve >X- cr->save(); >X+ cr->save(); >X cr->translate(freq2Pixels(MIN_FREQ), 0); >X cr->scale(freq2Pixels(MAX_FREQ) - freq2Pixels(MIN_FREQ), m_fft_surface_ptr->get_height()); >X- >X+ >X cr->move_to(0.0, 1.0); >X- >X- //Curve smooth version >X+ >X+ //Curve smooth version >X double Ax, Ay, Bx, By; >X for(int i = 1; i<binCount; i++) >X- { >X+ { >X if(i == 1) >X { >X //Limit left A = Pk-1 >X@@ -1796,11 +1796,11 @@ void PlotEQCurve::redraw_fft_widget() >X } >X else >X { >X- //Calc ctl point A >X+ //Calc ctl point A >X Ax = binX[i - 1] + SPLINE_TENSION * ( binX[i] - binX[i - 2] ); >X- Ay = binY[i - 1] + SPLINE_TENSION * ( binY[i] - binY[i - 2] ); >X+ Ay = binY[i - 1] + SPLINE_TENSION * ( binY[i] - binY[i - 2] ); >X } >X- >X+ >X if(i == (binCount - 1)) >X { >X //Limit rigth A = Pk >X@@ -1811,19 +1811,19 @@ void PlotEQCurve::redraw_fft_widget() >X { >X //Calc ctl point A >X Bx = binX[i] - SPLINE_TENSION * ( binX[i + 1] - binX[i - 1] ); >X- By = binY[i] - SPLINE_TENSION * ( binY[i + 1] - binY[i - 1] ); >X+ By = binY[i] - SPLINE_TENSION * ( binY[i + 1] - binY[i - 1] ); >X } >X cr->curve_to(Ax, Ay, Bx, By, binX[i], binY[i]); >X- } >X+ } >X >X cr->line_to(1.0, 1.0); >X- cr->line_to(0.0, 1.0); >X+ cr->line_to(0.0, 1.0); >X cr->set_source_rgba(0.21, 0.15, 0.78, 0.7); >X cr->fill_preserve(); >X cr->set_source(fft_gradient_ptr); >X- cr->fill(); >X+ cr->fill(); >X cr->restore(); >X- } >X+ } >X } >X >X void PlotEQCurve::setStereoState(int band, PlotEQCurve::MSState state) >X@@ -1834,4 +1834,3 @@ void PlotEQCurve::setStereoState(int ban >X cueBandRedraws(band); >X } >X } >X- >bdffb4a1bb299c4d83a26b30890793e9 >echo x - eq10q/files/patch-gui_widgets_bandctl.cpp >sed 's/^X//' >eq10q/files/patch-gui_widgets_bandctl.cpp << '12c7843432718e5fe6d55c4ff9ba7764' >X--- gui/widgets/bandctl.cpp.orig 2017-01-26 12:08:40 UTC >X+++ gui/widgets/bandctl.cpp >X@@ -59,11 +59,11 @@ m_bIsStereoPlugin(isStereo) >X m_GainBtn.units = "dB"; >X m_FreqBtn.units = "Hz"; >X m_QBtn.units = "Q"; >X- >X+ >X m_FilterType = int2FilterType(0.0f); >X m_BandTitle = Glib::ustring::compose("Band %1", m_iBandNum + 1); >X m_Color = Gdk::Color(bandColorLUT[m_iBandNum]); >X- >X+ >X //Load ComboBox images >X m_img_ptr_lpf = Gdk::Pixbuf::create_from_file(m_budlepath + "/" + std::string(LPF_ICON_FILE)); >X m_img_ptr_hpf = Gdk::Pixbuf::create_from_file(m_budlepath + "/" + std::string(HPF_ICON_FILE)); >X@@ -71,39 +71,39 @@ m_bIsStereoPlugin(isStereo) >X m_img_ptr_hishelf = Gdk::Pixbuf::create_from_file(m_budlepath + "/" + std::string(HISHEL_ICON_FILE)); >X m_img_ptr_peak = Gdk::Pixbuf::create_from_file(m_budlepath + "/" + std::string(PEAK_ICON_FILE)); >X m_img_ptr_notch = Gdk::Pixbuf::create_from_file(m_budlepath + "/" + std::string(NOTCH_ICON_FILE)); >X- >X+ >X m_FilterType = PEAK; >X loadTypeImg(); >X- set_size_request(46 + m_image_surface_ptr->get_width(), ( m_bIsStereoPlugin ? 80 : 65) + m_image_surface_ptr->get_height()); >X- >X+ set_size_request(46 + m_image_surface_ptr->get_width(), ( m_bIsStereoPlugin ? 80 : 65) + m_image_surface_ptr->get_height()); >X+ >X //Fill Filter Type popup menu >X m_TypePopUp = new Gtk::Menu(); >X- >X+ >X icon_lpf = new Gtk::Image(m_img_ptr_lpf); >X icon_hpf = new Gtk::Image(m_img_ptr_hpf); >X icon_loShel = new Gtk::Image(m_img_ptr_loshelf); >X icon_hiShel = new Gtk::Image(m_img_ptr_hishelf); >X icon_peak = new Gtk::Image(m_img_ptr_peak); >X icon_notch = new Gtk::Image(m_img_ptr_notch); >X- >X+ >X itm_lpf = new Gtk::ImageMenuItem(*icon_lpf,"Low pass"); >X- itm_hpf = new Gtk::ImageMenuItem(*icon_hpf,"High pass"); >X- itm_loShel = new Gtk::ImageMenuItem(*icon_loShel,"Low Shelf"); >X- itm_hiShel = new Gtk::ImageMenuItem(*icon_hiShel,"High Shelf"); >X- itm_peak = new Gtk::ImageMenuItem(*icon_peak,"Peak"); >X- itm_notch = new Gtk::ImageMenuItem(*icon_notch,"Notch"); >X- >X+ itm_hpf = new Gtk::ImageMenuItem(*icon_hpf,"High pass"); >X+ itm_loShel = new Gtk::ImageMenuItem(*icon_loShel,"Low Shelf"); >X+ itm_hiShel = new Gtk::ImageMenuItem(*icon_hiShel,"High Shelf"); >X+ itm_peak = new Gtk::ImageMenuItem(*icon_peak,"Peak"); >X+ itm_notch = new Gtk::ImageMenuItem(*icon_notch,"Notch"); >X+ >X //Allow this widget to get keyboard focus >X set_flags(Gtk::CAN_FOCUS); >X set_can_focus(true); >X- >X+ >X itm_lpf->set_always_show_image(true); >X itm_hpf->set_always_show_image(true); >X itm_loShel->set_always_show_image(true); >X itm_hiShel->set_always_show_image(true); >X itm_peak->set_always_show_image(true); >X itm_notch->set_always_show_image(true); >X- >X+ >X itm_lpf->signal_activate().connect(sigc::mem_fun(*this, &BandCtl::on_menu_lpf)); >X itm_hpf->signal_activate().connect(sigc::mem_fun(*this, &BandCtl::on_menu_hpf)); >X itm_loShel->signal_activate().connect(sigc::mem_fun(*this, &BandCtl::on_menu_loshelf)); >X@@ -111,8 +111,8 @@ m_bIsStereoPlugin(isStereo) >X itm_peak->signal_activate().connect(sigc::mem_fun(*this, &BandCtl::on_menu_peak)); >X itm_notch->signal_activate().connect(sigc::mem_fun(*this, &BandCtl::on_menu_notch)); >X m_TypePopUp->signal_hide().connect(sigc::mem_fun(*this, &BandCtl::on_menu_hide)); >X- signal_focus_out_event().connect(sigc::mem_fun(*this, &BandCtl::on_focus_out_event)); >X- >X+ signal_focus_out_event().connect(sigc::mem_fun(*this, &BandCtl::on_focus_out_event)); >X+ >X m_TypePopUp->append(*itm_lpf); >X m_TypePopUp->append(*itm_hpf); >X m_TypePopUp->append(*itm_loShel); >X@@ -120,13 +120,13 @@ m_bIsStereoPlugin(isStereo) >X m_TypePopUp->append(*itm_peak); >X m_TypePopUp->append(*itm_notch); >X m_TypePopUp->set_size_request(110 ,-1); >X- >X+ >X //Setup MidSide button >X m_MidSideBtn.MidSideMode = false; >X m_MidSideBtn.State = DUAL; >X- >X+ >X show(); >X- >X+ >X //Connect mouse signals >X add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::SCROLL_MASK | Gdk::LEAVE_NOTIFY_MASK | Gdk::KEY_PRESS_MASK); >X signal_button_press_event().connect(sigc::mem_fun(*this, &BandCtl::on_button_press_event),true); >X@@ -134,26 +134,26 @@ m_bIsStereoPlugin(isStereo) >X signal_scroll_event().connect(sigc::mem_fun(*this, &BandCtl::on_scrollwheel_event),true); >X signal_motion_notify_event().connect(sigc::mem_fun(*this, &BandCtl::on_mouse_motion_event),true); >X signal_leave_notify_event().connect(sigc::mem_fun(*this, &BandCtl::on_mouse_leave_widget),true); >X- >X+ >X signal_key_press_event().connect(sigc::mem_fun(*this, &BandCtl::on_key_press_event)); //TODO >X- >X- Glib::RefPtr<Gtk::Style> sty = Gtk::Style::create(); >X+ >X+ Glib::RefPtr<Gtk::Style> sty = Gtk::Style::create(); >X sty->set_font(Pango::FontDescription("sans 11px")); >X sty->set_bg(Gtk::STATE_NORMAL, Gdk::Color("#3C3940")); >X sty->set_bg(Gtk::STATE_PRELIGHT, Gdk::Color("#408FC0")); >X sty->set_fg(Gtk::STATE_NORMAL, Gdk::Color("#CDCECE")); >X sty->set_fg(Gtk::STATE_PRELIGHT, Gdk::Color("#161B17")); >X- >X- >X+ >X+ >X m_TypePopUp->set_style(sty); >X- >X+ >X itm_lpf->set_style(sty); >X itm_hpf->set_style(sty); >X itm_loShel->set_style(sty); >X itm_hiShel->set_style(sty); >X itm_peak->set_style(sty); >X itm_notch->set_style(sty); >X- >X+ >X itm_lpf->get_child()->set_style(sty); >X itm_hpf->get_child()->set_style(sty); >X itm_loShel->get_child()->set_style(sty); >X@@ -164,15 +164,15 @@ m_bIsStereoPlugin(isStereo) >X >X BandCtl::~BandCtl() >X { >X- delete m_TypePopUp; >X- >X+ delete m_TypePopUp; >X+ >X delete icon_lpf; >X delete icon_hpf; >X delete icon_loShel; >X delete icon_hiShel; >X delete icon_peak; >X delete icon_notch; >X- >X+ >X delete itm_lpf; >X delete itm_hpf; >X delete itm_loShel; >X@@ -191,7 +191,7 @@ void BandCtl::glowBand(bool glow) >X void BandCtl::loadTypeImg() >X { >X Glib::RefPtr<Gdk::Pixbuf> img_ptr; >X- >X+ >X switch(m_FilterType) >X { >X case HPF_ORDER_1: >X@@ -199,76 +199,76 @@ void BandCtl::loadTypeImg() >X m_HpfLpf_slope = 20; >X m_GainBtn.units = "dB/dec"; >X break; >X- >X+ >X case HPF_ORDER_2: >X img_ptr = m_img_ptr_hpf; >X m_HpfLpf_slope = 40; >X m_GainBtn.units = "dB/dec"; >X break; >X- >X+ >X case HPF_ORDER_3: >X img_ptr = m_img_ptr_hpf; >X m_HpfLpf_slope = 60; >X m_GainBtn.units = "dB/dec"; >X break; >X- >X+ >X case HPF_ORDER_4: >X img_ptr = m_img_ptr_hpf; >X m_HpfLpf_slope = 80; >X m_GainBtn.units = "dB/dec"; >X break; >X- >X+ >X case LPF_ORDER_1: >X img_ptr = m_img_ptr_lpf; >X m_HpfLpf_slope = 20; >X m_GainBtn.units = "dB/dec"; >X break; >X- >X+ >X case LPF_ORDER_2: >X img_ptr = m_img_ptr_lpf; >X m_HpfLpf_slope = 40; >X m_GainBtn.units = "dB/dec"; >X break; >X- >X+ >X case LPF_ORDER_3: >X img_ptr = m_img_ptr_lpf; >X m_HpfLpf_slope = 60; >X m_GainBtn.units = "dB/dec"; >X break; >X- >X+ >X case LPF_ORDER_4: >X img_ptr = m_img_ptr_lpf; >X m_HpfLpf_slope = 80; >X m_GainBtn.units = "dB/dec"; >X break; >X- >X+ >X case HIGH_SHELF: >X img_ptr = m_img_ptr_hishelf; >X m_HpfLpf_slope = 0; >X m_GainBtn.units = "dB"; >X break; >X- >X+ >X case LOW_SHELF: >X img_ptr = m_img_ptr_loshelf; >X m_HpfLpf_slope = 0; >X m_GainBtn.units = "dB"; >X break; >X- >X+ >X case PEAK: >X img_ptr = m_img_ptr_peak; >X m_HpfLpf_slope = 0; >X m_GainBtn.units = "dB"; >X break; >X- >X+ >X case NOTCH: >X img_ptr = m_img_ptr_notch; >X m_HpfLpf_slope = 0; >X m_GainBtn.units = "dB"; >X break; >X- >X+ >X case NOT_SET: >X return; >X- break; >X+ break; >X } >X >X //Detect Format >X@@ -277,13 +277,13 @@ void BandCtl::loadTypeImg() >X { >X format = Cairo::FORMAT_ARGB32; >X } >X- >X+ >X // Create a new ImageSurface >X m_image_surface_ptr = Cairo::ImageSurface::create (format, img_ptr->get_width(), img_ptr->get_height()); >X- >X+ >X // Create the new Context for the ImageSurface >X- m_image_context_ptr = Cairo::Context::create (m_image_surface_ptr); >X- >X+ m_image_context_ptr = Cairo::Context::create (m_image_surface_ptr); >X+ >X // Draw the image on the new Context >X Gdk::Cairo::set_source_pixbuf (m_image_context_ptr, img_ptr, 0.0, 0.0); >X m_image_context_ptr->paint(); >X@@ -369,8 +369,8 @@ void BandCtl::on_menu_lpf() >X m_bandChangedSignal.emit(m_iBandNum, GAIN_TYPE, m_GainBtn.value); >X m_bandChangedSignal.emit(m_iBandNum, FREQ_TYPE, m_FreqBtn.value); >X m_QBtn.value = HPF_LPF_Q_DEFAULT; >X- m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X- redraw(); >X+ m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X+ redraw(); >X } >X >X void BandCtl::on_menu_hpf() >X@@ -381,7 +381,7 @@ void BandCtl::on_menu_hpf() >X m_bandChangedSignal.emit(m_iBandNum, GAIN_TYPE, m_GainBtn.value); >X m_bandChangedSignal.emit(m_iBandNum, FREQ_TYPE, m_FreqBtn.value); >X m_QBtn.value = HPF_LPF_Q_DEFAULT; >X- m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X+ m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X redraw(); >X } >X >X@@ -393,8 +393,8 @@ void BandCtl::on_menu_loshelf() >X m_bandChangedSignal.emit(m_iBandNum, GAIN_TYPE, m_GainBtn.value); >X m_bandChangedSignal.emit(m_iBandNum, FREQ_TYPE, m_FreqBtn.value); >X m_QBtn.value = HIGH_LOW_SHELF_Q_DEFAULT; >X- m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X- redraw(); >X+ m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X+ redraw(); >X } >X >X void BandCtl::on_menu_hishelf() >X@@ -405,8 +405,8 @@ void BandCtl::on_menu_hishelf() >X m_bandChangedSignal.emit(m_iBandNum, GAIN_TYPE, m_GainBtn.value); >X m_bandChangedSignal.emit(m_iBandNum, FREQ_TYPE, m_FreqBtn.value); >X m_QBtn.value = HIGH_LOW_SHELF_Q_DEFAULT; >X- m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X- redraw(); >X+ m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X+ redraw(); >X } >X >X void BandCtl::on_menu_peak() >X@@ -417,8 +417,8 @@ void BandCtl::on_menu_peak() >X m_bandChangedSignal.emit(m_iBandNum, GAIN_TYPE, m_GainBtn.value); >X m_bandChangedSignal.emit(m_iBandNum, FREQ_TYPE, m_FreqBtn.value); >X m_QBtn.value = PEAK_Q_DEFAULT; >X- m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X- redraw(); >X+ m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X+ redraw(); >X } >X >X void BandCtl::on_menu_notch() >X@@ -429,8 +429,8 @@ void BandCtl::on_menu_notch() >X m_bandChangedSignal.emit(m_iBandNum, GAIN_TYPE, m_GainBtn.value); >X m_bandChangedSignal.emit(m_iBandNum, FREQ_TYPE, m_FreqBtn.value); >X m_QBtn.value = NOTCH_Q_DEFAULT; >X- m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X- redraw(); >X+ m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X+ redraw(); >X } >X >X void BandCtl::on_menu_hide() >X@@ -442,10 +442,10 @@ void BandCtl::on_menu_hide() >X >X //TODO: En ardour4 event de tecla mai arriba >X bool BandCtl::on_button_press_event(GdkEventButton* event) >X-{ >X+{ >X //Notify band over >X m_bandSelectedSignal.emit(m_iBandNum); >X- >X+ >X //Check if is a double click or simple >X if(event->button == 1) >X { >X@@ -476,12 +476,12 @@ bool BandCtl::on_button_press_event(GdkE >X grab_focus(); >X //keyPressEvent = signal_key_press_event().connect(sigc::mem_fun(*this, &BandCtl::on_key_press_event)); //TODO >X } >X- >X+ >X } >X else >X { >X m_EnableBtn.pressed = (event->x > m_EnableBtn.x0 && event->x < m_EnableBtn.x1 && event->y > m_EnableBtn.y0 && event->y < m_EnableBtn.y1); >X- >X+ >X //Simple click on the 1st button >X m_TypeBtn.pressed = m_bBandIsEnabled & (event->x > m_TypeBtn.x0 && event->x < m_TypeBtn.x1 && event->y > m_TypeBtn.y0 && event->y < m_TypeBtn.y1); >X if(m_TypeBtn.pressed) >X@@ -489,25 +489,25 @@ bool BandCtl::on_button_press_event(GdkE >X m_TypePopUp->popup(event->button, event->time); >X m_TypePopUp->show_all(); >X } >X- >X+ >X m_iAntValueX = event->x; >X m_iAntValueY = event->y; >X m_GainBtn.pressed = m_bBandIsEnabled & (event->x > m_GainBtn.x0 && event->x < m_GainBtn.x1 && event->y > m_GainBtn.y0 && event->y < m_GainBtn.y1); >X m_FreqBtn.pressed = m_bBandIsEnabled & (event->x > m_FreqBtn.x0 && event->x < m_FreqBtn.x1 && event->y > m_FreqBtn.y0 && event->y < m_FreqBtn.y1); >X m_QBtn.pressed = m_bBandIsEnabled & (event->x > m_QBtn.x0 && event->x < m_QBtn.x1 && event->y > m_QBtn.y0 && event->y < m_QBtn.y1); >X- >X+ >X if(m_bIsStereoPlugin) >X { >X m_MidSideBtn.ML_pressed = m_bBandIsEnabled & (event->x > m_MidSideBtn.Mx && event->x < m_MidSideBtn.Dx && event->y > m_MidSideBtn.y0 && event->y < m_MidSideBtn.y1); >X m_MidSideBtn.Dual_pressed = m_bBandIsEnabled & (event->x > m_MidSideBtn.Dx && event->x < m_MidSideBtn.Sx && event->y > m_MidSideBtn.y0 && event->y < m_MidSideBtn.y1); >X m_MidSideBtn.SR_pressed = m_bBandIsEnabled & (event->x > m_MidSideBtn.Sx && event->x < m_MidSideBtn.x1 && event->y > m_MidSideBtn.y0 && event->y < m_MidSideBtn.y1); >X- redraw_MidSide_widget(); >X+ redraw_MidSide_widget(); >X } >X- >X+ >X //Disable Q for LPF1 and LPF2 >X m_QBtn.pressed &= !(m_FilterType == LPF_ORDER_1); >X m_QBtn.pressed &= !(m_FilterType == HPF_ORDER_1); >X- >X+ >X //Disable Gain for NOTCH >X m_GainBtn.pressed &= !(m_FilterType == NOTCH); >X } >X@@ -517,14 +517,14 @@ bool BandCtl::on_button_press_event(GdkE >X } >X >X bool BandCtl::on_button_release_event(GdkEventButton* event) >X-{ >X+{ >X //Check for enable button >X if(m_EnableBtn.pressed && (event->x > m_EnableBtn.x0 && event->x < m_EnableBtn.x1 && event->y > m_EnableBtn.y0 && event->y < m_EnableBtn.y1)) >X { >X m_bBandIsEnabled = !m_bBandIsEnabled; >X m_bandChangedSignal.emit(m_iBandNum, ONOFF_TYPE, m_bBandIsEnabled); >X } >X- >X+ >X //Check MidSide buttons >X if(m_bIsStereoPlugin && m_MidSideBtn.ML_pressed && (event->x > m_MidSideBtn.Mx && event->x < m_MidSideBtn.Dx && event->y > m_MidSideBtn.y0 && event->y < m_MidSideBtn.y1)) >X { >X@@ -541,25 +541,25 @@ bool BandCtl::on_button_release_event(Gd >X m_MidSideBtn.State = SR; >X m_midsideChangedSignal.emit(m_iBandNum); >X } >X- >X+ >X m_EnableBtn.pressed = false; >X m_TypeBtn.pressed = false; >X m_GainBtn.pressed = false; >X m_FreqBtn.pressed = false; >X m_QBtn.pressed = false; >X- >X+ >X if(m_bIsStereoPlugin) >X { >X m_MidSideBtn.Dual_pressed = false; >X m_MidSideBtn.ML_pressed = false; >X m_MidSideBtn.SR_pressed = false; >X- redraw_MidSide_widget(); >X+ redraw_MidSide_widget(); >X } >X //m_iAntValueX = m_iAntValueY = 0; >X- >X+ >X //Inform bode plot >X m_bandUnSelectedSignal.emit(); >X- >X+ >X redraw(); >X return true; >X } >X@@ -586,7 +586,7 @@ bool BandCtl::on_mouse_motion_event(GdkE >X m_bandChangedSignal.emit(m_iBandNum, GAIN_TYPE, m_GainBtn.value); >X } >X } >X- >X+ >X else if(m_FreqBtn.pressed) >X { >X m_FreqBtn.value += (m_FreqBtn.value/7.0f)*((float)(event->x-m_iAntValueX)/ACCELERATION); >X@@ -594,7 +594,7 @@ bool BandCtl::on_mouse_motion_event(GdkE >X m_FreqBtn.value = m_FreqBtn.value < FREQ_MIN ? FREQ_MIN : m_FreqBtn.value; >X m_bandChangedSignal.emit(m_iBandNum, FREQ_TYPE, m_FreqBtn.value); >X } >X- >X+ >X else if(m_QBtn.pressed) >X { >X m_QBtn.value += (float)(event->x - m_iAntValueX)/(-ACCELERATION * 5.0); >X@@ -602,7 +602,7 @@ bool BandCtl::on_mouse_motion_event(GdkE >X m_QBtn.value = m_QBtn.value < PEAK_Q_MIN ? PEAK_Q_MIN : m_QBtn.value; >X m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X } >X- >X+ >X else >X { >X //Check if mouse over some button >X@@ -611,15 +611,15 @@ bool BandCtl::on_mouse_motion_event(GdkE >X m_GainBtn.focus = m_bBandIsEnabled & (event->x > m_GainBtn.x0 && event->x < m_GainBtn.x1 && event->y > m_GainBtn.y0 && event->y < m_GainBtn.y1); >X m_FreqBtn.focus = m_bBandIsEnabled & (event->x > m_FreqBtn.x0 && event->x < m_FreqBtn.x1 && event->y > m_FreqBtn.y0 && event->y < m_FreqBtn.y1); >X m_QBtn.focus = m_bBandIsEnabled & (event->x > m_QBtn.x0 && event->x < m_QBtn.x1 && event->y > m_QBtn.y0 && event->y < m_QBtn.y1); >X- >X+ >X if(m_bIsStereoPlugin) >X { >X m_MidSideBtn.Dual_focus = m_bBandIsEnabled & (event->x > m_MidSideBtn.Dx && event->x < m_MidSideBtn.Sx && event->y > m_MidSideBtn.y0 && event->y < m_MidSideBtn.y1); >X m_MidSideBtn.ML_focus = m_bBandIsEnabled & (event->x > m_MidSideBtn.Mx && event->x < m_MidSideBtn.Dx && event->y > m_MidSideBtn.y0 && event->y < m_MidSideBtn.y1); >X m_MidSideBtn.SR_focus = m_bBandIsEnabled & (event->x > m_MidSideBtn.Sx && event->x < m_MidSideBtn.x1 && event->y > m_MidSideBtn.y0 && event->y < m_MidSideBtn.y1); >X- redraw_MidSide_widget(); >X+ redraw_MidSide_widget(); >X } >X- >X+ >X //Disable Q for LPF1 and LPF2 >X m_QBtn.focus &= !(m_FilterType == LPF_ORDER_1); >X m_QBtn.focus &= !(m_FilterType == HPF_ORDER_1); >X@@ -627,11 +627,11 @@ bool BandCtl::on_mouse_motion_event(GdkE >X //Disable Gain for NOTCH >X m_GainBtn.focus &= !(m_FilterType == NOTCH); >X } >X- >X+ >X //Update ant values >X m_iAntValueX = event->x; >X m_iAntValueY = event->y; >X- >X+ >X //Notify band over >X if(m_GainBtn.focus || m_FreqBtn.focus || m_QBtn.focus || m_TypeBtn.focus || m_EnableBtn.focus || m_MidSideBtn.Dual_focus || m_MidSideBtn.ML_focus || m_MidSideBtn.SR_focus) >X { >X@@ -644,19 +644,19 @@ bool BandCtl::on_mouse_motion_event(GdkE >X bool BandCtl::on_scrollwheel_event(GdkEventScroll* event) >X { >X double increment = 0.0; >X- >X- if (event->direction == GDK_SCROLL_UP) >X- { >X+ >X+ if (event->direction == GDK_SCROLL_UP) >X+ { >X // up code >X increment = 1.0; >X >X- } >X- else if (event->direction == GDK_SCROLL_DOWN) >X- { >X- // down code >X+ } >X+ else if (event->direction == GDK_SCROLL_DOWN) >X+ { >X+ // down code >X increment = -1.0; >X } >X- >X+ >X if ( m_bBandIsEnabled & (event->x > m_GainBtn.x0 && event->x < m_GainBtn.x1 && event->y > m_GainBtn.y0 && event->y < m_GainBtn.y1)) >X { >X if(m_HpfLpf_slope) >X@@ -694,16 +694,16 @@ bool BandCtl::on_scrollwheel_event(GdkEv >X m_QBtn.value = m_QBtn.value < PEAK_Q_MIN ? PEAK_Q_MIN : m_QBtn.value; >X m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X } >X- >X+ >X redraw(); >X return true; >X } >X >X bool BandCtl::on_key_press_event(GdkEventKey* event) >X-{ >X- >X+{ >X+ >X std::cout<<"BandCtl::on_key_press_event()"<<" event = "<<event->keyval<<std::endl; //TODO reomve >X- >X+ >X switch(event->keyval) >X { >X case GDK_KEY_Return: >X@@ -714,7 +714,7 @@ bool BandCtl::on_key_press_event(GdkEven >X if(parseBtnString(&m_GainBtn)) >X { >X m_bandChangedSignal.emit(m_iBandNum, GAIN_TYPE, m_GainBtn.value); >X- } >X+ } >X } >X else if(m_FreqBtn.text) >X { >X@@ -731,14 +731,14 @@ bool BandCtl::on_key_press_event(GdkEven >X } >X } >X break; >X- >X+ >X case GDK_KEY_Escape: >X m_GainBtn.text = false; >X m_FreqBtn.text = false; >X m_QBtn.text = false; >X //keyPressEvent.disconnect(); //TODO >X break; >X- >X+ >X case GDK_KEY_BackSpace: >X if(m_GainBtn.text) >X { >X@@ -768,7 +768,7 @@ bool BandCtl::on_key_press_event(GdkEven >X } >X } >X break; >X- >X+ >X case GDK_KEY_KP_0: case GDK_KEY_0: >X case GDK_KEY_KP_1: case GDK_KEY_1: >X case GDK_KEY_KP_2: case GDK_KEY_2: >X@@ -779,7 +779,7 @@ bool BandCtl::on_key_press_event(GdkEven >X case GDK_KEY_KP_7: case GDK_KEY_7: >X case GDK_KEY_KP_8: case GDK_KEY_8: >X case GDK_KEY_KP_9: case GDK_KEY_9: >X- case GDK_KEY_KP_Subtract: case GDK_KEY_minus: >X+ case GDK_KEY_KP_Subtract: case GDK_KEY_minus: >X if(m_GainBtn.text) >X { >X m_GainBtn.ss << event->string; >X@@ -793,7 +793,7 @@ bool BandCtl::on_key_press_event(GdkEven >X m_QBtn.ss << event->string; >X } >X break; >X- >X+ >X case GDK_KEY_K: case GDK_KEY_k: >X if(m_GainBtn.text) >X { >X@@ -808,7 +808,7 @@ bool BandCtl::on_key_press_event(GdkEven >X m_QBtn.ss << "k"; >X } >X break; >X- >X+ >X case GDK_KEY_comma: case GDK_KEY_decimalpoint: case GDK_KEY_KP_Decimal: case GDK_KEY_period: >X if(m_GainBtn.text) >X { >X@@ -824,7 +824,7 @@ bool BandCtl::on_key_press_event(GdkEven >X } >X break; >X } >X- >X+ >X redraw(); >X return true; >X } >X@@ -891,7 +891,7 @@ void BandCtl::setFilterTypeLPFHPFAcordSl >X m_bandChangedSignal.emit(m_iBandNum, FILTER_TYPE, getFilterType()); >X m_bandChangedSignal.emit(m_iBandNum, GAIN_TYPE, m_GainBtn.value); >X m_bandChangedSignal.emit(m_iBandNum, FREQ_TYPE, m_FreqBtn.value); >X- m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X+ m_bandChangedSignal.emit(m_iBandNum, Q_TYPE, m_QBtn.value); >X } >X >X bool BandCtl::parseBtnString(BandCtl::Button* btn) >X@@ -899,10 +899,10 @@ bool BandCtl::parseBtnString(BandCtl::Bu >X std::string str = btn->ss.str(); >X std::string str_k = ""; >X std::string str_d = ""; >X- >X+ >X unsigned int pos_d = str.find('.'); >X unsigned int pos_k = str.find('k'); >X- >X+ >X if(pos_k > pos_d && pos_k < str.length() && pos_d < str.length() ) >X { >X //Found both, k and decimal but in inverse order, rise an error >X@@ -910,9 +910,9 @@ bool BandCtl::parseBtnString(BandCtl::Bu >X //keyPressEvent.disconnect(); //TODO >X return false; >X } >X- >X+ >X if(pos_d >= str.length()) >X- { >X+ { >X if(pos_k >= str.length()) >X { >X //Nor k neither d found so, use the whole string >X@@ -941,15 +941,15 @@ bool BandCtl::parseBtnString(BandCtl::Bu >X str = str.substr(pos_k + 1, pos_d - pos_k - 1); >X } >X } >X- >X+ >X double val_k = 0.0; >X double val_d = 0.0; >X double val = atof(str.c_str()); >X- >X+ >X if(str_k.length() > 0) >X { >X val_k = atof(str_k.c_str()) * 1e3; >X- val *= pow10(3.0 - str.length()); >X+ val *= pow(10, 3.0 - str.length()); >X if(str.length() > 3) >X { >X //throw an error, imposible to match str > 3 with k >X@@ -960,11 +960,11 @@ bool BandCtl::parseBtnString(BandCtl::Bu >X } >X if(str_d.length() > 0) >X { >X- val_d = atof(str_d.c_str())/ pow10((double)str_d.length()); >X+ val_d = atof(str_d.c_str())/ pow(10, (double)str_d.length()); >X } >X- >X+ >X btn->value = val + val_k + val_d; >X- >X+ >X //clip value to the widget limits! >X btn->value = btn->value > btn->max ? btn->max : btn->value; >X btn->value = btn->value < btn->min ? btn->min : btn->value; >X@@ -987,7 +987,7 @@ bool BandCtl::on_mouse_leave_widget(GdkE >X m_MidSideBtn.Dual_focus = false; >X m_MidSideBtn.ML_focus = false; >X m_MidSideBtn.SR_focus = false; >X- redraw_MidSide_widget(); >X+ redraw_MidSide_widget(); >X } >X redraw(); >X m_bandUnSelectedSignal.emit(); >X@@ -1005,7 +1005,7 @@ void BandCtl::redraw() >X } >X >X bool BandCtl::on_expose_event(GdkEventExpose* event) >X-{ >X+{ >X Glib::RefPtr<Gdk::Window> window = get_window(); >X if(window) >X { >X@@ -1014,11 +1014,11 @@ bool BandCtl::on_expose_event(GdkEventEx >X height = allocation.get_height(); >X >X if(!m_midSide_surface_ptr && m_bIsStereoPlugin) >X- { >X+ { >X //The Mid Side button surface >X m_midSide_surface_ptr = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, width, (height - 4.0*OUTER_BORDER)/4.0); >X } >X- >X+ >X if(!m_bBtnInitialized) >X { >X m_EnableBtn.focus = false; >X@@ -1028,7 +1028,7 @@ bool BandCtl::on_expose_event(GdkEventEx >X m_EnableBtn.y0 = OUTER_BORDER + 2; >X m_EnableBtn.y1 = OUTER_BORDER + m_image_surface_ptr->get_height() - 1; >X m_EnableBtn.text = false; >X- >X+ >X m_TypeBtn.focus = false; >X m_TypeBtn.pressed = false; >X m_TypeBtn.x0 = width - OUTER_BORDER - m_image_surface_ptr->get_width(); >X@@ -1036,7 +1036,7 @@ bool BandCtl::on_expose_event(GdkEventEx >X m_TypeBtn.y0 = OUTER_BORDER + 1; >X m_TypeBtn.y1 = OUTER_BORDER + m_image_surface_ptr->get_height(); >X m_TypeBtn.text = false; >X- >X+ >X m_GainBtn.focus = false; >X m_GainBtn.pressed = false; >X m_GainBtn.x0 = OUTER_BORDER + 1; >X@@ -1046,7 +1046,7 @@ bool BandCtl::on_expose_event(GdkEventEx >X m_GainBtn.text = false; >X m_GainBtn.min = GAIN_MIN; >X m_GainBtn.max = GAIN_MAX; >X- >X+ >X m_FreqBtn.focus = false; >X m_FreqBtn.pressed = false; >X m_FreqBtn.x0 = OUTER_BORDER + 1; >X@@ -1056,7 +1056,7 @@ bool BandCtl::on_expose_event(GdkEventEx >X m_FreqBtn.text = false; >X m_FreqBtn.min = FREQ_MIN; >X m_FreqBtn.max = FREQ_MAX; >X- >X+ >X m_QBtn.focus = false; >X m_QBtn.pressed = false; >X m_QBtn.x0 = OUTER_BORDER + 1; >X@@ -1066,7 +1066,7 @@ bool BandCtl::on_expose_event(GdkEventEx >X m_QBtn.text = false; >X m_QBtn.min = PEAK_Q_MIN; >X m_QBtn.max = PEAK_Q_MAX; >X- >X+ >X if(m_bIsStereoPlugin) >X { >X m_MidSideBtn.Dual_focus = false; >X@@ -1082,28 +1082,28 @@ bool BandCtl::on_expose_event(GdkEventEx >X m_MidSideBtn.Mx = m_MidSideBtn.x0; >X m_MidSideBtn.Dx = (m_MidSideBtn.x1 - m_MidSideBtn.x0)/3.0 + m_MidSideBtn.Mx; >X m_MidSideBtn.Sx = (m_MidSideBtn.x1 - m_MidSideBtn.x0)/3.0 + m_MidSideBtn.Dx; >X- redraw_MidSide_widget(); >X+ redraw_MidSide_widget(); >X } >X- >X+ >X m_bBtnInitialized = true; >X } >X- >X+ >X Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context(); >X int radius = (int)round(((double)height) / 20.0); >X- double degrees = M_PI / 180.0; >X- >X+ double degrees = M_PI / 180.0; >X+ >X >X //Paint backgroud >X cr->save(); >X cr->set_source_rgb(BACKGROUND_R, BACKGROUND_G, BACKGROUND_B); >X cr->paint(); //Fill all with background color >X cr->restore(); >X- >X+ >X //Draw background box >X- cr->save(); >X+ cr->save(); >X cr->begin_new_sub_path(); >X cr->arc ( OUTER_BORDER + radius, OUTER_BORDER + radius, radius, 180 * degrees, 270 * degrees); >X- cr->arc (width - OUTER_BORDER - radius, OUTER_BORDER + radius, radius, -90 * degrees, 0 * degrees); >X+ cr->arc (width - OUTER_BORDER - radius, OUTER_BORDER + radius, radius, -90 * degrees, 0 * degrees); >X cr->line_to(width - OUTER_BORDER, height - OUTER_BORDER); >X cr->line_to(OUTER_BORDER, height - OUTER_BORDER); >X cr->close_path(); >X@@ -1118,7 +1118,7 @@ bool BandCtl::on_expose_event(GdkEventEx >X cr->set_source_rgba(0.3,0.3,0.3,0.6); >X } >X cr->stroke_preserve(); >X- >X+ >X if(m_bGlowBand) >X { >X cr->set_line_width(2.5); >X@@ -1126,22 +1126,22 @@ bool BandCtl::on_expose_event(GdkEventEx >X cr->stroke_preserve(); >X } >X >X- Cairo::RefPtr<Cairo::LinearGradient> bkg_gradient_ptr = Cairo::LinearGradient::create(width/2, OUTER_BORDER, width/2, height - OUTER_BORDER); >X+ Cairo::RefPtr<Cairo::LinearGradient> bkg_gradient_ptr = Cairo::LinearGradient::create(width/2, OUTER_BORDER, width/2, height - OUTER_BORDER); >X if(m_bBandIsEnabled) >X { >X- bkg_gradient_ptr->add_color_stop_rgba (0.0, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.6 ); >X- bkg_gradient_ptr->add_color_stop_rgba (1.0, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.3 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.0, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.6 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (1.0, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.3 ); >X } >X else >X { >X- bkg_gradient_ptr->add_color_stop_rgba (0.0, 0.8, 0.8, 0.8, 0.4 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.0, 0.8, 0.8, 0.8, 0.4 ); >X bkg_gradient_ptr->add_color_stop_rgba (1.0, 0.8, 0.8, 0.8, 0.2 ); >X } >X- bkg_gradient_ptr->add_color_stop_rgba (0.3, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.1 ); >X- bkg_gradient_ptr->add_color_stop_rgba (0.5, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.0 ); >X- bkg_gradient_ptr->add_color_stop_rgba (0.9, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.05 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.3, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.1 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.5, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.0 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.9, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.05 ); >X >X- cr->set_source(bkg_gradient_ptr); >X+ cr->set_source(bkg_gradient_ptr); >X cr->fill(); >X cr->restore(); >X >X@@ -1150,29 +1150,29 @@ bool BandCtl::on_expose_event(GdkEventEx >X cr->translate(m_EnableBtn.x0 - 0.5, m_EnableBtn.y0 + 1.5); >X ToggleButton::drawLedBtn(cr, m_EnableBtn.focus, m_bBandIsEnabled, "On", 0, 3); >X cr->restore(); >X- >X+ >X //Draw Gan, Freq, Q Buttons >X drawBandButton(&m_GainBtn, cr); >X drawBandButton(&m_FreqBtn, cr); >X drawBandButton(&m_QBtn, cr); >X- >X+ >X //Draw mid Side surface >X if(m_midSide_surface_ptr && m_bIsStereoPlugin) >X { >X- cr->save(); >X- cr->set_source(m_midSide_surface_ptr, 0, m_MidSideBtn.y0); >X+ cr->save(); >X+ cr->set_source(m_midSide_surface_ptr, 0, m_MidSideBtn.y0); >X cr->paint(); >X cr->restore(); >X } >X- >X- //Draw ComboBox Filter Type icon >X+ >X+ //Draw ComboBox Filter Type icon >X cr->save(); >X cr->set_source (m_image_surface_ptr, m_TypeBtn.x0 - 0.5, m_TypeBtn.y0 - 0.5); >X cr->rectangle (m_TypeBtn.x0 - 0.5, m_TypeBtn.y0 - 0.5, m_image_surface_ptr->get_width(), m_image_surface_ptr->get_height()); >X cr->clip(); >X cr->paint(); >X cr->restore(); >X- >X+ >X //Draw FilterType Focus ComboBox >X if(m_bBandIsEnabled) >X { >X@@ -1183,21 +1183,21 @@ bool BandCtl::on_expose_event(GdkEventEx >X cr->arc (m_TypeBtn.x0 + radius + 0.5, m_TypeBtn.y1 - radius - 0.5, radius, 90 * degrees, 180 * degrees); >X cr->arc (m_TypeBtn.x0 + radius + 0.5, m_TypeBtn.y0 + radius + 0.5, radius, 180 * degrees, 270 * degrees); >X cr->close_path(); >X- >X+ >X cr->set_source_rgba(0.2, 0.2, 0.2, 0.9); >X cr->set_line_width(1); >X cr->stroke_preserve(); >X- >X+ >X if(m_TypeBtn.focus) >X { >X cr->set_source_rgba(0.0, 1.0, 1.0, 0.7); >X cr->set_line_width(2); >X- cr->stroke(); >X+ cr->stroke(); >X } >X cr->restore(); >X } >X >X- } >X+ } >X return true; >X } >X >X@@ -1212,18 +1212,18 @@ void BandCtl::drawBandButton(BandCtl::Bu >X { >X return; >X } >X- >X+ >X std::stringstream ss; >X- ss<<"sans "<< FONT_SIZE << "px"; >X+ ss<<"sans "<< FONT_SIZE << "px"; >X Glib::RefPtr<Pango::Layout> pangoLayout = Pango::Layout::create(cr); >X Pango::FontDescription font_desc(ss.str()); >X pangoLayout->set_font_description(font_desc); >X pangoLayout->set_alignment(Pango::ALIGN_CENTER); >X- pangoLayout->set_width(Pango::SCALE * (btn->x1 - btn->x0)); >X- >X+ pangoLayout->set_width(Pango::SCALE * (btn->x1 - btn->x0)); >X+ >X int radius = (int)round(((double)height) / 20.0); >X- double degrees = M_PI / 180.0; >X- >X+ double degrees = M_PI / 180.0; >X+ >X //Draw the button in text entry mode >X if(btn->text) >X { >X@@ -1238,13 +1238,13 @@ void BandCtl::drawBandButton(BandCtl::Bu >X cr->set_source_rgba(0.0, 1.0, 1.0, 0.5); >X cr->stroke(); >X cr->restore(); >X- >X+ >X cr->save(); >X- cr->move_to(btn->x0, btn->y0 + 0.5*(btn->y1 - btn->y0) - FONT_SIZE/2 - 2); >X+ cr->move_to(btn->x0, btn->y0 + 0.5*(btn->y1 - btn->y0) - FONT_SIZE/2 - 2); >X cr->set_source_rgb(m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p()); >X pangoLayout->set_text(btn->ss.str() + "|"); >X pangoLayout->show_in_cairo_context(cr); >X- cr->stroke(); >X+ cr->stroke(); >X cr->restore(); >X return; >X } >X@@ -1252,21 +1252,21 @@ void BandCtl::drawBandButton(BandCtl::Bu >X //Draw Btn Focus >X if(btn->focus) >X { >X- Cairo::RefPtr<Cairo::LinearGradient> bkg_gradient_ptr = Cairo::LinearGradient::create(btn->x0 + 0.5*(btn->x1 - btn->x0), btn->y0, btn->x0 + 0.5*(btn->x1 - btn->x0), btn->y1); >X+ Cairo::RefPtr<Cairo::LinearGradient> bkg_gradient_ptr = Cairo::LinearGradient::create(btn->x0 + 0.5*(btn->x1 - btn->x0), btn->y0, btn->x0 + 0.5*(btn->x1 - btn->x0), btn->y1); >X bkg_gradient_ptr->add_color_stop_rgba (0.1, m_Color.get_red_p() + 0.2, m_Color.get_green_p() + 0.2, m_Color.get_blue_p() + 0.2, 0.0 ); >X- bkg_gradient_ptr->add_color_stop_rgba (0.45, m_Color.get_red_p() + 0.2, m_Color.get_green_p() + 0.2, m_Color.get_blue_p() + 0.2, 0.3 ); >X- bkg_gradient_ptr->add_color_stop_rgba (0.55, m_Color.get_red_p() + 0.2, m_Color.get_green_p() + 0.2, m_Color.get_blue_p() + 0.2, 0.3 ); >X- bkg_gradient_ptr->add_color_stop_rgba (0.9, m_Color.get_red_p() + 0.2, m_Color.get_green_p() + 0.2, m_Color.get_blue_p() + 0.2, 0.0 ); >X- cr->save(); >X- cr->set_source(bkg_gradient_ptr); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.45, m_Color.get_red_p() + 0.2, m_Color.get_green_p() + 0.2, m_Color.get_blue_p() + 0.2, 0.3 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.55, m_Color.get_red_p() + 0.2, m_Color.get_green_p() + 0.2, m_Color.get_blue_p() + 0.2, 0.3 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.9, m_Color.get_red_p() + 0.2, m_Color.get_green_p() + 0.2, m_Color.get_blue_p() + 0.2, 0.0 ); >X+ cr->save(); >X+ cr->set_source(bkg_gradient_ptr); >X cr->rectangle(btn->x0, btn->y0, btn->x1 - btn->x0, btn->y1 - btn->y0); >X cr->fill(); >X cr->restore(); >X } >X- >X+ >X //Draw Text >X cr->save(); >X- >X+ >X ss.str(""); //Clear stringstream >X if(btn->units != "dB/dec") >X { >X@@ -1283,17 +1283,17 @@ void BandCtl::drawBandButton(BandCtl::Bu >X else slope = 80; >X ss<< std::setprecision(0)<< std::fixed << slope << " " << (btn->units); >X } >X- >X+ >X pangoLayout->set_text(ss.str()); >X- >X+ >X //Shadow >X- cr->move_to(btn->x0 + 1, btn->y0 + 0.5*(btn->y1 - btn->y0) - FONT_SIZE/2 - 2 + 1); >X+ cr->move_to(btn->x0 + 1, btn->y0 + 0.5*(btn->y1 - btn->y0) - FONT_SIZE/2 - 2 + 1); >X cr->set_source_rgba(0,0,0,0.5); >X- pangoLayout->show_in_cairo_context(cr); >X+ pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X- >X+ >X //Text >X- cr->move_to(btn->x0, btn->y0 + 0.5*(btn->y1 - btn->y0) - FONT_SIZE/2 - 2); >X+ cr->move_to(btn->x0, btn->y0 + 0.5*(btn->y1 - btn->y0) - FONT_SIZE/2 - 2); >X if(!m_bBandIsEnabled) >X { >X cr->set_source_rgba(1.0, 1.0, 1.0, 0.4); >X@@ -1308,35 +1308,35 @@ void BandCtl::drawBandButton(BandCtl::Bu >X } >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X- >X >X- >X+ >X+ >X cr->restore(); >X } >X >X void BandCtl::redraw_MidSide_widget() >X { >X if(m_midSide_surface_ptr && m_bIsStereoPlugin) >X- { >X+ { >X //Create cairo context using the buffer surface >X Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(m_midSide_surface_ptr); >X const double btnH = round(m_midSide_surface_ptr->get_height() - 6.0*OUTER_BORDER); >X- >X- //Clear current context >X+ >X+ //Clear current context >X cr->save(); >X cr->set_operator(Cairo::OPERATOR_CLEAR); >X cr->paint(); >X cr->restore(); >X- >X+ >X //Draw Color background on selected button >X cr->save(); >X- Cairo::RefPtr<Cairo::LinearGradient> bkg_gradient_ptr = Cairo::LinearGradient::create(0, 0, 0, m_midSide_surface_ptr->get_height()); >X+ Cairo::RefPtr<Cairo::LinearGradient> bkg_gradient_ptr = Cairo::LinearGradient::create(0, 0, 0, m_midSide_surface_ptr->get_height()); >X switch(m_MidSideBtn.State) >X { >X case DUAL: >X cr->rectangle(m_MidSideBtn.Dx, 0, m_MidSideBtn.Sx - m_MidSideBtn.Dx, btnH); >X break; >X- >X+ >X case ML: >X cr->begin_new_sub_path(); >X cr->arc( m_MidSideBtn.x0 + btnH/2.0, btnH/2.0 + 0.5, btnH/2.0, M_PI/2.0, -M_PI/2.0); >X@@ -1344,23 +1344,23 @@ void BandCtl::redraw_MidSide_widget() >X cr->line_to( m_MidSideBtn.Dx, btnH); >X cr->close_path(); >X break; >X- >X+ >X case SR: >X cr->begin_new_sub_path(); >X- cr->arc( m_MidSideBtn.x1 - btnH/2.0, btnH/2.0 + 0.5, btnH/2.0 , -M_PI/2.0, M_PI/2.0); >X+ cr->arc( m_MidSideBtn.x1 - btnH/2.0, btnH/2.0 + 0.5, btnH/2.0 , -M_PI/2.0, M_PI/2.0); >X cr->line_to( m_MidSideBtn.Sx, btnH); >X cr->line_to( m_MidSideBtn.Sx, 0); >X cr->close_path(); >X break; >X } >X- >X+ >X bkg_gradient_ptr->add_color_stop_rgba (0.1, 0.4, 0.4, 0.4, 0.5 ); >X- bkg_gradient_ptr->add_color_stop_rgba (0.7, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.6 ); >X- bkg_gradient_ptr->add_color_stop_rgba (0.9, 0.2, 0.2, 0.2, 0.3 ); >X- cr->set_source(bkg_gradient_ptr); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.7, m_Color.get_red_p(), m_Color.get_green_p(), m_Color.get_blue_p(), 0.6 ); >X+ bkg_gradient_ptr->add_color_stop_rgba (0.9, 0.2, 0.2, 0.2, 0.3 ); >X+ cr->set_source(bkg_gradient_ptr); >X cr->fill(); >X cr->restore(); >X- >X+ >X //Draw a box >X cr->save(); >X cr->begin_new_sub_path(); >X@@ -1384,13 +1384,13 @@ void BandCtl::redraw_MidSide_widget() >X cr->line_to(m_MidSideBtn.Sx, btnH); >X cr->stroke(); >X cr->restore(); >X- >X+ >X //Draw Text >X Glib::RefPtr<Pango::Layout> pangoLayout = Pango::Layout::create(cr); >X Pango::FontDescription font_desc("sans bold 10px"); >X pangoLayout->set_font_description(font_desc); >X pangoLayout->set_alignment(Pango::ALIGN_CENTER); >X- >X+ >X cr->save(); >X if(m_MidSideBtn.ML_focus) >X { >X@@ -1404,8 +1404,8 @@ void BandCtl::redraw_MidSide_widget() >X { >X cr->set_source_rgba(0.5, 0.5, 0.5, 0.6); >X } >X- pangoLayout->set_width(Pango::SCALE * (m_MidSideBtn.Dx - m_MidSideBtn.Mx)); >X- cr->move_to(m_MidSideBtn.Mx, btnH/2.0 - 5); >X+ pangoLayout->set_width(Pango::SCALE * (m_MidSideBtn.Dx - m_MidSideBtn.Mx)); >X+ cr->move_to(m_MidSideBtn.Mx, btnH/2.0 - 5); >X if(m_MidSideBtn.MidSideMode) >X { >X pangoLayout->set_text("M"); >X@@ -1416,7 +1416,7 @@ void BandCtl::redraw_MidSide_widget() >X } >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X- >X+ >X if(m_MidSideBtn.SR_focus) >X { >X cr->set_source_rgba(0.0, 1.0, 1.0, 1.0); >X@@ -1429,8 +1429,8 @@ void BandCtl::redraw_MidSide_widget() >X { >X cr->set_source_rgba(0.5, 0.5, 0.5, 0.6); >X } >X- pangoLayout->set_width(Pango::SCALE * (m_MidSideBtn.x1 - m_MidSideBtn.Sx)); >X- cr->move_to(m_MidSideBtn.Sx, btnH/2.0 - 5); >X+ pangoLayout->set_width(Pango::SCALE * (m_MidSideBtn.x1 - m_MidSideBtn.Sx)); >X+ cr->move_to(m_MidSideBtn.Sx, btnH/2.0 - 5); >X if(m_MidSideBtn.MidSideMode) >X { >X pangoLayout->set_text("S"); >X@@ -1442,7 +1442,7 @@ void BandCtl::redraw_MidSide_widget() >X pangoLayout->show_in_cairo_context(cr); >X cr->stroke(); >X cr->restore(); >X- >X+ >X //Draw circle in the center >X cr->save(); >X cr->set_line_width(1.5); >X@@ -1461,7 +1461,7 @@ void BandCtl::redraw_MidSide_widget() >X const double Xcenter = (m_midSide_surface_ptr->get_width()/2.0); >X cr->arc(Xcenter - btnH/4.0 + (btnH/10.0), (btnH/2.0) + 0.5, btnH/3.5, 0.0, 2.0*M_PI); >X cr->stroke(); >X- >X+ >X if(m_MidSideBtn.Dual_focus) >X { >X cr->set_source_rgba(0.0, 1.0, 1.0, 1.0); >X@@ -1477,7 +1477,7 @@ void BandCtl::redraw_MidSide_widget() >X cr->arc(Xcenter + btnH/4.0 - (btnH/10.0), (btnH/2.0) + 0.5, btnH/3.5, 0.0, 2.0*M_PI); >X cr->stroke(); >X cr->restore(); >X- >X+ >X } >X } >X >X@@ -1486,7 +1486,7 @@ void BandCtl::setStereoMode(bool bIsMidS >X if(m_bIsStereoPlugin) >X { >X m_MidSideBtn.MidSideMode = bIsMidSide; >X- redraw_MidSide_widget(); >X+ redraw_MidSide_widget(); >X redraw(); >X } >X } >X@@ -1501,8 +1501,7 @@ void BandCtl::setStereoState(BandCtl::MS >X if(m_bIsStereoPlugin) >X { >X m_MidSideBtn.State = state; >X- redraw_MidSide_widget(); >X+ redraw_MidSide_widget(); >X redraw(); >X } >X } >X- >12c7843432718e5fe6d55c4ff9ba7764 >echo x - eq10q/Makefile >sed 's/^X//' >eq10q/Makefile << '9b54a6b974fd0fde622f4601e2c5aa6c' >X# Created by: Goran MekiÄ <meka@tilda.center> >X# $FreeBSD$ >X >XPORTNAME= eq10q >XPORTVERSION= 2.2 >XCATEGORIES= audio >XMASTER_SITES= SF/${PORTNAME} >X >XMAINTAINER= meka@tilda.center >XCOMMENT= Set of mono and stereo parametric equalizers >X >XLICENSE= GPLv2+ >X >XBUILD_DEPENDS= lv2>=1.14.0:audio/lv2\ >X pkg-config:devel/pkgconf >XLIB_DEPENDS= libjack.so:audio/jack \ >X libgtkmm-2.4.so:x11-toolkits/gtkmm24 \ >X libfftw3.so:math/fftw3 >X >XUSES= cmake >X >XLDFLAGS+= -L${LOCALBASE}/lib >X >X.include <bsd.port.mk> >9b54a6b974fd0fde622f4601e2c5aa6c >echo x - eq10q/distinfo >sed 's/^X//' >eq10q/distinfo << 'fe2ec951b670bf13bbca39cebae49d42' >XTIMESTAMP = 1485432476 >XSHA256 (eq10q-2.2.tar.gz) = 337f4c703ba31902565faad1cd450cf0312ad5a48dc499661277f287b662b09a >XSIZE (eq10q-2.2.tar.gz) = 797991 >fe2ec951b670bf13bbca39cebae49d42 >echo x - eq10q/pkg-plist >sed 's/^X//' >eq10q/pkg-plist << '6bd0c1106ee750691125c18f1805db69' >Xlib/lv2/sapistaEQv2.lv2/bassup.so >Xlib/lv2/sapistaEQv2.lv2/bassup.ttl >Xlib/lv2/sapistaEQv2.lv2/compressor.so >Xlib/lv2/sapistaEQv2.lv2/compressor.ttl >Xlib/lv2/sapistaEQv2.lv2/compressor_sc.so >Xlib/lv2/sapistaEQv2.lv2/compressor_sc.ttl >Xlib/lv2/sapistaEQv2.lv2/compressor_stereo.so >Xlib/lv2/sapistaEQv2.lv2/compressor_stereo.ttl >Xlib/lv2/sapistaEQv2.lv2/compressor_stereo_sc.so >Xlib/lv2/sapistaEQv2.lv2/compressor_stereo_sc.ttl >Xlib/lv2/sapistaEQv2.lv2/eq10qm.so >Xlib/lv2/sapistaEQv2.lv2/eq10qm.ttl >Xlib/lv2/sapistaEQv2.lv2/eq10qs.so >Xlib/lv2/sapistaEQv2.lv2/eq10qs.ttl >Xlib/lv2/sapistaEQv2.lv2/eq1qm.so >Xlib/lv2/sapistaEQv2.lv2/eq1qm.ttl >Xlib/lv2/sapistaEQv2.lv2/eq1qs.so >Xlib/lv2/sapistaEQv2.lv2/eq1qs.ttl >Xlib/lv2/sapistaEQv2.lv2/eq4qm.so >Xlib/lv2/sapistaEQv2.lv2/eq4qm.ttl >Xlib/lv2/sapistaEQv2.lv2/eq4qs.so >Xlib/lv2/sapistaEQv2.lv2/eq4qs.ttl >Xlib/lv2/sapistaEQv2.lv2/eq6qm.so >Xlib/lv2/sapistaEQv2.lv2/eq6qm.ttl >Xlib/lv2/sapistaEQv2.lv2/eq6qs.so >Xlib/lv2/sapistaEQv2.lv2/eq6qs.ttl >Xlib/lv2/sapistaEQv2.lv2/gate.so >Xlib/lv2/sapistaEQv2.lv2/gate.ttl >Xlib/lv2/sapistaEQv2.lv2/gate_stereo.so >Xlib/lv2/sapistaEQv2.lv2/gate_stereo.ttl >Xlib/lv2/sapistaEQv2.lv2/gui/bassup_gui.so >Xlib/lv2/sapistaEQv2.lv2/gui/combopix/hishelf.png >Xlib/lv2/sapistaEQv2.lv2/gui/combopix/hpf.png >Xlib/lv2/sapistaEQv2.lv2/gui/combopix/loshelf.png >Xlib/lv2/sapistaEQv2.lv2/gui/combopix/lpf.png >Xlib/lv2/sapistaEQv2.lv2/gui/combopix/notch.png >Xlib/lv2/sapistaEQv2.lv2/gui/combopix/peak.png >Xlib/lv2/sapistaEQv2.lv2/gui/dynamics_gui.so >Xlib/lv2/sapistaEQv2.lv2/gui/eq10q_gui.so >Xlib/lv2/sapistaEQv2.lv2/gui/icons/logobassup.png >Xlib/lv2/sapistaEQv2.lv2/gui/icons/logodynamics.png >Xlib/lv2/sapistaEQv2.lv2/gui/icons/logoeq10q.png >Xlib/lv2/sapistaEQv2.lv2/gui/knobs/fader_dark.png >Xlib/lv2/sapistaEQv2.lv2/gui/knobs/fader_white.png >Xlib/lv2/sapistaEQv2.lv2/gui/knobs/knob2_25px.png >Xlib/lv2/sapistaEQv2.lv2/gui/knobs/knob2_28px.png >Xlib/lv2/sapistaEQv2.lv2/gui/knobs/knob2_32px.png >Xlib/lv2/sapistaEQv2.lv2/gui/knobs/knob2_35px.png >Xlib/lv2/sapistaEQv2.lv2/gui/knobs/knob_bassup_165px.png >Xlib/lv2/sapistaEQv2.lv2/gui/knobs/knob_bassup_84px.png >Xlib/lv2/sapistaEQv2.lv2/gui/knobs/knob_green_84px.png >Xlib/lv2/sapistaEQv2.lv2/gui/knobs/mixer_knob.xcf >Xlib/lv2/sapistaEQv2.lv2/gui/matrix_ms_gui.so >Xlib/lv2/sapistaEQv2.lv2/lr2ms.ttl >Xlib/lv2/sapistaEQv2.lv2/manifest.ttl >Xlib/lv2/sapistaEQv2.lv2/matrix_lr2ms.so >Xlib/lv2/sapistaEQv2.lv2/matrix_ms2lr.so >Xlib/lv2/sapistaEQv2.lv2/ms2lr.ttl >6bd0c1106ee750691125c18f1805db69 >exit >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 216499
:
179334
|
179340