Commit Graph

18 Commits

Author SHA1 Message Date
3f13e1cc24 cubeb_sink: Use static_cast instead of reinterpret_cast in DataCallback() (#5573)
Conversions from void* to the proper data type are well-defined and
supported by static_cast. We don't need to use reinterpret_cast here.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>

Co-authored-by: LC <712067+lioncash@users.noreply.github.com>
2020-12-07 16:06:16 +01:00
1efe80bd10 Update cubeb and request a persistent stream session 2020-10-20 11:19:58 -03:00
3d9d071262 cubeb_sink.cpp: Change one log from INFO to DEBUG level. 2020-08-20 20:22:50 +02:00
f4d0bdd09a Destroy the callback after the stream is destroyed
Prevents a crash on close if the callback was running on a different
thread.
2019-04-05 14:16:55 -06:00
7fccc995ce Initial Mic setup 2019-03-04 23:06:42 -07:00
90082268dc audio_core: Make g_sink_details internally linked
We can hide the direct array from external view and instead provide
functions to retrieve the necessary info. This has the benefit of
completely hiding the makeup of the SinkDetails structure from the rest
of the code.

Given that this makes the array hidden, we can also make the array
constexpr by altering the members slightly. This gets rid of several
static constructor calls related to std::vector and std::function.

Now we don't have heap allocations here that need to occur before the
program can even enter main(). It also has the benefit of saving a
little bit of heap space, but this doesn't matter too much, since the
savings in that regard are pretty tiny.
2018-12-16 02:44:04 +01:00
b4062abc11 cubeb_sink: ignore null-name device when selecting
We already ignore them on listing devices. We should do the same when selecting devices. This fix a crash when opening a specific device while there is a null device in the list
2018-10-26 09:17:44 -04:00
bcb1aaf05c cubeb_sink: Get rid of variable shadowing within CubebSink's constructor
The parameter of the lambda was shadowing the variable that was being
assigned to.
2018-09-22 12:55:40 +02:00
a6cf2e1f9d cubeb_sink: Improve logging 2018-09-09 08:37:34 +01:00
f34711219a audio_core: Simplify sink interface 2018-09-08 22:09:26 +01:00
7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
7daed185cb cubeb_sink: Protect queue against multithreaded access 2018-08-31 18:44:19 +01:00
7d642b25e9 sink: Make auto device name a constant 2018-07-12 15:56:37 +01:00
d269beab0d sink_details: Listing available devices should be separate from sink construction 2018-07-02 14:09:17 +01:00
05fc17b88a sink: Remove unnecessary SetDevice method
Unused, doesn't do anything.
2018-07-02 13:23:40 +01:00
7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
04139e26bd cubeb_sink: Skip devices without a name
Previously this would crash.
2018-05-31 21:01:48 -05:00
af73dd45f0 audio_core: Implement a cubeb audio sink 2018-05-31 21:01:48 -05:00