mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
Fix some warnings by making sure we have the right signedness on things.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@525 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
502d3f551b
commit
5d253cd30c
1 changed files with 6 additions and 6 deletions
|
|
@ -560,15 +560,15 @@ static int esd_proto_all_info(struct connection *c, esd_proto_t request, const v
|
||||||
response += ESD_NAME_MAX;
|
response += ESD_NAME_MAX;
|
||||||
|
|
||||||
/* rate */
|
/* rate */
|
||||||
*((int*) response) = MAYBE_INT32_SWAP(c->swap_byte_order, ce->sample_spec.rate);
|
*((uint32_t*) response) = MAYBE_UINT32_SWAP(c->swap_byte_order, ce->sample_spec.rate);
|
||||||
response += sizeof(int);
|
response += sizeof(int);
|
||||||
|
|
||||||
/* left */
|
/* left */
|
||||||
*((int*) response) = MAYBE_INT32_SWAP(c->swap_byte_order, (ce->volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM);
|
*((uint32_t*) response) = MAYBE_UINT32_SWAP(c->swap_byte_order, (ce->volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM);
|
||||||
response += sizeof(int);
|
response += sizeof(int);
|
||||||
|
|
||||||
/*right*/
|
/*right*/
|
||||||
*((int*) response) = MAYBE_INT32_SWAP(c->swap_byte_order, (ce->volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM);
|
*((uint32_t*) response) = MAYBE_UINT32_SWAP(c->swap_byte_order, (ce->volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM);
|
||||||
response += sizeof(int);
|
response += sizeof(int);
|
||||||
|
|
||||||
/*format*/
|
/*format*/
|
||||||
|
|
@ -596,10 +596,10 @@ static int esd_proto_stream_pan(struct connection *c, PA_GCC_UNUSED esd_proto_t
|
||||||
struct connection *conn;
|
struct connection *conn;
|
||||||
assert(c && data && length == sizeof(int)*3);
|
assert(c && data && length == sizeof(int)*3);
|
||||||
|
|
||||||
idx = MAYBE_UINT32_SWAP(c->swap_byte_order, *(const int*)data)-1;
|
idx = MAYBE_UINT32_SWAP(c->swap_byte_order, *(const uint32_t*)data)-1;
|
||||||
lvolume = MAYBE_UINT32_SWAP(c->swap_byte_order, *((const int*)data + 1));
|
lvolume = MAYBE_UINT32_SWAP(c->swap_byte_order, *((const uint32_t*)data + 1));
|
||||||
lvolume = (lvolume*PA_VOLUME_NORM)/ESD_VOLUME_BASE;
|
lvolume = (lvolume*PA_VOLUME_NORM)/ESD_VOLUME_BASE;
|
||||||
rvolume = MAYBE_UINT32_SWAP(c->swap_byte_order, *((const int*)data + 2));
|
rvolume = MAYBE_UINT32_SWAP(c->swap_byte_order, *((const uint32_t*)data + 2));
|
||||||
rvolume = (rvolume*PA_VOLUME_NORM)/ESD_VOLUME_BASE;
|
rvolume = (rvolume*PA_VOLUME_NORM)/ESD_VOLUME_BASE;
|
||||||
|
|
||||||
ok = connection_write(c, sizeof(int));
|
ok = connection_write(c, sizeof(int));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue