File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ impl ProcessorManager {
3838 /// Never blocks; silently drops if the buffer is full.
3939 pub fn set_amp_chain ( & self , new_chain : AmplifierChain ) {
4040 if let Some ( tx) = & self . amp_tx {
41- let _ = tx. try_send ( Box :: new ( new_chain) ) ;
41+ tx. try_send ( Box :: new ( new_chain) ) . unwrap_or_else ( |e| {
42+ eprintln ! ( "Failed to send new amplifier chain: {e}" ) ;
43+ } ) ;
4244 }
4345 }
4446
Original file line number Diff line number Diff line change @@ -42,14 +42,15 @@ fn main() -> Result<(), String> {
4242 let mut processor_manager = ProcessorManager :: new ( ) ?;
4343
4444 let chain = create_mesa_boogie_dual_rectifier ( processor_manager. sample_rate ( ) ) ;
45- processor_manager. set_amp_chain ( chain) ;
4645
4746 if recording {
4847 processor_manager. enable_recording ( "./recordings" ) ?;
4948 }
5049
5150 processor_manager. start ( ) ?;
5251
52+ processor_manager. set_amp_chain ( chain) ;
53+
5354 let running = Arc :: new ( AtomicBool :: new ( true ) ) ;
5455 let r = Arc :: clone ( & running) ;
5556
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ pub fn create_mesa_boogie_dual_rectifier(sample_rate: f32) -> AmplifierChain {
210210 ) ;
211211
212212 // Set default channel to clean
213- chain. set_channel ( 2 ) ;
213+ chain. set_channel ( 0 ) ;
214214
215215 chain
216216}
You can’t perform that action at this time.
0 commit comments