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

1565 Коммитов

Автор SHA1 Сообщение Дата
Matthew Gregan b9e2c50e51
wasapi: Add flag to disable default device switching. (#507)
This has been merged in Gecko via BMO# 1427011 for quite some time.
2019-05-17 09:21:59 +12:00
achronop 64aa80f330 wasapi: notify when a device is disabled. BMO 1546872 2019-04-25 17:32:33 +02:00
Alex Chronopoulos 3570749942 wasapi: tie monitor lifetime with notification client lifetime. BMO 1545279 (#505)
wasapi: tie monitor lifetime with notification client lifetime. BMO 1545279
2019-04-24 13:04:01 +12:00
Alex Chronopoulos 162625ac91
test: add option to get the posotion of a stream (#504)
* test: add option to get the posotion of a stream

* Correct the errom message
2019-04-23 12:27:14 +03:00
Paul Adenot 241e3c7b8a Bug 1531833 - Only call opensl API when supported. r?achronop
Differential Revision: https://phabricator.services.mozilla.com/D27572
2019-04-16 17:39:01 +02:00
Chun-Min Chang 60084ea039 Replace 0 by kAudioObjectUnknown 2019-04-15 12:08:49 +02:00
Paul Adenot a609b30ab8 Failing to set the input type on an input stream on OpenSL ES should not be fatal
This allows supporting ancient Android versions.
2019-04-15 12:08:37 +02:00
Paul Adenot c0a71704ae Bug 1531833 - Add a cubeb pref to indicate the this audio input and output streams will transport voice. r?kinetik 2019-04-10 18:19:29 +02:00
Paul Adenot c2ed6c9e44 Bug 1531833 - Make setting the performance mode in OpenSL ES a non fatal error, it's not available on some Android versions that are supported. r?achronop
Differential Revision: https://phabricator.services.mozilla.com/D26727
2019-04-10 18:19:29 +02:00
Paul Adenot 751df98bd5 Bug 1531833 - Don't query the audio output latency at runtime, and use alternate latency querying method if available. r?achronop
Differential Revision: https://phabricator.services.mozilla.com/D23166
2019-04-10 18:19:29 +02:00
Paul Adenot 5f56039482 Bug 1531833 - Set the Android audio performance mode based on the requested latency. r?achronop
Differential Revision: https://phabricator.services.mozilla.com/D21747
2019-04-10 18:19:29 +02:00
Paul Adenot 7ce499eb26 Bug 1531833 - Set the right type for audio output streams on Android, depending on if it's outputing voice data. r?achronop
Differential Revision: https://phabricator.services.mozilla.com/D21746
2019-04-10 18:19:29 +02:00
Paul Adenot 4b53522e8f Bug 1531833 - Use the configuration interface on Android to pick the right microphone for the usage when recording audio in cubeb_opensl.c. r?achronop
Differential Revision: https://phabricator.services.mozilla.com/D21745
2019-04-10 18:19:29 +02:00
Paul Adenot 040e82357a Bug 1531833 - Automatically count the number of elements in the interface array for recording in cubeb_opensl.c. r?achronop
Differential Revision: https://phabricator.services.mozilla.com/D21744
2019-04-10 18:19:29 +02:00
Paul Adenot 8b7e9c8efe Bug 1531833 - Store whether a cubeb stream on Android is for voice. r?achronop
Differential Revision: https://phabricator.services.mozilla.com/D21743
2019-04-10 18:19:29 +02:00
Paul Adenot 86f8d957c9 Bug 1531833 - Only use two buffers instead of four in OpenSL ES backend for cubeb. r?achronop
This is what Oboe does.

Differential Revision: https://phabricator.services.mozilla.com/D21742
2019-04-10 18:19:29 +02:00
Paul Adenot 132abe0605 Bug 1531833 - Update vendored sles_definitions.h in cubeb with more recent API. r?snorp
I'm just copying this from the NDK, but keeping our notice.

Differential Revision: https://phabricator.services.mozilla.com/D21740
2019-04-10 18:19:29 +02:00
Paul Adenot 9f4f298632 Bug 1531833 - When doing a voice call on Windows, prefer the default communication devices. r?kinetik
Differential Revision: https://phabricator.services.mozilla.com/D21739
2019-04-10 18:19:29 +02: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
Chun-Min Chang a4b68f3c8e audiounit: correct various typos (#494) 2019-04-05 08:11:48 +13:00
Alex Chronopoulos 66d9c48d91
audiounit: replace assert check with error handling. BMO 1541101 (#499) 2019-04-03 12:41:20 +03:00
Chun-Min Chang f8a6768684 Make sure data_callback and state_callback are not null (#496)
* Make sure data_callback and state_callback are not null

* Check callbacks are valid in cubeb.c

* Initialize stream with non-null callbacks
2019-03-30 10:17:03 +13:00
Chun-Min Chang 681d4b7ee6 Release the CFStringRef object when it's no longer needed 2019-03-11 15:12:10 -04:00
Chun-Min Chang b0140a50bf Release the dispatch queue when cubeb context is destroyed
The dispatch queue created within the cubeb context should be released when it's no longer needed, or the allocated memory of the queue will be leaked if it's not deallocated. The memory of the dispatch queue is allocated when the cubeb context is created, so the memory should be deallocated when the cubeb context is destroyed.
2019-03-11 15:12:10 -04:00
Matthew Gregan 6f2420de8f
wasapi: Assert COM is initialized in wasapi_init. (#493)
Per cubeb.h#L414, COM must be initialized by the caller before calling
cubeb_init.

This assert is intended to avoid unintentional fallback to the winmm backend
when the caller forgot to initialize COM before calling cubeb_init.
2019-02-25 12:18:56 +13:00
Alex Chronopoulos 3afc335006 wasapi: implement device collection changed callback (#488)
Add a new thread to the cubeb context that waits on events for input/output device collection changes and executes the user supplied callback(s) from this thread.  Register a new notification client as necessary when user callbacks are registered and dispatch callbacks to cubeb's thread via events.
2019-02-13 10:28:58 +13:00
achronop ca8edc6dec cubeb-test: add options to enable/disable logs. 2019-02-08 07:49:47 +13:00
Alex Chronopoulos 883f47f424
cubeb-test: improvements for testing collection changed callback (#489)
* cubeb-test: improvements for testing collection changed callback

* Apply review comments
2019-02-05 12:17:08 +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
Alex Chronopoulos feec7e2e89 pulse: use WRAP macro around the new method. 2019-01-23 17:15:35 +02:00
Alex Chronopoulos 9a8e02e751
pulse: guess default layout when it is not configured (BMO 1518106). (#486) 2019-01-22 10:07:27 +02:00
Alex Chronopoulos 67d37c16be Add cubeb_stream_params::layout in the code example 2019-01-21 14:41:14 +02:00
Jamen Marz 54925f84f1 Fix example code using nonexistent output buffer. (#485) 2019-01-16 09:44:49 +02:00
Paul Adenot d5254913ed fix typo. 2019-01-09 12:57:31 +01:00
Alex Chronopoulos b37a9c0a36 pulse: add some extra logs at stream init/destroy/start/stop 2019-01-09 12:57:31 +01:00
Alex Chronopoulos d9a32d7e54 audiounit: stop leaking after calling audiounit_create_device_from_hwdev. Fixes #482 2019-01-07 15:12:40 -05:00
Chun-Min Chang 8c3a32e9f4 Make sure no active device changed callback when registering a new one 2019-01-06 16:52:29 -05:00
Chun-Min Chang 42e931de37 Add tests for cubeb_stream_register_device_changed_callback 2019-01-06 16:52:29 -05:00
Chun-Min Chang 008732ef72 trivial test to check if cubeb_stream_get_latency is callable (for Rust implementation) 2018-12-17 15:25:45 -05:00
Chun-Min Chang 5f025918a8 Remove misleading comments 2018-12-17 15:25:45 -05:00
Jean-Yves Avenard e5c3a1d8a6
Merge pull request #477 from jyavenard/1509875
Don't use PLII matrices when downmixing.
2018-11-29 18:20:54 +01:00
Jean-Yves Avenard 505fb31cf7 Don't use PLII matrices when downmixing.
PLII mix the opposed channel with the reversed phase. It doesn't sound good when used with a common stereo headset; like the left rear channel sounds too much like it's also coming from the right. Additionally, it clips significantly causing unwanted distortion. So we default to a simpler conversion instead: left goes to left only, same for the right channel.

(Part of the fix for BMO 1509875)

Fixes #476
2018-11-28 22:38:26 +01:00
Alex Chronopoulos 9a7a55153e osx: check null reference before using the string (BMO 1502165). 2018-10-30 09:05:26 +13:00
Alex Chronopoulos 04d58b6605 osx: close the stream before calling setup (BMO 1500109) 2018-10-24 08:43:52 +13:00
Alex Chronopoulos 262aea3075 doc: update docs for register collection changed callback. Fixes 42 2018-10-24 07:52:42 +13:00
Alex Chronopoulos a68892dff7
pulse: separate input output callbacks for collection changes (BMO 1498242). 2018-10-19 12:17:40 +02:00
Alex Chronopoulos ef8f8cb804
audiounit: separate input output callbacks for collection changes (BMO 1498242) (#465)
* audiounit: separate input output callbacks for collection changes (BMO 1498242)

* Apply review comments so far

* More review comments
2018-10-19 12:16:10 +02:00
Alex Chronopoulos 5066cfcf42
tests: check correctly the audio buffer values range (BMO 1484541). (#461)
* tests: check correctly the audio buffer values range (BMO 1484541).

* tests: create a comfortable way to enable logs in tests

* duplex test: check audio range correctly and change the input channel to stereo to avoid AD mixer (BMO 1484541).

* test_duplex: Revert back input channel to mono
2018-10-18 16:57:01 +02:00
Alex Chronopoulos d4b8c31cfd Build and link pulse rust backend if available. 2018-10-18 10:18:18 +13:00
Alex Chronopoulos 455981555e
audiounit: report removed devices correctly (BMO 1491152) (#463)
* audiounit: report removed devices correctly (BMO 1491152)

* Update review comments
2018-10-11 18:48:08 +03:00