Commit graph

476 commits

Author SHA1 Message Date
Rekai Musuka
5907affb44 Implement Display and Error traits for PlayError 2020-10-08 17:59:16 -05:00
est31
566e979203
Merge pull request #325 from est31/release_0_12
Release 0.12.0
2020-10-05 01:45:18 +02:00
est31
f34939b1dc Release 0.12.0 2020-10-05 01:10:01 +02:00
est31
71bc464ff2 Use OR instead of / 2020-10-05 01:09:40 +02:00
est31
78453e4b7f Changelog for 0.12.0 2020-10-05 01:08:57 +02:00
est31
cae37e121f
Merge pull request #324 from nbraud/resampler
SampleRateConverter: Fix reliance on Vec internals (see #303)
2020-10-05 00:57:11 +02:00
est31
eaf90ee836
Merge pull request #322 from HalfVoxel/master
Limit frame length in UniformSourceIterator
2020-10-03 21:29:27 +02:00
Aron Granberg
984b86616d Limit frame length in UniformSourceIterator 2020-10-03 13:10:06 +02:00
est31
3bc614fc12
Merge pull request #320 from HalfVoxel/master
Fix crackling audio when using Sink
2020-10-03 11:30:02 +02:00
est31
20a8f69e6b
Merge pull request #309 from ely-uf/feature/source_skip_duration
Add SkipDuration source.
2020-10-02 22:34:49 +02:00
Aron Granberg
1c376e8790 Fix SourcesQueueOutput::current_frame_len using upper bound instead of lower bound 2020-10-02 17:23:30 +02:00
Aron Granberg
77031e7e08 Add missing size_hint for Done source 2020-10-02 17:15:34 +02:00
est31
758a39f2ba
Merge pull request #317 from vickles/typed-new-decoder
Add new_X format specific methods to Decoder
2020-10-01 19:18:33 +02:00
Nicolas Braud-Santoni
412a02ae85
SampleRateConverter: Check that resampling does not change duration
Reproduces the issue in #316
2020-10-01 17:44:28 +02:00
Nicolas Braud-Santoni
20cd8eb3a3
SampleRateConverter: Remove redundant, ignored test 2020-10-01 17:12:19 +02:00
Nicolas Braud-Santoni
878de74821
SampleRateConverter: Generalize tests over rate ratio 2020-10-01 17:04:29 +02:00
Nicolas Braud-Santoni
663bdd57b2
SampleRateConverter: Generalize doubling/halving tests over channels 2020-10-01 17:04:26 +02:00
Nicolas Braud-Santoni
42e2e53f66
conversions::Sample: Fix bug in linear interpolation for u16
The previous implementation panicked if first > second.
2020-10-01 17:04:23 +02:00
Nicolas Braud-Santoni
96e743746c
SampleRateConverter: Parameterize rate doubling by input data 2020-10-01 17:04:20 +02:00
Nicolas Braud-Santoni
c5147cea07
SampleRateConverter::test: Minor refactor 2020-10-01 17:04:17 +02:00
Nicolas Braud-Santoni
b996697e93
SampleRateConverter: Parameterise tests over input data 2020-10-01 17:04:14 +02:00
Nicolas Braud-Santoni
eb3b6d15a8
SampleRateConverter: Parameterise tests over the number of channels 2020-10-01 17:04:11 +02:00
Nicolas Braud-Santoni
ff9f6fc7de
SampleRateConverter: Parametrize tests over the sample frequencies 2020-10-01 17:04:08 +02:00
Nicolas Braud-Santoni
9feb54dc95
SampleRateConverter: Remove dependency on Vec::capacity
Previously depended on Vec internals that changes in Rust 1.45. (Closes #303)

The frame's width is always the number of channels, so instead of carrying this
information implicitely (in the vec's capacity) we make it an explicit member.
2020-10-01 17:03:59 +02:00
vickles
8b0923c196 Add new_X format specific methods to Decoder 2020-10-01 15:41:31 +01:00
est31
3b733c60fb
Merge pull request #314 from exrook/master
Add `LoopedDecoder`
2020-08-28 19:08:55 +02:00
Jacob Hughes
95317f9b88 Add LoopedDecoder
LoopedDecoder works like the normal Decoder, but when the decoder
reaches the end of file it will restart playback from the beginning.
This has the advantage over Decoder::new().repeat_infinite() that it
will not buffer the entire uncompressed audio file into memory.

Update minimp3 to version 0.5 to use the `into_iter()` method
2020-08-27 15:07:40 -04:00
Jacob Hughes
a80a90bae5 Coalesce Decoder impls
Removed dummy impl blocks for Decoder that were used when no
codecs were enabled, instead handle that case through a
DecoderImpl::None variant
2020-08-27 13:21:37 -04:00
Sasho Savov
a4f771a1da
Make docs easier for beginners (#311)
* Make docs easier for beginners

Co-authored-by: Vlady Veselinov <vladkodmc@gmail.com>

* Typo

Co-authored-by: Vlady Veselinov <vladkodmc@gmail.com>

Co-authored-by: Vlady Veselinov <vladkodmc@gmail.com>
2020-08-21 17:26:33 +02:00
ely-uf
cba8513364 SkipDuration: fix incorrect data in a test.
Make the `seconds` and `seconds to skip` values equal in the
`skip_duration_equal_to_source_length` test.
2020-08-09 01:29:13 +03:00
ely-uf
8403b719d4 Make SkipDuration aware of potential change in audio parameters.
The `rodio` documentation states:
> The samples rate and number of channels of some sound sources can change
> by itself from time to time.

This commit introduces awareness of such change to the SkipDuration
source.
Now SkipDuration keeps track of `Source::current_frame_len` in order to
timely adjust both the sample rate and number of channels it uses to calculate
the amount of samples to skip.
2020-08-09 00:28:04 +03:00
ely-uf
15d4b54e2e Add inner, inner_mut and into_inner to SkipDuration. 2020-08-08 20:24:45 +03:00
ely-uf
7aaa9c3974 Add documentation comments to SkipDuration source. 2020-08-08 20:19:51 +03:00
ely-uf
f2e6795180 Add SkipDuration.
SkipDuration is a source that skips specified duration of the given
source from it's current position.

The already existing TakeDuration source allows to truncate the given source
from the end. SkipDuration complements it, introducing the option of
truncating the given source from it's current position.
2020-08-08 20:16:53 +03:00
est31
b376b91e9e
Merge pull request #308 from cormac-obrien/expose-playerror
Document PlayError and expose in public API
2020-08-05 03:50:02 +02:00
Mac O'Brien
fb176a6883 Document PlayError and expose in public API 2020-08-04 14:15:04 -05:00
est31
82b495245b
Merge pull request #301 from cormac-obrien/wav-8bit
Enable 8-bit WAV decoding
2020-07-13 04:39:52 +02:00
Mac O'Brien
8bd421afaf Enable 8-bit WAV decoding 2020-07-12 20:50:34 -05:00
est31
ad61c54485
Merge pull request #247 from alexheretic/engineless
Rework to use cpal-next
2020-07-11 04:41:15 +02:00
Alex Butler
286d63d6b3
Use cpal 0.12 2020-07-10 20:08:12 +01:00
Karl Skomski
ce00eb0de6 Fix mp3 decoder bug: only reset offset after new frame 2020-07-07 14:11:29 +02:00
Alex Butler
25e6822c59
Update changelog 2020-05-02 13:38:56 +01:00
Alex Butler
81f5c9b6fd
Update to latest cpal 2020-05-02 13:34:14 +01:00
Alex Butler
4c96d3bd55
Improve stream docs 2020-05-02 13:34:14 +01:00
Alex Butler
e8a6502e45
Export OutputStreamHandle top level 2020-05-02 13:34:14 +01:00
Alex Butler
7ca3b1d635
fix crossfade 2018 & cargo fmt 2020-05-02 13:34:11 +01:00
Alex Butler
d7c77aa52e
Add OutputStreamHandle 2020-05-02 13:33:57 +01:00
Alex Butler
7ad840793c
Remove deadcode + rustfmt 2020-05-02 13:33:57 +01:00
Alex Butler
560b232b9d
Make basic/beep example less ear-deadly 2020-05-02 13:33:57 +01:00
Alex Butler
3a29a5390e
Update cpal to 946d646 2020-05-02 13:33:57 +01:00