chore: log more stuff around rendering to debug
This commit is contained in:
@@ -377,11 +377,11 @@ pub async fn handle(state: State, interaction: Interaction) {
|
|||||||
samples: composite,
|
samples: composite,
|
||||||
};
|
};
|
||||||
|
|
||||||
state
|
let render_result = state.render_manager.write(&render, render_data).await;
|
||||||
.render_manager
|
|
||||||
.write(&render, render_data)
|
tracing::info!(?render_result);
|
||||||
.await
|
|
||||||
.expect("TODO");
|
render_result.expect("TODO");
|
||||||
|
|
||||||
tracing::info!(%render, "written");
|
tracing::info!(%render, "written");
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,8 @@ impl RecordingManager {
|
|||||||
microsecond_end = 999_999;
|
microsecond_end = 999_999;
|
||||||
}
|
}
|
||||||
|
|
||||||
let microseconds = microsecond_start..=microsecond_end;
|
let microseconds =
|
||||||
|
microsecond_start..=microsecond_end;
|
||||||
|
|
||||||
let microsecond = clip.microsecond;
|
let microsecond = clip.microsecond;
|
||||||
if !microseconds.contains(µsecond) {
|
if !microseconds.contains(µsecond) {
|
||||||
|
|||||||
@@ -2,19 +2,12 @@ use std::{convert::Infallible, fmt::Display};
|
|||||||
|
|
||||||
use opendal::Operator;
|
use opendal::Operator;
|
||||||
use opus2::Application;
|
use opus2::Application;
|
||||||
use songbird::driver::SampleRate;
|
use time::{UtcDateTime, format_description::StaticFormatDescription, macros::format_description};
|
||||||
use time::{
|
|
||||||
UtcDateTime,
|
|
||||||
format_description::{self, StaticFormatDescription},
|
|
||||||
macros::format_description,
|
|
||||||
};
|
|
||||||
use twilight_model::id::{
|
use twilight_model::id::{
|
||||||
Id,
|
Id,
|
||||||
marker::{ChannelMarker, GuildMarker},
|
marker::{ChannelMarker, GuildMarker},
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{AudioChannels, AudioSampleRate};
|
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct RenderManager {
|
pub struct RenderManager {
|
||||||
operator: Operator,
|
operator: Operator,
|
||||||
@@ -78,11 +71,15 @@ impl RenderManager {
|
|||||||
let mut encoder =
|
let mut encoder =
|
||||||
opus2::Encoder::new(sample_rate, channels, Application::Audio).expect("TODO");
|
opus2::Encoder::new(sample_rate, channels, Application::Audio).expect("TODO");
|
||||||
|
|
||||||
encoder.encode(&samples, &mut bytes).expect("TODO");
|
let encode_result = encoder.encode(&samples, &mut bytes);
|
||||||
|
tracing::info!(?encode_result);
|
||||||
|
encode_result.expect("TODO");
|
||||||
|
|
||||||
let path = render.to_string();
|
let path = render.to_string();
|
||||||
|
|
||||||
self.operator.write(&path, bytes).await.expect("TODO");
|
let write_result = self.operator.write(&path, bytes).await;
|
||||||
|
tracing::info!(?write_result);
|
||||||
|
write_result.expect("TODO");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user