Joe Clay
53a7d78cd8
Add inner
accessors for more sources
2019-01-17 01:10:12 +00:00
Alex Butler
4bb832ba30
Remove exclusive borrow requirement in Sink, SpatialSink ( #203 )
...
The inner Mutex does not require this.
2018-11-16 11:18:07 +01:00
Nicola Larosa
6fd5288cc7
Fix ChannelVolume dropping input samples ( #198 )
2018-11-10 14:44:49 +01: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
thiolliere
a55cac78ae
Fix channel volume None sample ( #191 )
2018-10-11 15:36:03 +01:00
Anton
4168dbc161
added .stop()
to SpacialSink ( #188 )
2018-09-23 05:10:35 +02:00
Ben Boeckel
8bf1bf5851
typos: fix in buffer and source documentation ( #180 )
...
* typos: fix in buffer and source documentation
* sink: fix some formatting
* sink: refer to the sink in the pause API docs
2018-09-15 11:07:33 +02:00
Ben Boeckel
f0fc5124db
static_buffer: add a source backed by static data ( #183 )
...
If samples are available as static data, this avoids having to
reallocate the data.
2018-09-15 11:07:12 +02:00
Ben Boeckel
2e005c8218
repeat: implement Clone ( #182 )
...
It seems the compiler is not deriving `Clone` automatically even though
it is just `Buffered` wrappers around the original data.
2018-09-15 11:06:42 +02:00
Jacob Kiesel
d839e53078
Prepare 0.8 release
2018-06-22 08:50:19 -06:00
thiolliere
2933c3c0b2
fix dynamic mixer doc
2018-06-20 19:32:57 +02:00
Pierre Krieger
8d51880638
Merge pull request #167 from barzamin/minimp3
...
Implement MP3 support via Minimp3
2018-06-16 20:01:20 +02:00
Lennart Sauerbeck
43e161899d
Fix typo in rustdoc
2018-06-09 20:57:02 +02:00
Erin Moon
5c54078126
decoders: implement minimp3-based MP3 decoder
...
Closes #36 .
2018-05-26 18:42:22 -05:00
Erin Moon
c5725b8a37
vorbis decoder: implement filetype check and fallthrough
2018-05-26 18:42:22 -05:00
Erin Moon
73e19bad29
cargo: add feature dependency on minimp3
2018-05-26 18:42:22 -05:00
Francesco Zardi
6a8c71bdb2
Run cargo fmt
2018-04-19 10:03:48 +02:00
Francesco Zardi
255db6aa71
Use the default_output_format()
from cpal
to choose the best output format
2018-04-19 08:59:27 +02:00
Francesco Zardi
b85626b3fb
Fix the value of the silenced output for the u16 case (i.e. half of the maximum allowed value)
2018-04-19 08:59:27 +02:00
Francesco Zardi
30d601c3cd
Rename 'new_stream()' to 'new_output_stream()'
2018-04-19 08:59:27 +02:00
Francesco Zardi
5641ab56fa
Remove 'mut' keyboard from the buffer
argument of audio_callback()
2018-04-19 08:59:27 +02:00
Francesco Zardi
c554c8e1f8
Handle the case in which an StreamData::Input is passed as a buffer to audio_callback()
2018-04-19 08:59:27 +02:00
Francesco Zardi
457c8a5011
Fix typo
2018-04-19 08:59:27 +02:00
Francesco Zardi
95703113ba
Rename 'endpoint' to 'device'
2018-04-19 08:59:27 +02:00
Francesco Zardi
5f42197c77
Fix typo
2018-04-19 08:59:27 +02:00
Francesco Zardi
0a90b31380
Rename the play()
method of EventLoop
to play_stream()
2018-04-19 08:59:27 +02:00
Francesco Zardi
96d4d539b3
Rename 'voice' to 'stream'
2018-04-19 08:59:27 +02:00
Francesco Zardi
f3b1fc915e
Change the signature of audio_callback()
to accept a StreamData
enum instead of a UnknownTypeOutputBuffer
2018-04-19 08:59:27 +02:00
Francesco Zardi
9d4d9fdcac
Rename voice_id
to stream_id
2018-04-19 08:59:27 +02:00
Francesco Zardi
5d62f69223
Rename VoiceId
to StreamId
2018-04-19 08:59:27 +02:00
Francesco Zardi
ebceebb760
Rename 'endpoints' to devices'
2018-04-19 08:59:27 +02:00
Francesco Zardi
cde47ab970
Rename default_endpoint()
to, default_output_device()
, reexport default_input_device()
2018-04-19 08:59:27 +02:00
Francesco Zardi
b912730313
Rename 'Endpoint' to 'Device'
2018-04-18 20:26:54 +02:00
Francesco Zardi
ac8541ddfc
Rename UnknownTypeBuffer
to UnknownTypeOutputBuffer
2018-04-18 18:03:22 +02:00
Francesco Zardi
a959cd618b
Update comments to follow cpal` 0.7 convention
2018-04-18 14:53:04 +02:00
Francesco Zardi
95917f2e0f
Rename samples_rate.rs
to sample_rate.rs
to follow cpal
0.7 convention
2018-04-18 14:46:29 +02:00
Francesco Zardi
74ceb63c3c
Update cpal
dependency to 0.7
...
The update required adapting to the breaking changes introduced by the new version, as reported in the `cpal`'s
[changelog](a2fe9386af/CHANGELOG.md
), namely:
- Rename `ChannelsCount` to `ChannelCount`.
- Rename `SamplesRate` to `SampleRate`.
- Rename the `min_samples_rate` field of `SupportedFormat` to `min_sample_rate`
- Rename the `with_max_samples_rate()` method of`SupportedFormat` to `with_max_sample_rate()`
- Rename the `samples_rate` field of `Format` to `sample_rate`
- Changed the type of the `channels` field of the `SupportedFormat` struct from `Vec<ChannelPosition>` to `ChannelCount` (an alias to `u16`)
2018-04-18 14:24:33 +02:00
Andriy S. from cobalt
b14006ec99
have play_once fn and Decoder trait even if decoders are turned off
2017-10-29 21:18:01 +02:00
Andriy S. from cobalt
bfad440f6a
use allow attr instead of _ vars
2017-10-29 20:39:02 +02:00
Andriy S. from cobalt
2f1b3f5309
merge upstream/master
2017-10-29 18:06:20 +02:00
Andriy S. from cobalt
3ef6b0564f
make wav/flac/vorbis decoding features optional
2017-10-29 17:57:21 +02:00
tomaka
0e1ade3431
Merge pull request #142 from tomaka/cpal-rework
...
Update for cpal's rework
2017-10-21 10:04:27 +02:00
Pierre Krieger
f7473cc9fe
Fix tests
2017-10-21 09:52:59 +02:00
Pierre Krieger
8b2fab2673
Finish rework
2017-10-21 09:30:38 +02:00
Pierre Krieger
8b0a20f42e
Group the sink controls into one struct
2017-10-14 14:28:10 +02:00
Pierre Krieger
da515c65ec
[WIP] Update for cpal's rework
2017-10-14 14:22:45 +02:00
Cam Jackson
8eaba65b5d
Replace usages of deprecated functions in cpal
2017-10-11 21:31:15 +08:00
Andriy S. from cobalt
dfed9be5ce
make sure buffer doesn't contain garbage
2017-10-08 00:54:33 +03:00
Jacob Kiesel
7c8a84a867
Add empty() function to Sink
2017-08-20 09:19:13 -06:00
Pierre Krieger
45c60ca155
Add a small basic test to dynamic_mixer
2017-07-30 18:56:24 +02:00