Commit Graph

11 Commits

Author SHA1 Message Date
Frediano Ziglio
35be203f42 snd_codec: Use better type for snd_codec_create mode
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Julien Ropé <jrope@gmail.com>
2020-07-07 13:09:38 +01:00
Frediano Ziglio
283d82b0a3 snd_codec: Use better type for function result
Instead of just plain preprocessor macros use an enum.
This is more type safe and could produce better debugging
type information.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Julien Ropé <jrope@gmail.com>
2020-07-07 13:09:36 +01:00
Frediano Ziglio
8d9a79dd7d snd_codec: Use better types for snd_codec_is_capable
mode should be an enumeration value of SpiceAudioDataMode.
Return type is just a boolean.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Julien Ropé <jrope@gmail.com>
2020-07-07 13:09:14 +01:00
Victor Toso
31a14b20d0 sound: remove celt support
Follow up of spice-protocol's deprecation of celt mode.
See: https://gitlab.freedesktop.org/spice/spice-protocol/-/merge_requests/15

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-17 16:38:10 +00:00
Frediano Ziglio
35f45282d4 snd_codec: Update field names in function documentation
in_data field was renamed to in_ptr.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Julien Rope <jrope@redhat.com>
2020-02-07 17:07:57 +00:00
Frediano Ziglio
f3d6c5f322 snd_codec: Do not include not needed headers
Include headers required for implementation only in the
implementation file.
This remove dependency and avoid the user component having to
check for header flags (in this case HAVE_CELT051 and HAVE_OPUS).
This make easier integration in other components.
This also make compilation faster.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-02-06 19:26:21 +00:00
Frediano Ziglio
da6a405f25 snd_codec: Avoid some useless casts declaring struct type
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2019-12-15 21:24:27 +00:00
Christophe Fergeau
f90ab1f19b snd: Replace spice_printerr() use with g_warning
This allows users of the library to redirect where these messages go
through use of g_log_set_default_handler() rather than unconditionally
printing on stderr.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-06-28 13:39:52 +02:00
Victor Toso
c22fbffbc7 common: Fix -Wunused-variable
Fix a few warnings from unused variables when compiling spice-common
without OPUS or celt051.
2014-10-23 14:54:48 +02:00
Jeremy White
57ce430ccd Add support for the Opus codec.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
2014-01-02 12:28:21 +01:00
Jeremy White
c108e4ee8c Add a snd_codec interface to abstract the use of audio codecs such as celt.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
2014-01-02 12:25:23 +01:00