Граф коммитов

59 Коммитов

Автор SHA1 Сообщение Дата
Matthew Gregan 7f94e27fdc Force Rust builds to always rerun cargo. 2020-03-24 13:10:11 +13:00
Jan Beich 797779866b build: sndio needs -ldl on Linux after 39d20a326f 2019-09-10 10:20:24 +12:00
Jan Beich a7ae0234e8 alsa: don't depend on libasound by default 2019-09-09 13:49:48 +12:00
Jan Beich edf8c13d00 sndio: don't depend on libsndio by default 2019-09-09 13:49:48 +12:00
Jan Beich 7b7bdfc2fe build: explicitly link sndio against -lpthread
/usr/bin/ld.bfd: libcubeb.so: undefined reference to `pthread_create'
2019-09-09 13:49:48 +12:00
Jan Beich 552454f621 build: pulse/jack use dlopen, so don't link directly 2019-09-09 13:49:48 +12:00
Jan Beich 9456b3687f build: simplify -ldl handling 2019-09-09 13:49:48 +12:00
Paul Adenot 8c3e32bd24 Remove panning API from cubeb
This is best done by the host application, and had very little
implementation anyways.
2019-08-22 10:11:25 +12:00
Paul Adenot 0b5b52d371 Link pulse when building the rust pulse backend
This fixes #480.
2019-07-19 13:45:46 +12:00
Matthew Gregan 0d1d9d84fb Link pthread when building USE_PULSE.
This was working accidentally by picking up pthread via the common
configuration including USE_ALSA.
2019-07-02 13:48:36 +12:00
nia 9f39687e7f sunaudio (NetBSD/illumos) backend (#510)
* Initial support. Device scanning and sanity checks work.

Playback and recording does not.

* stream_init fixes. Audio test now runs, though doesn't do anything.

* Set the prinfo type to the device type we'll later be limited to.

* Playback support.

Also implement stream_get_current_device and stream_device_destroy.

* AUDIO_SETINFO properly.

* Don't poll forever when recording.

Use the recommended number of latency_frames as our BUFSIZE.

* Fix typo.

* Don't allocate devid. Required for a sanity test.

* Fix some tests

* Initial attempt to support Solaris

* stdlib.h for calloc.

* undo local change

* Should probably be using "events" here, and the state change isn't
necessary now that it's done elsewhere.

* Avoid format truncation warning.

* more illumos fixes

* Performance improvements.

It seems polling for input is not a viable strategy.

* Protect volume and frames_written with a mutex.

* Protect running with a mutex.
2019-06-12 10:35:08 +12:00
Chun-Min Chang acbed7de51 Add audiounit-rust backend (#511) 2019-06-08 14:06:30 +12:00
Matthew Gregan 7b7210bf63 Link ole32 in WASAPI backend for COM symbols.
Fixes build on aarch64.  We must've been picking ole32 up implicitly on x86
platforms.
2019-04-10 10:48:54 +02:00
Alex Chronopoulos 643a4aa6d0
Cubeb app for basic testing. (#487)
* Cubeb app for basic testing.

* cubeb-test: fix windows build

* address review comments
2019-02-01 11:30:40 +02:00
Chun-Min Chang 42e931de37 Add tests for cubeb_stream_register_device_changed_callback 2019-01-06 16:52:29 -05:00
Alex Chronopoulos d4b8c31cfd Build and link pulse rust backend if available. 2018-10-18 10:18:18 +13:00
orbea 12b78c0edf cmake: Support GNUInstallDirs. 2018-07-23 15:45:18 +12:00
Jean-Yves Avenard 789eaaa3b0 Multi-channels support for windows/mac/linux (#426)
* Add QUAD and QUAD_LFE layouts.

* Remove dual mono layout.

It makes no sense to have a case for those as the data structure
used (a bitmask) do not allow to represent this channel layout (a
channel can only be present once). As such it was a non-functional
layout

* Fix up cubeb_pulse compilation using C++ keyword.

* Remove the concept of preferred layout.

Channel layout is derived by the content being played. The concept of
preferred layout is meaningless. Either we have a layout defined, or
we don't. There's no in-between.

So we remove it.

* Remove CHANNEL_MONO concept.

* Add cubeb_sample_size convenience method.

* Rework cubeb_mixer.

This completely replace the existing remixer which had serious limitations:
1- Had no memory bound checks
2- Could only downmix 5.1 and 7.1 to stereo.

This mixer allows to convert from any sane layout to any other and work directly on interleaved samples.

This cubeb_mixer doesn't have an API compatible with the previous one.

This commit is non-fonctional, and was split for ease of review.

* Fix remixing on mac, windows and pulse backend.

* Make cubeb_mixer creation infallible.

Rather than ignore nonsensical layouts, we attempt to play it according to the stream channels count instead. The audio data will be played as-is, dropping the extra channels or inserting silence where needed.

* User proper sample size when calculating offsets.

Should the user data be of a different type to what the AudioUnit output is set to, we would have written outside the end of our allocated buffer.

* Fix input mixing and clarify frames vs samples terminology

* If a layout is unknown or invalid, always treat it as plain stereo or mono.
2018-03-19 14:57:07 +01:00
Bryce Van Dyk b64824fb5d Add test to verify the behaviour a different return values for data callbacks. 2018-03-01 13:32:24 +01:00
Alex Chronopoulos 84e9568141
opensl es: remove methods relying on use of dlopen. (#412)
opensl es: add new jni files.

apply review commnets

apply jchen comments
2018-02-19 17:50:15 +02:00
Bryce Van Dyk 3f5966cdcc Add loopback test file and test for duplex stream with loopback.
Add a test file for loopback tests and add to build script. This file is
currently configured to be Windows only in build scripts, as the WASAPI backend
is currently the only backend supporting the new loopback interface.

Add a test for duplex streams using the default output device and a loopback
from the same device.
2018-01-23 08:50:28 +13:00
KO Myung-Hun ede79a76ee os2: disable visibility attribute
On OS/2, visibility attribute is not supported.
2017-10-24 15:31:45 +13:00
Sam Fuller 871456d099 CMake: Generate and install CMake config files 2017-10-09 11:48:31 +13:00
Dan Glastonbury 52b467d4f0 cubeb: Remove cubeb_util_default_device_collection_destroy(). 2017-08-29 19:05:30 +10:00
Dan Glastonbury 8b17b0e9da cubeb: Intern string support.
A simple database for interned strings.  This is to be used to provide
stable device ids in the device enumeration API.
2017-08-29 19:05:30 +10:00
endrift 16f9ccc064 Fix build on FreeBSD (#344) 2017-07-31 08:54:50 +12:00
Matthew Sitton 18153b9c79 Fix exports not being in the same directory as cubeb.h 2017-06-19 19:40:57 +12:00
Chun-Min Chang 611a2dea64 Add USE_AUDIOUNIT to test_mixer in CMakeLists if it's defined 2017-06-17 12:48:51 +12:00
Matthew Gregan 0e2467fced Remove trailing spaces in export header install command. 2017-06-08 13:41:13 +12:00
Matthew Sitton 49b0108038 Add install and option for not building tests. 2017-06-08 12:31:41 +12:00
Matthew Gregan 3c77b3b572 Include cubeb_mixer.cpp in test_mixer build. Addresses #325. 2017-06-07 16:52:39 +12:00
Dan Glastonbury 96cdb173f8 Push destroy fns to backend (#302)
* Make cubeb_device_info_destroy private.

* Move implementation of cubeb_device_collection_destroy to cubeb_utils.

* Move cubeb_device_collection_destroy implementation into backend.

Push the responsiblity for destroying device collections to the
backends so they can make independent choices on how to handle
allocation.

* Unstage space changes
2017-05-22 11:55:15 +03:00
Michael Maltese 91f801d661 CMake: allow googletest and sanitizers-cmake from parent projects
This makes it easier to embed cubeb within larger projects that already
provide googletest and/or sanitizers-cmake, by testing directly for what
is used rather than indirectly for .git folders.
2017-05-22 16:47:09 +12:00
Matthew Gregan 32fcb3a7a7 Report more missing git submodules (follow up to 978788a0). 2017-05-22 13:20:28 +12:00
Dan Glastonbury 033b736e69 Setup CMake to compile with Clang/GCC sanitizers.
See https://github.com/arsenm/sanitizers-cmake for more details.
2017-05-22 13:06:17 +12:00
Matthew Gregan 978788a060 Report missing git submodules from CMake. 2017-05-15 14:54:35 +12:00
Chun-Min Chang b6e2332ff4 Add a deadlock test on OSX (#266)
* Add a deadlock test and intentionally produce a deadlock on OSX

* Replace std::mutex by owned_critical_section

* Restore audiounit_get_preferred_channel_layout

* Revise comments

* Add more log and comments for better readability.
2017-04-07 13:23:10 +03:00
Paul Adenot ae1a4566e5 Only compile and run 'test_overload_callback' when compiling in WASAPI
This fixes #264.
2017-03-30 09:22:04 +13:00
Paul Adenot d974ad6b5f Add a way to log messages asynchronously. 2017-03-14 12:00:31 +13:00
Paul Adenot 7b082450d2 Make `stop_and_join_render_thread` more idempotent, and add a test.
This fixes Gecko bug #1345147.
2017-03-09 04:42:06 -08:00
Alex Chronopoulos 167bc2246a build: explicit option() for shared libs build 2017-02-14 15:43:26 +13:00
Alex Chronopoulos 5623cf0e4d test_mixer: add build dependency to cubeb_mixer 2017-02-09 17:04:41 +02:00
Matthew Gregan 661c653c86 wasapi: Call avrt functions directly since we only support Windows 7 upwards.
This restores the previous attempt to remove this code before BMO #1130266 took effect.

Revert "Revert "wasapi: Call avrt functions directly since we only support Vista+.""

This reverts commit 13f167c239.

Conflicts:
	src/cubeb_wasapi.cpp
2017-02-08 10:21:49 +01:00
Chun-Min Chang a900d6e511 Support multiple channels on Windows (#171)
* Multiple channel support on Windows

* Move up/down mixing code from cubeb_wasapi.cpp to standalone cubeb_mixer.cpp
2016-12-20 19:18:07 -10:00
Paul Adenot 4aa67a9a9a Implement a lock-free single consumer single producer queue. 2016-12-01 14:55:53 +13:00
Matthew Gregan 13f167c239 Revert "wasapi: Call avrt functions directly since we only support Vista+."
This reverts commit c0ec441679.

Conflicts:
	src/cubeb_wasapi.cpp
2016-11-21 07:25:59 +13:00
Matthew Gregan b6315bb886 audiotrack: Build fix for __android_log_print. 2016-11-18 18:32:21 +13:00
Matthew Gregan c0ec441679 wasapi: Call avrt functions directly since we only support Vista+. 2016-11-15 14:33:04 +01:00
Matthew Gregan 91fabe673f Disable tr1/tuple use in gtest to simplfy build configuration. 2016-11-14 17:17:00 +13:00
Matthew Gregan 8d13ede722 pulse backend requires -ldl. 2016-11-14 17:16:11 +13:00