Commit graph

31 commits

Author SHA1 Message Date
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
5562241f39
commit to save work on vorbis try_seek 2024-04-03 13:02:30 +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
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
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
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
4237effbf4
revert to upstream non-seekable minimp3, comment out minimp3-seek support 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
eb22ec5dac
refactor tests, add seek beyond stream test 2023-10-13 15:45:40 +02:00
dvdsk
9a4dcb0c41
add can_seek method to source
document why Sink::can_seek does not exist
2023-10-13 15:45:27 +02:00
dvdsk
d8a8be4a2f
add seek for lewton 2023-10-13 15:45:27 +02:00
dvdsk
e1092f712d
refactors seek test, now covers all decoders/formats 2023-10-13 15:45:27 +02:00
dvdsk
5b933d7af1
refactors seektest and adds more formats 2023-10-13 15:45:07 +02:00
dvdsk
1f3f36a4c8
removes default try_seek impl, impl try_seek for decoders + refactors decoderimpl a bit 2023-10-13 15:45:06 +02:00
dvdsk
202687b934
adds try_seek for sink and all sources 2023-10-13 15:44:43 +02:00
Alejandro Perea
69a7f416a7
Move sound to assets/; Exclude it from package (#421)
* Move sound to `assets/`; Exclude it from package

* Exclude tests from package
2022-03-26 20:15:18 +01:00
Orson Peters
68b0333642 Reduced 32-bit integer test file size. 2021-10-01 04:20:25 +02:00
Orson Peters
4ad05a73fb Added 32-bit signed int WAV decoding. Fixes #344. 2021-10-01 04:20:25 +02:00
Austin Schey
0988e8c886
Add optional Symphonia backend (#376)
* add symphonia decoder

* add symphonia-flac

* better compile errors

* remove unsafe send

* update ci

* sudo

* disable duration check because symphonia does not support it

* add error handling

* cleanup

* update symphonia and fix breaking changes

* update to published symphonia version

* update docs

* reduce namespace duplication

* remove extra reference to current frame

* pr comments

* exclude decoders from module if unused

* fix flac test

* recommend disabling default features with symphonia
2021-06-29 09:12:28 +02:00
Alex Butler
7ad840793c
Remove deadcode + rustfmt 2020-05-02 13:33:57 +01:00
Alex Butler
c93adb2582
Migrate to edition 2018
* Remove unstable/legacy rustfmt config
* Run rustfmt
2020-05-02 13:33:57 +01:00
whentze
60eaa9a2f5 Add basic test for flac decoding 2019-05-15 03:16:01 +02:00
Aaron Kofsky
d20a3c661e Fix reading WAV of different encodings. (#199)
* Read 32 bit float and 24 bit int encoded files correctly.

Before, we were assuming that all WAV files are encoded as 16 bit integers.
This is not true, WAVs can actually also be encoded as 32 bit floats and
24 bit integers. Hound returns `Err` when we attempt to read files as the
wrong encoding, which was getting `unwrap_or`'d to just zero. This explains
why the file would load but not play any sound. We fix this by first
checking for the appropriate encoding, and then converting to an i16. This
might cause some slight dither issues but hopefully it is quiet enough that
it doesn't matter.

Fixes #195.

* Add tests of reading wav files different encodings

* Use `.map()` instead of control flow & unwrapping.

This makes things slightly cleaner to read.
Also remove extraneous print statement.
2018-11-09 21:58:43 +01:00