Show an example of compliling the sound into the binary. - #787
Conversation
|
I was not sure if I should do this everywhere or make a separate example of doing this or how exactly I should handle this change, but it seems fairly important. At least I needed to do it. |
I don't think it warrants a separate example, but I like having it in there somewhere 👍 Thanks! |
|
Note that using
What would you guys say to changing that? diff --git a/src/decoder/mod.rs b/src/decoder/mod.rs
index 49647c7..f473b44 100644
--- a/src/decoder/mod.rs
+++ b/src/decoder/mod.rs
@@ -392,7 +392,14 @@ where
type Error = DecoderError;
fn try_from(data: std::io::Cursor<T>) -> Result<Self, Self::Error> {
- Self::new(data)
+ let len = data.get_ref().as_ref().len() as u64;
+
+ Self::builder()
+ .with_data(data)
+ .with_byte_len(len)
+ .with_seekable(true)
+ .with_scan_duration(true)
+ .build()
}
} |
Lets do it 👍 |
Seems like something you would want to do fairly often. It is needed for example to package the software on flathub.