Commit graph

164 commits

Author SHA1 Message Date
Pierre Krieger
2d2b5b54a2 Minor changes to the engine 2016-09-06 09:32:17 +02:00
Pierre Krieger
7347f18289 Switch to futures 2016-09-06 09:32:17 +02:00
Vadim Petrochenkov
29ab9a158c Fix a private-in-public error
Fix deprecation warning for `thread::park_timeout_ms`
2016-09-04 16:39:19 +03:00
tomaka
9c029bf3c3 Fix travis build 2016-05-19 18:28:36 +02:00
Pierre Krieger
a4a8497707 Fix mixing taking the average of the sounds 2015-10-23 17:20:41 +02:00
Pierre Krieger
b27f0a87cc Rewrite Repeat to use Buffered 2015-10-23 16:29:14 +02:00
Pierre Krieger
5d58d9188f Add some docs at various places 2015-10-22 20:30:07 +02:00
Pierre Krieger
069faf762d Add a DecoderError and publish 0.3 2015-10-22 16:45:33 +02:00
Pierre Krieger
aa531d8e8d Add Source::reverb 2015-10-22 16:37:01 +02:00
Pierre Krieger
8912ff3b57 Add Source::mix() 2015-10-22 16:22:14 +02:00
tomaka
01d9e582f2 Merge pull request #54 from tomaka/clone-debug
Derive Clone and Debug on most iterators
2015-10-22 15:46:49 +02:00
Pierre Krieger
0603bad9a4 Derive Clone and Debug on most iterators 2015-10-22 15:43:40 +02:00
Pierre Krieger
af89f60998 Add Source::buffered() 2015-10-22 15:39:40 +02:00
Pierre Krieger
73e1c56746 Add .speed() to Source 2015-10-17 13:46:54 +02:00
Pierre Krieger
e5f14bed1a Add face_in() to Source 2015-10-17 09:58:36 +02:00
Pierre Krieger
d26d413cb8 Add amplify() to Source 2015-10-17 08:42:04 +02:00
tomaka
e778c8b6b4 Fix norun -> no_run 2015-10-16 19:38:52 +02:00
Pierre Krieger
2a8a57b25a Add Source::delay 2015-10-16 19:10:11 +02:00
Pierre Krieger
4b4f900ba9 Fix the warnings in nightly 2015-10-16 17:33:58 +02:00
Pierre Krieger
e2f834da9b Add source::SineWave 2015-10-16 17:09:04 +02:00
Pierre Krieger
10a8c62169 Add documentation 2015-10-16 16:48:40 +02:00
Pierre Krieger
d589b82215 Add take_duration() to Source 2015-10-16 16:40:08 +02:00
Pierre Krieger
c67362a999 Dispatch source.rs between various submodules 2015-10-16 16:13:24 +02:00
Pierre Krieger
1f3eefd863 Add repeat_infinite to Source 2015-10-16 16:08:52 +02:00
Pierre Krieger
188032f843 Remove the play function 2015-10-16 15:39:00 +02:00
Pierre Krieger
a23aeaa4ff Dropping the Sink now stops all sounds 2015-10-16 15:38:10 +02:00
Pierre Krieger
d786f79e02 Change get_remaining_duration_ms to get_min_remaining_duration 2015-10-16 15:30:04 +02:00
Pierre Krieger
e2fc982652 Duration more or less works again 2015-10-16 15:28:13 +02:00
Pierre Krieger
efc00ff834 Rename Handle to Sink and add methods 2015-10-16 15:14:56 +02:00
Pierre Krieger
dad2088c39 Allow adding other sounds behind existing sounds 2015-10-16 15:11:54 +02:00
Pierre Krieger
0d96bd3883 Remove mentions of ExactSizeIterator 2015-10-16 14:25:03 +02:00
Pierre Krieger
9ff58ca760 Revert previous commit 2015-10-16 14:23:34 +02:00
Pierre Krieger
85ee95d269 Ensure that get_current_frame_len never returns 0 2015-10-16 14:22:53 +02:00
Pierre Krieger
ce0165a0de Restore the vorbis decoder 2015-10-16 14:21:37 +02:00
Pierre Krieger
9d80295d5d Better duration handling 2015-10-16 14:02:44 +02:00
Pierre Krieger
d3052bc986 Add play() and make the decoder public 2015-10-16 13:43:23 +02:00
Pierre Krieger
5ab65b7a31 Hide the implementation of the decoder 2015-10-16 13:42:57 +02:00
Pierre Krieger
2e09c3494d Remove the Decoder trait and switch to the Source trait 2015-10-16 13:35:30 +02:00
Pierre Krieger
102ec8fd2c Add the Source trait and UniformSourceIterator 2015-10-16 13:11:37 +02:00
Pierre Krieger
4173ba5a08 Use at least a quality of 44100 2015-09-27 19:21:10 +02:00
Pierre Krieger
c20ff8aa99 Improve timing system again 2015-09-27 14:49:53 +02:00
Pierre Krieger
53143b5f02 Restrict the format to 2 channels 2015-09-27 14:31:23 +02:00
Pierre Krieger
6932fb553d Add a small TODO 2015-09-27 13:49:12 +02:00
Pierre Krieger
5846d64240 Round up number of samples to next period 2015-09-27 13:47:07 +02:00
Pierre Krieger
5d639fa3c1 Filter formats with more than 7 channels 2015-09-27 13:33:03 +02:00
Pierre Krieger
ac3b7c964a Initialize each new voice with one period of 0s 2015-09-27 13:31:51 +02:00
Pierre Krieger
8503bc2f8a Fix period not being taken into account 2015-09-27 13:12:09 +02:00
Pierre Krieger
d3a554b146 Better format choice, part 2 2015-09-27 12:05:55 +02:00
Pierre Krieger
e765a088f1 Better choose the voice format 2015-09-27 11:57:55 +02:00
Pierre Krieger
010f80d082 Fix ALSA stuttering 2015-09-27 11:49:53 +02:00
Pierre Krieger
114509fc24 Fix loop to be more precise 2015-09-27 11:43:23 +02:00
Pierre Krieger
4806aebf61 Arc<Decoder> -> Box<Decoder> 2015-09-27 11:30:27 +02:00
Pierre Krieger
95b2f5a45e Fix the wav decoder 2015-09-27 10:50:11 +02:00
Pierre Krieger
0050b5b4ba Remove debug println 2015-09-27 10:43:46 +02:00
Pierre Krieger
112c8c94e5 Use a proper type for WAVE decoding instead of a Box 2015-09-27 10:41:46 +02:00
Pierre Krieger
007c0d4634 Fix attempt for the compilation failure on stable/beta 2015-09-27 10:28:13 +02:00
Pierre Krieger
f339184d75 Fix all warnings 2015-09-27 10:24:41 +02:00
Pierre Krieger
e8d7a42db4 Correctly handle the voices' formats 2015-09-27 10:22:39 +02:00
Pierre Krieger
4671ed2678 Use a constant for the engine loop duration 2015-09-27 10:10:33 +02:00
Pierre Krieger
bc6f78de4c Handle the volume in the engine core instead of the decoders 2015-09-27 10:04:32 +02:00
Pierre Krieger
92a4567f08 Start using one voice per endpoint and mixing samples manually 2015-09-27 09:56:29 +02:00
Pierre Krieger
a6b5197a59 Use loops of 17ms 2015-09-27 08:58:40 +02:00
Pierre Krieger
b1a1d5babd Fix amplify for u16s 2015-09-24 17:35:51 +02:00
Pierre Krieger
7e11134546 Fix samples rate converter to not crash at end of sound 2015-09-24 16:39:29 +02:00
Pierre Krieger
8a7db27e7f More work towards correctness 2015-09-24 16:37:19 +02:00
Pierre Krieger
aad266ba83 Rework the samples rate converter 2015-09-24 15:53:04 +02:00
Pierre Krieger
11494cfb4a Fix the length tests 2015-09-24 15:32:14 +02:00
Pierre Krieger
9231a092d1 Fix the downsampling test 2015-09-24 14:49:22 +02:00
tomaka
9c9d5c1591 Merge pull request #27 from tomaka/tests-fixezs
Added various tests and fixes
2015-09-24 13:56:41 +02:00
Pierre Krieger
0347308e49 Added various tests and fixes 2015-09-24 13:49:14 +02:00
Pierre Krieger
43171fab08 Remove sounds that are finished playing 2015-09-24 12:56:36 +02:00
tomaka
8f623f757c Merge pull request #24 from tomaka/fix-warnings
Fix warnings
2015-09-23 18:32:27 +02:00
Pierre Krieger
86eab17039 Fix the vorbis decoder 2015-09-23 17:11:44 +02:00
Pierre Krieger
4ca0c7f42a Fix warnings 2015-09-23 10:57:43 +02:00
Pierre Krieger
5060063e5d Also add get_total_duration_ms() 2015-09-23 10:47:15 +02:00
Pierre Krieger
5c68d37055 Add Handle::sleep_until_end and rework decoder handling 2015-09-23 10:33:45 +02:00
Pierre Krieger
06efd2f53d Optimize the samples rate converter 2015-09-22 22:16:55 +02:00
Pierre Krieger
0f77a93caa Fix the sleep duration of the engine 2015-09-22 22:01:39 +02:00
Pierre Krieger
ba13cb3da0 Fix samples rate converter not working when from == to 2015-09-22 21:47:09 +02:00
Pierre Krieger
65f699038d Remove a debugging println! 2015-09-22 21:21:26 +02:00
tomaka
5058b708a8 Merge pull request #19 from tomaka/prefer-wav-format
Prefer the more lightweight compatible format for WAV
2015-09-22 21:09:28 +02:00
Pierre Krieger
0ba1f4ee4e Prefer the more lightweight compatible format for WAV 2015-09-22 20:24:34 +02:00
Pierre Krieger
5848128386 Fix wav waiting time and improve background thread sleeping functionnality 2015-09-22 17:58:03 +02:00
tomaka
930f9b30e9 Merge pull request #16 from tomaka/faster-format-determination
Faster format determination for wav files
2015-09-22 16:59:02 +02:00
Pierre Krieger
24252a64fe Faster format determination for wav files 2015-09-22 16:49:36 +02:00
Pierre Krieger
c7f2c9918d Improve the samples rate converter's performances 2015-09-22 11:54:23 +02:00
Pierre Krieger
f090ee34e7 Fix the engine sleeping system 2015-09-22 11:49:15 +02:00
Pierre Krieger
580e0c4309 Fix samples rate converter not taking interleaved channels into account 2015-09-22 11:20:08 +02:00
Pierre Krieger
df594742ce Add comment 2015-09-22 11:06:41 +02:00
Pierre Krieger
03e2bbf287 Fix samples being dropped out 2015-09-22 11:04:38 +02:00
Pierre Krieger
cefae3aa51 Reorganize the conversions module 2015-09-11 16:52:44 +02:00
Pierre Krieger
338114d93e Add set_volume to Handle 2015-09-11 13:49:07 +02:00
tomaka
b088c15740 Merge pull request #8 from tomaka/optimize-channels-converter
Optimize the channels counter converter
2015-09-11 12:50:59 +02:00
Pierre Krieger
c5d3e1fb33 Optimize the channels counter converter 2015-09-11 12:05:07 +02:00
Pierre Krieger
b0652147c2 Use hound from crates.io 2015-09-11 11:57:02 +02:00
Pierre Krieger
eb391dd089 Add #[inline] attributes 2015-09-11 11:54:38 +02:00
tomaka
6feffedcc4 Merge pull request #6 from tomaka/better-gcd
Better method to calculate gcd
2015-09-11 11:53:51 +02:00
Pierre Krieger
7dfe06396c Add comments 2015-09-11 11:50:41 +02:00
Pierre Krieger
94c1ee5f42 Optimize the samples rate converter 2015-09-11 11:44:42 +02:00
Pierre Krieger
d749ea8a9e Better method to calculate gcd 2015-09-11 11:05:15 +02:00