Commit graph

616 commits

Author SHA1 Message Date
dvdsk
40a9447fa1
refactor(decoder/sympthonia) use for loop instead loop + match & escape
More readable, prep for using the same lines in new refine_position fn.
Since that is already pretty complex this needed to be made simpler.

This code retries on all errors not only decode errors. Retries will not
work on anything else then a decode error however they also wont cause
any problems. Not checking the result does however make the code
simpler.
2024-04-05 13:28:16 +02:00
dvdsk
1fcf4b8363
test(seek) made channel order more brittle 2024-04-05 12:16:06 +02:00
dvdsk
a52a41bd86
refactor(decoder/symphonia) logic reorderd 2024-04-04 23:47:47 +02:00
dvdsk
f846cdf38d
fix(seek) hound(wav) now keeps channel order consistent 2024-04-04 23:36:01 +02:00
dvdsk
7eb13be288
(tests) use rstest to refactor and expand seek test
This adds two dependencies, they are only needed for the test suite.
Compile time will not increase for users. The extra overhead when
running the test suite is worth it imho. The test file is significantly
shorter and there is less code duplication. A run time solution would
decrease the test interface (you would have to manually find out which
params caused the test).
2024-04-04 21:22:53 +02:00
dvdsk
26e9db7b87
remove seek support for (lewton) vorbis
seek is broken, https://github.com/RustAudio/lewton/issues/73.
We could work around it by:
 - using unsafe to create an instance of Self
 - use mem::swap to turn the &mut self into a mut self
 - take out the underlying Read+Seek
 - make a new self and seek

If this issue is fixed use the implementation in
commit: 3bafe32388
2024-04-04 12:54:09 +02:00
dvdsk
3bafe32388
refactor(seek) explain why seek to sample works 2024-04-03 14:04:59 +02:00
dvdsk
4e14b0acea
Vorbis actually can be implemented since the sample rate is constant
This reverts commit 80add81532.
2024-04-03 13:49:10 +02:00
dvdsk
80add81532
removes seeking from vorbis decoder, can not be implemented 2024-04-03 13:08:21 +02:00
dvdsk
5562241f39
commit to save work on vorbis try_seek 2024-04-03 13:02:30 +02:00
dvdsk
1c821362fd
fix(seek) vorbis decoder now respects channel order 2024-04-03 12:40:59 +02:00
dvdsk
04c6957dac
test(seek) improve channel order test 2024-04-03 11:54:47 +02:00
dvdsk
9ae1c5501a
test(seek) add test for channel order 2024-04-03 11:45:54 +02:00
dvdsk
d0fce09bb0
fix(seek) vorbis decoder crashing when seeking 2024-04-03 11:45:17 +02:00
dvdsk
67612b573e
(seek/test) adds failing test for seeking in exausted source 2024-04-02 12:59:22 +02:00
dvdsk
2e9d680afb
(seek/test) fixes duration calc in test 2024-04-02 12:29:55 +02:00
dvdsk
c60819e47d
seek tests finds beep in stereo test file 2024-04-02 12:08:51 +02:00
dvdsk
766fbbf1fa
implement try_seek for SamplesBuffer 2024-04-01 14:16:56 +02:00
dvdsk
fb44f71dc9
Fixes seek example and various spell/grammar issues
Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
2024-01-31 14:53:10 +01:00
dvdsk
4dea149dc2
fixes spell errors in docs and SeekError 2024-01-26 21:23:04 +01:00
dvdsk
470eba8328
Merge branch 'master' into seek_runtime_err 2024-01-26 21:21:34 +01:00
0Ahmed-0
8e604cfc08
chore: fix a typo (#537) 2024-01-07 15:17:46 +01:00
Alphyr
1b9c1933b3
Add Decoder::new_vorbis when symphonia-vorbis feature is enabled (#529) 2023-12-25 02:52:11 +01:00
dexterdy
e153a193ed
impl source for mut references (#532) 2023-12-25 01:36:26 +01:00
est31
4973f330e0
Release 0.17.3 (#522) 2023-10-23 14:50:26 +02:00
willxw
35dc35f426
Update sink.rs (#521) 2023-10-23 14:06:28 +02:00
dvdsk
57f2a3ca36
cargo fmt 2023-10-21 21:32:43 +02:00
David Kleingeld
50a781a093
Merge branch 'master' into seek_runtime_err 2023-10-21 21:00:51 +02:00
Alphyr
8eaa226cef
Fix build with minimp3 (#519) 2023-10-20 23:27:40 +02:00
David Kleingeld
b7b5735afe
Merge branch 'master' into seek_runtime_err 2023-10-17 13:21:21 +02:00
est31
6a255fe70a
Release 0.17.2 (#518) 2023-10-17 12:41:00 +02:00
willxw
98bae98d05
added q value parameter to be passed to filter functions (#515)
I have added a 2nd parameter to the filter functions low_pass, high_pass, to_low_pass, and to_high pass; allowing a q value to be passed along with the frequency.

Co-authored-by: David Kleingeld <git@davidsk.dev>
2023-10-17 12:32:17 +02:00
David Kleingeld
5dd41356e8
Remove duplicate doc section and fix spelling in docs
Co-authored-by: naglis <827324+naglis@users.noreply.github.com>

Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
2023-10-13 16:49:33 +02:00
David Kleingeld
8c774628fe
use From<f64> instead of custom time_from_duration
remove now unused time_from_duration

Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
2023-10-13 15:47:38 +02:00
David Kleingeld
7357f191b8
remove commented out dead code in tests/seek.rs
Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
2023-10-13 15:47:38 +02:00
dvdsk
c2c85e2332
improve seek beyond end documentation 2023-10-13 15:47:38 +02:00
dvdsk
963a48491f
refactors symphonia try_seek 2023-10-13 15:47:38 +02:00
dvdsk
b26194df91
make cargo fmt happy 2023-10-13 15:47:38 +02:00
dvdsk
724df4d884
completely remove sink usage from seek tests 2023-10-13 15:47:38 +02:00
dvdsk
a24e0e65eb
speeds up correct_remaining_playtime test 2023-10-13 15:47:38 +02:00
dvdsk
d1a809feac
formats everything with cargo fmt 2023-10-13 15:47:28 +02:00
dvdsk
82bfa417ff
fixes seek in m4a files, fixes seeking having 1 second granularity 2023-10-13 15:47:01 +02:00
dvdsk
3f4b530a42
Language and spelling fixes by @naglis
fix comment typo

Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
2023-10-13 15:46:53 +02:00
dvdsk
4237effbf4
revert to upstream non-seekable minimp3, comment out minimp3-seek support 2023-10-13 15:45:40 +02:00
dvdsk
560961fc8b
adds try_seek to spatial source 2023-10-13 15:45:40 +02:00
dvdsk
f3a1966348
symphonia throws error if duration is unknown and seek is beyond source length 2023-10-13 15:45:40 +02:00
dvdsk
5de73833a9
finishes doc for sink::try_seek 2023-10-13 15:45:40 +02:00
dvdsk
2b39d27aaf
adds total_duration() impl to SymphoniaDecoder, makes seek saturating at source end if total_duration known 2023-10-13 15:45:40 +02:00
dvdsk
8416210628
adds test verifying correct seek position after seek 2023-10-13 15:45:40 +02:00
dvdsk
10262f8134
removes can_seek in favor of rolling back seek operations (requires PR #510) 2023-10-13 15:45:40 +02:00