Clean up build warnings
This commit is contained in:
parent
92dffbaa4e
commit
a98b59a6d3
|
|
@ -71,10 +71,10 @@ impl AudioSystem {
|
||||||
let default_output_config = output_device.default_output_config().map_err(|e| e.to_string())?;
|
let default_output_config = output_device.default_output_config().map_err(|e| e.to_string())?;
|
||||||
let sample_rate = default_output_config.sample_rate();
|
let sample_rate = default_output_config.sample_rate();
|
||||||
let channels = default_output_config.channels() as u32;
|
let channels = default_output_config.channels() as u32;
|
||||||
let debug_audio = std::env::var("DAW_AUDIO_DEBUG").map_or(false, |v| v == "1");
|
let _debug_audio = std::env::var("DAW_AUDIO_DEBUG").map_or(false, |v| v == "1");
|
||||||
|
|
||||||
eprintln!("[AUDIO] Device: {:?}, format={:?}, rate={}, channels={}",
|
eprintln!("[AUDIO] Device: {:?}, format={:?}, rate={}, channels={}",
|
||||||
output_device.name().unwrap_or_default(), default_output_config.sample_format(), sample_rate, channels);
|
output_device.description().map(|d| d.name().to_string()).unwrap_or_default(), default_output_config.sample_format(), sample_rate, channels);
|
||||||
|
|
||||||
// Create queues
|
// Create queues
|
||||||
let (command_tx, command_rx) = rtrb::RingBuffer::new(512); // Larger buffer for MIDI + UI commands
|
let (command_tx, command_rx) = rtrb::RingBuffer::new(512); // Larger buffer for MIDI + UI commands
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ fn enumerate_audio_input_devices() -> Vec<String> {
|
||||||
.ok()
|
.ok()
|
||||||
.map(|devices| {
|
.map(|devices| {
|
||||||
devices
|
devices
|
||||||
.filter_map(|d| d.name().ok())
|
.filter_map(|d| d.description().ok().map(|desc| desc.name().to_string()))
|
||||||
.collect()
|
.collect()
|
||||||
})
|
})
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
|
|
|
||||||
|
|
@ -586,17 +586,16 @@ impl ShaderEditorPane {
|
||||||
// Open dropdown for existing scripts (BeamDSP mode)
|
// Open dropdown for existing scripts (BeamDSP mode)
|
||||||
if self.mode == EditorMode::BeamDSP && !available_scripts.is_empty() {
|
if self.mode == EditorMode::BeamDSP && !available_scripts.is_empty() {
|
||||||
let open_btn = ui.button("Open");
|
let open_btn = ui.button("Open");
|
||||||
let popup_id = egui::Id::new("script_editor_open_popup");
|
let popup_id = egui::Popup::default_response_id(&open_btn);
|
||||||
if open_btn.clicked() {
|
egui::Popup::from_toggle_button_response(&open_btn)
|
||||||
ui.memory_mut(|m| m.toggle_popup(popup_id));
|
.close_behavior(egui::PopupCloseBehavior::CloseOnClickOutside)
|
||||||
}
|
.show(|ui| {
|
||||||
egui::popup_below_widget(ui, popup_id, &open_btn, egui::PopupCloseBehavior::CloseOnClickOutside, |ui| {
|
|
||||||
ui.set_min_width(160.0);
|
ui.set_min_width(160.0);
|
||||||
for (id, name) in available_scripts {
|
for (id, name) in available_scripts {
|
||||||
let is_current = self.editing_script_id == Some(*id);
|
let is_current = self.editing_script_id == Some(*id);
|
||||||
if ui.selectable_label(is_current, name).clicked() {
|
if ui.selectable_label(is_current, name).clicked() {
|
||||||
open_script_id = Some(*id);
|
open_script_id = Some(*id);
|
||||||
ui.memory_mut(|m| m.close_popup(popup_id));
|
egui::Popup::close_id(ui.ctx(), popup_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue