-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📢 Version 0.6 Development Status #330
Comments
Hey! I'm using the 0.6 branch against my very very very small Tauri application, since it fixes many issues with FLAC currently Just wanted to say that you're crushing it and I'm extremely happy as a downstream consumer of this package and that the API changes to 0.6 were pretty easy to adapt to I'm still extremely green to Rust in general, so might not be a huge help, but if I end up with some spare cycles and find something critically blocking I'm happy to jump in |
One thing that could help with no_std support (which seems to have stalled) would be to move the core API away from If you'd like to maintain the fallibility of the API ( Unfortunately, the |
Adding some points that would be good to address or consider before the 0.6 release:
|
(symphonia 0.6 (516f1d4), project
Regarding Full compiler outputerror[E0277]: the trait bound `AudioBuffer<i16>: AsMut<[u8]>` is not satisfied
--> playback/src/rusty_backend/decoder/mod.rs:239:45
|
239 | decoded.copy_bytes_interleaved(&mut buffer);
| ---------------------- ^^^^^^ the trait `AsMut<[u8]>` is not implemented for `AudioBuffer<i16>`, which is required by `&mut AudioBuffer<i16>: AsMut<[u8]>`
| |
| required by a bound introduced by this call
|
= note: required for `&mut AudioBuffer<i16>` to implement `AsMut<[u8]>`
note: required by a bound in `GenericAudioBufferRef::<'_>::copy_bytes_interleaved`
--> /mnt/ssd/projects/rust/Symphonia/symphonia-core/src/audio/generic.rs:395:14
|
392 | pub fn copy_bytes_interleaved<Sout, Dst>(&self, dst: Dst)
| ---------------------- required by a bound in this associated function
...
395 | Dst: AsMut<[u8]>,
| ^^^^^^^^^^^ required by this bound in `GenericAudioBufferRef::<'_>::copy_bytes_interleaved` or error[E0277]: the trait bound `AudioBuffer<i16>: AsMut<[_]>` is not satisfied
--> playback/src/rusty_backend/decoder/mod.rs:239:48
|
239 | decoded.copy_to_slice_interleaved(&mut buffer);
| ------------------------- ^^^^^^ the trait `AsMut<[_]>` is not implemented for `AudioBuffer<i16>`, which is required by `&mut AudioBuffer<i16>: AsMut<[_]>`
| |
| required by a bound introduced by this call
|
= note: required for `&mut AudioBuffer<i16>` to implement `AsMut<[_]>`
note: required by a bound in `GenericAudioBufferRef::<'_>::copy_to_slice_interleaved`
--> /mnt/ssd/projects/rust/Symphonia/symphonia-core/src/audio/generic.rs:349:14
|
346 | pub fn copy_to_slice_interleaved<Sout, Dst>(&self, dst: Dst)
| ------------------------- required by a bound in this associated function
...
349 | Dst: AsMut<[Sout]>,
| ^^^^^^^^^^^^^ required by this bound in `GenericAudioBufferRef::<'_>::copy_to_slice_interleaved` where let mut buffer = AudioBuffer::<i16>::new(decoded.spec().clone(), decoded.capacity()); Finally, there is also this warning when i use symphonia by path: warning: field `bitrate` is never read
--> /mnt/ssd/projects/rust/Symphonia/symphonia-bundle-mp3/src/common.rs:99:9
|
96 | pub struct FrameHeader {
| ----------- field in this struct
...
99 | pub bitrate: u32,
| ^^^^^^^
|
= note: `FrameHeader` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
warning: `symphonia-bundle-mp3` (lib) generated 1 warning Full result of my symphonia 0.6 try can be seen in this compare or in this repository & branch (note that i might not keep that branch around forever). |
I think, for the sake of getting 0.6 this year, I will leave no_std to the next major release. :) Once we have 0.6 released, then we can start making internal changes (though not semver breaking), such as using The
|
Updating
The track ID should never be assumed to be a track index. It should always be matched against Perhaps it's better to replace it with the track index/number instead. What do you think? I've warmed up to having both in the packet, however, I'm not sure how useful the track ID itself is in practice, especially since it can essentially be a random number. Additionally, I think we need to extend track IDs to
Agreed. We can have both to replace
Hard to say, but I'm not seeing a clear need right now. It depends what other fields we must carry for a video track.
The |
Hi @hasezoey, Hopefully will have a migration guide and updated examples when the API changes are finalised. I do recommend running
The metadata returned in the This metadata is now passed to the format reader and you can access it through the
You can now use the Here's a description of the different types of copy functions. First, we have sample-oriented copy functions:
Next we have byte-oriented equivalents of the above:
Note: I missed some of these copy-to-vec functions, so you should pull! Therefore, you can simply replace ( // SampleBuffer
let mut samples: Vec<f32> = Default::default();
audio.copy_to_vec_interleaved(&mut samples);
// RawSampleBuffer
let mut raw_samples: Vec<u8> = Default::default();
audio.copy_bytes_to_vec_interleaved_as::<f32>(&mut raw_samples);
In previous versions, audio channels were represented using a set of bitflags. However, that was limiting for more advanced audio codecs, so channels can now also be represented as a |
Thanks for clarifying, this makes it a lot easier to deal with metadata. If i understand this correctly, you mean that it is included in this function
That was what i was doing, though it only contained the current state not how to migrate from old types. (though yes, i have not run into any old docs yet)
That is basically what i am doing now, just wanted clarification if a plain For context, i had made a wrapper buffer struct, as we need more values than the raw samples (like TL;DR: the copy function looks like this: /// Copy passed [`GenericAudioBufferRef`] into our Buffer
#[inline]
fn copy_buffers(&mut self, decoded: &GenericAudioBufferRef<'_>) {
let required_capacity = decoded.byte_len_as::<i16>();
self.buf.resize(required_capacity, 0);
decoded.copy_to_vec_interleaved(&mut self.buf);
self.frame_len = decoded.frames();
} PS: completely unrealted, but because i dont know much about audio, would it be better to switch from |
Yup.
I see, yeah what you have looks like it'd work!
For all intents and purposes, A classic intro video to digital media is this one: https://xiph.org/video/vid1.shtml. If you want to get into more detail, I found this article to be quite detailed as well: https://mu.krj.st/wave/. |
I personally would appreciate being able to create iterators over the various |
Hey all,
As some may have noticed, most of the development activity on Symphonia is occurring in the
dev-0.6
branch. This is because I believe the 0.5.x series has reached a developmental dead-end where it is not possible to satisfactorily fix many of Symphonia's issues due to API constraints. Therefore, I've decided to focus my limited time on completing version 0.6 instead.Version 0.6 includes many breaking changes to support popular requests such as making it easier to get audio out of Symphonia, or returning
None
when the end of the media is reached, but it also includes forward looking enhancements such as stubbing out video and subtitle decoding support.Development Plan
My development plan is as follows:
dev-0.6
branch until there are no more breaking changes being made.Timeline
I am hopeful for an early 2025 release, but some help from the community would improve the odds!
Help Wanted
You can help the development and release of version 0.6 by picking up any of these tasks:
I will add to this list over time...
Thanks all!
The text was updated successfully, but these errors were encountered: