mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
Remove some warnings
This commit is contained in:
parent
02a9273a2e
commit
6093e325cc
1 changed files with 8 additions and 5 deletions
|
|
@ -28,6 +28,7 @@
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <linux/sockios.h>
|
#include <linux/sockios.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include <pulse/xmalloc.h>
|
#include <pulse/xmalloc.h>
|
||||||
#include <pulse/timeval.h>
|
#include <pulse/timeval.h>
|
||||||
|
|
@ -75,7 +76,7 @@ struct bt_a2dp {
|
||||||
uint8_t buffer[BUFFER_SIZE]; /* Codec transfer buffer */
|
uint8_t buffer[BUFFER_SIZE]; /* Codec transfer buffer */
|
||||||
int count; /* Codec transfer buffer counter */
|
int count; /* Codec transfer buffer counter */
|
||||||
|
|
||||||
int nsamples; /* Cumulative number of codec samples */
|
uint32_t nsamples; /* Cumulative number of codec samples */
|
||||||
uint16_t seq_num; /* Cumulative packet sequence */
|
uint16_t seq_num; /* Cumulative packet sequence */
|
||||||
int frame_count; /* Current frames in buffer*/
|
int frame_count; /* Current frames in buffer*/
|
||||||
};
|
};
|
||||||
|
|
@ -666,7 +667,7 @@ static int a2dp_process_render(struct userdata *u) {
|
||||||
header->ssrc = htonl(1);
|
header->ssrc = htonl(1);
|
||||||
|
|
||||||
avdtp_write:
|
avdtp_write:
|
||||||
l = pa_write(u->stream_fd, a2dp->buffer, a2dp->count, write_type);
|
l = pa_write(u->stream_fd, a2dp->buffer, a2dp->count, &write_type);
|
||||||
pa_log_debug("avdtp_write: requested %d bytes; written %d bytes", a2dp->count, l);
|
pa_log_debug("avdtp_write: requested %d bytes; written %d bytes", a2dp->count, l);
|
||||||
|
|
||||||
pa_assert(l != 0);
|
pa_assert(l != 0);
|
||||||
|
|
@ -712,7 +713,7 @@ static void thread_func(void *userdata) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int ret, l;
|
int ret, l;
|
||||||
struct pollfd *pollfd;
|
struct pollfd *pollfd;
|
||||||
int64_t n;
|
uint64_t n;
|
||||||
pa_usec_t usec;
|
pa_usec_t usec;
|
||||||
|
|
||||||
if (PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
|
if (PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
|
||||||
|
|
@ -725,7 +726,7 @@ static void thread_func(void *userdata) {
|
||||||
|
|
||||||
if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && pollfd->revents) {
|
if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && pollfd->revents) {
|
||||||
if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP) {
|
if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP) {
|
||||||
if (l = a2dp_process_render(u) < 0)
|
if ((l = a2dp_process_render(u)) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -780,6 +781,7 @@ finish:
|
||||||
int pa__init(pa_module* m) {
|
int pa__init(pa_module* m) {
|
||||||
int e;
|
int e;
|
||||||
pa_modargs *ma;
|
pa_modargs *ma;
|
||||||
|
uint32_t channels;
|
||||||
pa_sink_new_data data;
|
pa_sink_new_data data;
|
||||||
struct pollfd *pollfd;
|
struct pollfd *pollfd;
|
||||||
struct userdata *u;
|
struct userdata *u;
|
||||||
|
|
@ -821,10 +823,11 @@ int pa__init(pa_module* m) {
|
||||||
pa_log_error("failed to get rate from module arguments");
|
pa_log_error("failed to get rate from module arguments");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
if (pa_modargs_get_value_u32(ma, "channels", &u->ss.channels) < 0) {
|
if (pa_modargs_get_value_u32(ma, "channels", &channels) < 0) {
|
||||||
pa_log_error("failed to get channels from module arguments");
|
pa_log_error("failed to get channels from module arguments");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
u->ss.channels = (uint8_t) channels;
|
||||||
|
|
||||||
/* connect to the bluez audio service */
|
/* connect to the bluez audio service */
|
||||||
u->audioservice_fd = bt_audio_service_open();
|
u->audioservice_fd = bt_audio_service_open();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue