mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +00:00 
			
		
		
		
	 0dc6fe9102
			
		
	
	
		0dc6fe9102
		
	
	
	
	
		
			
			This is the first step in transitioning Piano to a full LibDSP backend. For now, the delay effect is replaced with a (mostly identical) implementation in LibDSP. The new ProcessorParameterSlider attaches to a LibDSP::Processor's range parameter (LibDSP::ProcessorRangeParameter) and changes it automatically. It also has the ability to update an external GUI::Label. This is used for the three delay parameters and it will become useful for auto-generating UI for Processors.
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			625 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			625 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, kleines Filmröllchen <malu.bertsch@gmail.com>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibDSP/ProcessorParameter.h>
 | |
| #include <LibGUI/Label.h>
 | |
| #include <LibGUI/Slider.h>
 | |
| #include <LibGfx/Orientation.h>
 | |
| 
 | |
| class ProcessorParameterSlider : public GUI::Slider {
 | |
|     C_OBJECT(ProcessorParameterSlider);
 | |
| 
 | |
| public:
 | |
|     ProcessorParameterSlider(Orientation, LibDSP::ProcessorRangeParameter&, RefPtr<GUI::Label>);
 | |
|     RefPtr<GUI::Label> value_label() { return m_value_label; }
 | |
| 
 | |
| private:
 | |
|     LibDSP::ProcessorRangeParameter& m_parameter;
 | |
|     RefPtr<GUI::Label> m_value_label;
 | |
| };
 |