Commit graph

583 commits

Author SHA1 Message Date
David Kleingeld
e0485beb06
Merge pull request #559 from ideka/fix-channel-upscaling
Fix channel count upscaling
2024-04-01 21:00:30 +02:00
Gerardo Marset
2f3daa9e6c Fix size_hint bug, improve size_hint test 2024-03-31 05:02:30 +01:00
David Kleingeld
14665b7421
Merge pull request #564 from hamirmahal/refactor/restore-cargo-clippy-check-in-ci
restore `cargo clippy` check in CI now all (default) lints pass
2024-03-27 11:18:02 +01:00
Hamir Mahal
6253ce3090
refactor: restore cargo clippy check in CI 2024-03-27 00:27:38 -07:00
Gerardo Marset
a5f06750ef Clarify some code, fix small docs typo 2024-03-27 02:53:11 +01:00
Gerardo Marset
e6424ffd0a Update size_hint to work with previous changes
Update tests as well.
2024-03-27 02:50:57 +01:00
David Kleingeld
e0b8e9bb57
Merge pull request #563 from RustAudio/clippy_warnings
This fixes all clippy warnings
2024-03-26 18:19:30 +01:00
dvdsk
77ca23a450
This fixes all clippy warnings
Made an issue for missing `is_empty()`, see:
https://github.com/RustAudio/rodio/issues/562

The DecoderImpl enum triggerd large_enum_variant. There is not an easy
fix for that. We could box the VorbisDecoder but at 572 bytes
I really do not think thats worth it. Annotated it with an allow
2024-03-26 12:35:36 +01:00
David Kleingeld
daa07dc013
Merge pull request #561 from hamirmahal/refactor/remove-unnecessary-let-binding
refactor: remove unnecessary `let` binding
2024-03-26 12:21:04 +01:00
Gerardo Marset
41604cf54c Avoid duplicating signals when upscaling channels
Mono -> stereo remain the only exception.
2024-03-26 12:07:10 +01:00
Hamir Mahal
a2c2548a4d
refactor: remove unnecessary let binding 2024-03-26 02:01:29 -07:00
David Kleingeld
8d8b5dae21
Merge pull request #560 from hamirmahal/refactor/remove-unnecessary-box
refactor: remove unnecessary `Box` from `SymphoniaDecoder::into_inner`. 

