clean up some compiler warnings
This commit is contained in:
@@ -17,7 +17,7 @@ use crate::object::Transform;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::path::PathBuf;
|
||||
use uuid::Uuid;
|
||||
use vello::kurbo::{Rect, Affine, Shape as KurboShape};
|
||||
use vello::kurbo::{Rect, Shape as KurboShape};
|
||||
|
||||
/// Vector clip containing nested layers
|
||||
///
|
||||
|
||||
@@ -15,6 +15,7 @@ use std::path::{Path, PathBuf};
|
||||
use zip::write::FileOptions;
|
||||
use zip::{CompressionMethod, ZipArchive, ZipWriter};
|
||||
use flacenc::error::Verify;
|
||||
use base64::{Engine as _, engine::general_purpose::STANDARD as BASE64_STANDARD};
|
||||
|
||||
/// File format version
|
||||
pub const BEAM_VERSION: &str = "1.0.0";
|
||||
@@ -272,7 +273,7 @@ pub fn save_beam(
|
||||
// Priority 3: No original file - encode PCM as FLAC
|
||||
eprintln!("📊 [SAVE_BEAM] Encoding PCM to FLAC for pool {} (no original file)", entry.pool_index);
|
||||
// Embedded data is always PCM - encode as FLAC
|
||||
let audio_bytes = base64::decode(&embedded_data.data_base64)
|
||||
let audio_bytes = BASE64_STANDARD.decode(&embedded_data.data_base64)
|
||||
.map_err(|e| format!("Failed to decode base64 audio data for pool index {}: {}", entry.pool_index, e))?;
|
||||
|
||||
let zip_filename = format!("media/audio/{}.flac", entry.pool_index);
|
||||
@@ -511,13 +512,13 @@ pub fn load_beam(path: &Path) -> Result<LoadedProject, String> {
|
||||
flac_decode_time += flac_decode_start.elapsed().as_secs_f64() * 1000.0;
|
||||
|
||||
Some(daw_backend::audio::pool::EmbeddedAudioData {
|
||||
data_base64: base64::encode(&pcm_bytes),
|
||||
data_base64: BASE64_STANDARD.encode(&pcm_bytes),
|
||||
format: "wav".to_string(), // Mark as WAV since it's now PCM
|
||||
})
|
||||
} else {
|
||||
// Lossy format - store as-is
|
||||
Some(daw_backend::audio::pool::EmbeddedAudioData {
|
||||
data_base64: base64::encode(&audio_bytes),
|
||||
data_base64: BASE64_STANDARD.encode(&audio_bytes),
|
||||
format: format.clone(),
|
||||
})
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//! Provides functions for testing if points or rectangles intersect with
|
||||
//! shapes and objects, taking into account transform hierarchies.
|
||||
|
||||
use crate::clip::{ClipInstance, VectorClip, VideoClip};
|
||||
use crate::clip::ClipInstance;
|
||||
use crate::layer::VectorLayer;
|
||||
use crate::object::ShapeInstance;
|
||||
use crate::shape::Shape;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
//! Layers can be nested within other layers for organizational purposes.
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
/// Node in the layer tree
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
|
||||
@@ -6,7 +6,6 @@ use crate::animation::TransformProperty;
|
||||
use crate::clip::ImageAsset;
|
||||
use crate::document::Document;
|
||||
use crate::layer::{AnyLayer, LayerTrait, VectorLayer};
|
||||
use crate::object::ShapeInstance;
|
||||
use kurbo::{Affine, Shape};
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
Reference in New Issue
Block a user