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,
|
||||
};
|
||||
|
||||
state
|
||||
.render_manager
|
||||
.write(&render, render_data)
|
||||
.await
|
||||
.expect("TODO");
|
||||
let render_result = state.render_manager.write(&render, render_data).await;
|
||||
|
||||
tracing::info!(?render_result);
|
||||
|
||||
render_result.expect("TODO");
|
||||
|
||||
tracing::info!(%render, "written");
|
||||
|
||||
|
||||
@@ -144,7 +144,8 @@ impl RecordingManager {
|
||||
microsecond_end = 999_999;
|
||||
}
|
||||
|
||||
let microseconds = microsecond_start..=microsecond_end;
|
||||
let microseconds =
|
||||
microsecond_start..=microsecond_end;
|
||||
|
||||
let microsecond = clip.microsecond;
|
||||
if !microseconds.contains(µsecond) {
|
||||
|
||||
@@ -2,19 +2,12 @@ use std::{convert::Infallible, fmt::Display};
|
||||
|
||||
use opendal::Operator;
|
||||
use opus2::Application;
|
||||
use songbird::driver::SampleRate;
|
||||
use time::{
|
||||
UtcDateTime,
|
||||
format_description::{self, StaticFormatDescription},
|
||||
macros::format_description,
|
||||
};
|
||||
use time::{UtcDateTime, format_description::StaticFormatDescription, macros::format_description};
|
||||
use twilight_model::id::{
|
||||
Id,
|
||||
marker::{ChannelMarker, GuildMarker},
|
||||
};
|
||||
|
||||
use crate::{AudioChannels, AudioSampleRate};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RenderManager {
|
||||
operator: Operator,
|
||||
@@ -78,11 +71,15 @@ impl RenderManager {
|
||||
let mut encoder =
|
||||
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();
|
||||
|
||||
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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user