Commit Graph

157 Commits

Author SHA1 Message Date
Ronald Kinard fd50a113a1 Revert "coreaudio: Add support for U16/I16 PCM formats."
This reverts commit bdef4fb3fe.
2015-09-24 12:54:54 -05:00
Ronald Kinard bdef4fb3fe coreaudio: Add support for U16/I16 PCM formats.
The conversion is done Rust-side instead of using AUHAL's
automatic conversion because I haven't gotten around generics
issues yet.
2015-09-23 23:19:29 -05:00
Ronald Kinard 54fb5b03cc Set coreaudio sample rate to 44100.
This makes rodio demos work correctly!
2015-09-23 22:23:57 -05:00
Ronald Kinard dbf9ae20da Make coreaudio Voice Send/Sync. 2015-09-23 22:14:32 -05:00
Ronald Kinard c841be235c Restore CoreAudio support after API overhaul. 2015-09-23 22:02:28 -05:00
Pierre Krieger 6bd28231ec Make sure that all writes succeed 2015-09-22 21:01:26 +02:00
Pierre Krieger 5fc346b34b Make the ALSA implementation more robust by recovering from underruns 2015-09-22 20:20:17 +02:00
Pierre Krieger 44e9dce43f Add Voice::get_pending_samples 2015-09-22 17:59:36 +02:00
Pierre Krieger 33dc72ab45 Add device name on WASAPI 2015-09-22 16:05:40 +02:00
Pierre Krieger 5fa41538a6 Various ALSA fixes 2015-09-22 15:46:56 +02:00
tomaka 0a13991f86 Merge pull request #75 from tomaka/alsa-format
Use the correct format in ALSA
2015-09-22 15:23:28 +02:00
Pierre Krieger 46151e09cc Use the correct format in ALSA 2015-09-22 15:20:11 +02:00
Pierre Krieger a2b8b4f4a7 Use the correct device name when enumerating formats 2015-09-22 15:12:41 +02:00
Pierre Krieger 73906885f9 Fix bug and filter out devices that are not "Output" 2015-09-22 15:04:32 +02:00
tomaka debb6c957c Merge pull request #73 from tomaka/example-enumerate
Example enumerate
2015-09-22 14:49:31 +02:00
Pierre Krieger ec48453b6f Add endpoint::get_name() and an enumerate example 2015-09-22 14:46:27 +02:00
tomaka d4c7d91fd7 Merge pull request #63 from tomaka/alsa-formats
Correctly enumerate supported formats on ALSA
2015-09-22 13:56:22 +02:00
Pierre Krieger 8d21f5ff25 Store the format in the public `Voice` struct 2015-09-22 13:34:06 +02:00
Pierre Krieger d0e5e7f4e6 General WASAPI cleanup 2015-09-22 13:26:22 +02:00
Pierre Krieger de0236b3b0 Fix the hack in the WASAPI implementation 2015-09-22 10:26:11 +02:00
tomaka d3e610a614 Merge pull request #64 from tomaka/underflowed
Add an underflow() method to Voice
2015-09-22 10:02:41 +02:00
tomaka 826ad84db4 Merge pull request #66 from tomaka/inline
Add #[inline] attributes
2015-09-22 10:01:59 +02:00
Peter Atashian 61ac0528e7 Update winapi dependency
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-09-17 14:22:52 -04:00
Peter Atashian 5b1291c215 Unused extern crate libc
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-09-17 06:29:13 -04:00
Pierre Krieger 75f828b04f Add #[inline] attributes 2015-09-11 10:55:29 +02:00
Pierre Krieger 3dd7a8abe7 Add UnknownBufferType::len() 2015-09-10 21:24:41 +02:00
Pierre Krieger c5e2cdd3c5 Add an underflow() method to Voice 2015-09-10 21:03:40 +02:00
Pierre Krieger c5f51183f4 Correctly enumerate supported formats on ALSA 2015-09-10 19:48:39 +02:00
Pierre Krieger d9eae23023 Restore the null implementation and compile it every time 2015-09-10 18:42:42 +02:00
Pierre Krieger 541af2f7f2 Fix compilation on ALSA 2015-09-10 12:43:37 +02:00
Pierre Krieger 48282a068d Handle channels positionning 2015-09-10 11:44:19 +02:00
Pierre Krieger d7a31b4762 Fix doctests 2015-09-01 17:47:55 +02:00
Pierre Krieger 3db17889a4 Make ALSA compile again 2015-09-01 17:15:49 +02:00
Pierre Krieger 078769dbbd Enable 32bits samples with WASAPI 2015-09-01 15:58:22 +02:00
Pierre Krieger 77fb55329e Better error handling in format detection 2015-09-01 15:33:44 +02:00
Pierre Krieger dc08fc4652 Now decoding the format from the WAVEFORMAT returned by the winapi 2015-09-01 15:32:03 +02:00
Pierre Krieger bf20431901 Handle F32 formats in Voice::new 2015-09-01 14:51:35 +02:00
Pierre Krieger 52052b6d07 Use the format passed as parameter in Voice::new 2015-09-01 14:26:25 +02:00
Pierre Krieger 98b931edff Add proper error handling 2015-09-01 14:17:57 +02:00
Pierre Krieger 1985c346ac Add supported formats enumeration 2015-09-01 13:53:54 +02:00
Pierre Krieger 47f966bf75 Correctly enumerate audio devices (core + wasapi) 2015-09-01 11:29:00 +02:00
Pierre Krieger ca72d1d67e Remove the conversion system 2015-08-20 14:44:23 +02:00
Mariusz Ceier 55eec8567e Add more detailed message to panic
When samples format is not supported, cpal panics with "not yet implemented" message, which is not useful in bug reports.
This adds samples format to the message.