The `SymphoniaDecoder` struct is small enough it fits on the stack without issues and its `into_inner` member is not part of the public API.
2024-03-25 22:49:50 +01:00
Hamir Mahal
371d9634f2
refactor: remove unnecessary Box::new conversion 2024-03-25 10:40:33 -07:00
Hamir Mahal
93d8215d7b
refactor: remove unnecessary Box from into_inner 2024-03-25 00:29:02 -07:00
Gerardo Marset
6de6f22a12 Fix channel count upscaling
This changes channel upscaling so all input samples are spread out
across the output channels, instead of repeating the last sample over
and over. This approach should yield more accurate results. Fixes #558.
2024-03-25 01:08:35 +01:00
Hamir Mahal
616ee26756
refactor: remove unnecessary Default::default() (#557) 2024-03-24 19:29:11 +01:00
Hamir Mahal
0466f60c94
refactor: remove reference that is unnecessary (#556) 2024-03-20 18:14:21 +01:00
Hamir Mahal
9289947974
fix: failing nightly CI tests (#554) 2024-03-18 19:07:12 +01:00
Hamir Mahal
f88a759d8b
refactor: remove unnecessary casting (#552) 2024-03-18 19:03:57 +01:00
Hamir Mahal
1d3a37a594
refactor: replace seek(SeekFrom::Current(0)) (#551)
with more concise `stream_position()`
2024-03-10 17:02:55 +01:00
Matty
01ec33f40b
Lift Sink::clear into SpatialSink (#548) 2024-03-10 05:33:33 +01:00
Hamir Mahal
77c5c5485c
refactor: remove unnecessary clone() calls (#550) 2024-03-10 03:15:03 +01:00
Hamir Mahal
698ca2d5c2
refactor: remove returns that are unnecessary (#549) 2024-03-08 17:56:34 +01:00
François
4688432c4b
expose feature for shared stdcxx from cpal (#546) 2024-03-05 13:03:19 +01:00
Anatol Ulrich
fee5e94066
always seek to start in mp3::is_mp3() (#543) 2024-02-10 13:52:51 +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
Alphyr
8eaa226cef
Fix build with minimp3 (#519) 2023-10-20 23:27:40 +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
BOB450
eda5934a20
Replace minimp3 with minimp3_fixed witch fixes a vital security flaw (#504)
See https://rustsec.org/packages/slice-deque.html and #456
2023-07-26 00:21:03 +02:00
hinto-janai
9674ea56cf
queue: add crossbeam-channel feature flag (#500) 2023-05-25 10:25:00 +02:00
Benjins-automation
8f949a81c8
Upgrade plain-HTTP links to HTTPS in Cargo.toml files (#498)
Co-authored-by: Benji Smith <6193112+Benjins@users.noreply.github.com>
2023-05-21 08:02:32 +02:00
Starua
023ee21e21
Fix Sink skip apis (#494)
* Call `Sink::clear`/`Sink::skip_one` on an empty `Sink` will permanently skip any `Source` append to it
* Call `Sink::clear` on an non-empty `Sink` can't reset it's length().
2023-04-28 12:53:31 +02:00
Ando “Thor” Nando
65d4dd3bdc
fmt: ubuntu workflow fix (#495) 2023-04-28 12:41:36 +02:00
myyrakle
5e034a2908
fix: index out of bound (#487) 2023-04-02 05:23:56 +02:00
Zachary Churchill
3d1a5ac54c
add EmptyCallback source (#430)
Co-authored-by: est31 <est31@users.noreply.github.com>
2023-03-11 20:51:03 +01:00
Joe Clay
d5b9ae3467 Release 0.17.1 2023-02-25 20:45:30 +01:00
Joe Clay
4e123a6366 Disable Symphonia default features 2023-02-25 20:45:30 +01:00
ivakam
e9a85ec254
Implement clear() and skip_one() functionality (continuation of #287) (#442)
* Clear and Skip functionality added

Added a clear() and skip_one() method to the Sink impl

* Use one lock for clear

Return the length in the queue clear function so that we don't have to get a lock twice.

* Rework skip to mark all sources as skippable


---------

Co-authored-by: Nathan Abel <abel8706@kettering.edu>
Co-authored-by: Ivar Kamsvåg <ivaka037@student.liu.se>
Co-authored-by: est31 <est31@users.noreply.github.com>
2023-02-19 13:46:18 +01:00
est31
56360d789c
Release 0.17.0 (#480) 2023-02-17 22:42:40 +01:00
est31
7b65d2fdd9
Edition 2021 (#479) 2023-02-17 22:14:05 +01:00
Jayden Dumouchel
44b92d43e9
Fix Sink playback after stop (#464)
Addressing issues #462 and #315 and #171

Given how the sink's queue is drained on stop I made some modifications in sink.append(). I added a check to ensure the sink was flushed completely (not sure this is necessary? I think it is, to avoid race conditions) and to restart the sink on append (when stopped.)

I added a test demonstrating correctness, as well as performing some trials on my own.
2023-02-17 21:12:32 +01:00
François
0c0e086b6a
update cpal to 0.15 (#478) 2023-02-17 13:05:23 +01:00
Johannes Hackel
317ec569fe
Support ADPCM formats in WAV files (#469) 2023-01-25 10:32:46 +01:00
Noah Bennett
18911085a7
Add dynamic mixer example (#467)
This example plays a C Major 6th chord by adding four sources, sine waves frequencies of C, E, G, and A, to a `DynamicMixerController`, and appends its respective `DynamicMixer` to a sink.
2023-01-11 18:32:39 +01:00
dis-da-moe
268dddae64
Force queue to play sources on frame boundaries (#455)
As I understand it, this is the issue:
  
     * Previously, when a queue has `keep_alive_if_empty` set to true, and it becomes empty, then it will push a silence lasting 10ms onto the queue.
 
     * This is an issue because `current_frame_len` would have returned the worst case, `512`, and the silence lasts less than that.
 
     * This means that unless the source is added immediately to the queue, and so a silence is never played, then the first actual source could start playing at a frame that is not aligned to its channels, or play at the wrong sample rate.
 
     * This is only determined by when the source is added to the queue after its initialization. This explains why the issue was inconsistent, as it relied on the speed of execution of code which is basically random.

Solution
 
     * Change the functionality of `Zero` to add a method to create a silence with a certain number of frames.
 
     * Replace the 10ms silence with a silence the length of `THRESHOLD`
 
     * Change queue's `current_frame_len` to return `THRESHOLD` if a silence will be played next.
2022-11-23 01:36:57 +01:00