Signed-off-by: Mariusz Ceier <mceier+cpal@gmail.com>
2015-08-18 08:54:40 +02:00
Ronald Kinard 6389ab3ece Remove use of box syntax.
Allows build on stable/beta rust.
2015-07-25 17:13:51 -05:00
Ronald Kinard 157011182a Add box syntax feature annotation.
Fixes build.
2015-07-25 17:08:31 -05:00
Pierre Krieger 2f36175d96 Fix samples signs on win32 2015-07-22 14:28:45 +02:00
Pierre Krieger c71d9d74b3 Merge branch 'sample-format' of https://github.com/kmcallister/cpal into fix-signed 2015-07-22 14:28:13 +02:00
Pierre Krieger 48b7278254 Fix the win32 build 2015-07-20 19:06:58 +02:00
Pierre Krieger b813aa168a Calls to a single ALSA channel are not thread safe 2015-06-24 15:17:52 +02:00
Peter Atashian 618ef2a4f9 Use shiny new COM
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-05-27 12:24:14 -04:00
Pierre Krieger d85f969caf Rustup and version bumps 2015-04-20 09:30:36 +02:00
Pierre Krieger 07b2009dae Update for Rustc 1.0.0 beta 2015-04-04 09:22:23 +02:00
Pierre Krieger 93073f1ff7 Update for change in rustc and winapi 2015-03-30 11:19:03 +02:00
Pierre Krieger a6c1b14d66 Rustup 2015-03-26 10:03:40 +01:00
Pierre Krieger 84326cb4a7 Rustup 2015-03-25 13:50:52 +01:00
mitchmindtree 1d66e18d7e Fixed coreaudio callback to send proper buffersize, removed code in lib where sampleformat affected buffersize 2015-03-03 18:17:21 +11:00
mitchmindtree 1347c7c99d Removed core_audio-sys local bindings in favour of new coreaudio-rs crate 2015-03-01 05:50:29 +11:00
mitchmindtree d6470de74c Properly shutdown the AudioUnit on drop 2015-02-28 06:43:15 +11:00
mitchmindtree f212d85889 OSX support via the Apple Core Audio, Audio Unit C API. Only supports f32 so far. 2015-02-28 06:05:24 +11:00
Keegan McAllister 8692eb2fc6 Correct reported ALSA sample format 2015-02-24 14:02:22 -08:00
mitchmindtree 2b86445c9a Merge remote-tracking branch 'upstream/master'
merging with upstream changes
2015-02-23 00:50:10 +11:00
mitchmindtree c9fe2a132a Commiting pre-merge 2015-02-23 00:50:06 +11:00
Pierre Krieger 28bd368658 Update for rustc 2015-02-22 11:24:49 +01:00
Pierre Krieger 0fa579d885 Update for rustc 2015-02-19 21:22:22 +01:00
Pierre Krieger 2e6143269a Update for rustc 2015-01-29 14:57:11 +01:00
Pierre Krieger 284f12f1cb Update for winapi 2015-01-20 16:45:47 +01:00
Pierre Krieger 48efe03661 Add a "null" implementation for platforms that aren't supported 2015-01-09 22:52:12 +01:00
Pierre Krieger 2bc50adf4d Update for rust-1.0 alpha 2015-01-09 21:25:51 +01:00
Pierre Krieger 23e1e0639c Update for Rustc 2015-01-08 21:24:04 +01:00
Pierre Krieger 420a0f0fd4 Update for rustc 2015-01-05 10:52:59 +01:00
Pierre Krieger 7adfdb4461 Update for changes in rustc 2014-12-30 08:35:13 +01:00
Pierre Krieger 7389ebf84b Add `#[must_use]` marker for Buffer 2014-12-26 10:39:19 +01:00
tomaka 73cd809636 Merge pull request #5 from tomaka/add-play-pause
Add play() and pause() functions
2014-12-23 15:28:43 +01:00
Pierre Krieger d947014084 Add play() and pause() functions 2014-12-23 15:25:25 +01:00
tomaka 0f76134359 Merge pull request #8 from tomaka/clean-convert-samples
Cleanup and add tests for convert_samples_rate
2014-12-23 15:02:26 +01:00
Pierre Krieger 6f01c38a62 Implement f32 to i16 and f32 to u16 conversions 2014-12-22 16:35:10 +01:00
Pierre Krieger aa83f64443 Cleanup and add tests for convert_samples_rate 2014-12-22 16:31:37 +01:00
Pierre Krieger fb11478bf6 Cleanup and add tests for convert_channels 2014-12-22 15:34:18 +01:00
Pierre Krieger 56cb67989e Update for rustc 2014-12-20 18:55:44 +01:00
Pierre Krieger e607e65379 Improve documentation 2014-12-17 09:45:14 +01:00
Pierre Krieger 04f9aac2c3 Rename `Channel` to `Voice` 2014-12-17 09:16:26 +01:00
Pierre Krieger 094dbef0e4 Add some documentation 2014-12-17 09:13:58 +01:00
Pierre Krieger f096a3b3a9 Add fixes and tests for samples conversions 2014-12-17 09:08:13 +01:00
Pierre Krieger 9721004ad0 Use Cow for formats conversions to avoid an allocation and copy 2014-12-17 08:53:09 +01:00
Pierre Krieger f4ac8a5492 Implement all samples formats 2014-12-17 08:47:19 +01:00
Pierre Krieger d3d6dd94db Implement samples formats conversions 2014-12-17 08:39:00 +01:00
Pierre Krieger c2ed846765 Add basic implementation for alsa 2014-12-16 16:54:58 +01:00
Pierre Krieger 302a1941ab Fix warnings 2014-12-15 16:41:57 +01:00
Pierre Krieger d06a67a97b Fix PCM formats conversions not working 2014-12-15 16:40:55 +01:00
Pierre Krieger 49636365d8 Switch back to using buffers 2014-12-15 16:32:13 +01:00
Pierre Krieger 1a556514b0 Sound output now works correctly 2014-12-15 16:26:55 +01:00
Pierre Krieger 9598f68d3c Minor fixes 2014-12-15 16:06:37 +01:00
Pierre Krieger 5c6fa4384f Fix issue when calling `buffer.samples()` multiple times with the same buffer 2014-12-15 15:48:30 +01:00
Pierre Krieger e26a8c4cb2 Minor nitpicking 2014-12-15 15:40:30 +01:00
Pierre Krieger 04d07c27dc Modify API to use a "samples" iterator 2014-12-15 15:29:59 +01:00
Pierre Krieger 081912c5fb Implement some samples rate conversions 2014-12-15 11:58:52 +01:00
Pierre Krieger 32bca93cc9 Implement some basic data conversion 2014-12-15 11:45:38 +01:00
Pierre Krieger b23857a57c Restore variable input format system 2014-12-15 10:29:29 +01:00
Pierre Krieger f00bb5a2b8 Update for rustc 2014-12-15 10:16:18 +01:00
Pierre Krieger b4b75f526a Remove old code 2014-12-11 19:42:49 +01:00