Hello Colin. On Thu, 2014-09-18 at 15:27 +0200, Colin Leroy wrote: > On Thu, 18 Sep 2014 19:17:53 +0600, "Alexander E. Patrakov" > <patra...@gmail.com> wrote: > > > I had a look at the diff between the master and the end result. Too > > much whitespace changes and other non-functional changes (e.g. I > > don't understand why the definition of struct userdata has to be > > moved up in odule-raop-discover.c). I have not looked at the > > individual commits. > > Most of the whitespace changes are actually extra whitespace removal. Do > you think I should revert those? I agree that they make the diff > longer, but that seems like wasting the time of the people who did > these fixes... > > > Also, you have some "unimplemented" stuff like AAC encoding. Could > > you please remove it? We can always use ALAC, and already have a > > presumably-working standalone "encoder" (that just slaps a header > > with an is-not-compressed bit) implementation in write_ALAC_data(). > > Sure.
You'll find a patch attached. > _______________________________________________ > pulseaudio-discuss mailing list > pulseaudio-discuss@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
From 4727e6173a558e1b5af642e9adf6b549418e940e Mon Sep 17 00:00:00 2001 From: Martin Blanchard <tch...@gmx.com> Date: Thu, 25 Sep 2014 16:49:43 +0200 Subject: [PATCH] raop: Remove unimplemented code (PCM and AAC) --- src/modules/raop/raop-client.c | 44 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/src/modules/raop/raop-client.c b/src/modules/raop/raop-client.c index 42105bc..53cdafb 100644 --- a/src/modules/raop/raop-client.c +++ b/src/modules/raop/raop-client.c @@ -267,16 +267,6 @@ static inline void bit_writer(uint8_t **buffer, uint8_t *bit_pos, size_t *size, } } -static size_t write_PCM_data(uint8_t *packet, const size_t max, uint8_t *raw, size_t *length) { - size_t size = 0; - - pa_memzero(packet, max); - - pa_log("Raw PCM not implemented..."); - - return size; -} - static size_t write_ALAC_data(uint8_t *packet, const size_t max, uint8_t *raw, size_t *length, bool compress) { uint32_t nbs = (*length / 2) / 2; uint8_t *ibp, *maxibp; @@ -315,16 +305,6 @@ static size_t write_ALAC_data(uint8_t *packet, const size_t max, uint8_t *raw, s return size; } -static size_t write_AAC_data(uint8_t *packet, const size_t max, uint8_t *raw, size_t *length) { - size_t size = 0; - - pa_memzero(packet, max); - - pa_log("AAC encoding not implemented..."); - - return size; -} - static size_t build_tcp_audio_packet(pa_raop_client *c, pa_memchunk *block, pa_memchunk *packet) { const size_t head = sizeof(tcp_audio_header); uint32_t *buffer = NULL; @@ -349,12 +329,14 @@ static size_t build_tcp_audio_packet(pa_raop_client *c, pa_memchunk *block, pa_m length = block->length; size = sizeof(tcp_audio_header); - if (c->codec == PA_RAOP_CODEC_PCM) - size += write_PCM_data(((uint8_t *) buffer + head), packet->length - head, raw, &length); - else if (c->codec == PA_RAOP_CODEC_ALAC) + if (c->codec == PA_RAOP_CODEC_ALAC) size += write_ALAC_data(((uint8_t *) buffer + head), packet->length - head, raw, &length, false); - else - size += write_AAC_data(((uint8_t *) buffer + head), packet->length - head, raw, &length); + else { + pa_log_debug("Only ALAC encoding is supported, sending zeros..."); + pa_memzero(((uint8_t *) buffer + head), packet->length - head); + size += length; + } + c->rtptime += length / 4; pa_memblock_release(block->memblock); @@ -435,12 +417,14 @@ static size_t build_udp_audio_packet(pa_raop_client *c, pa_memchunk *block, pa_m length = block->length; size = sizeof(udp_audio_header); - if (c->codec == PA_RAOP_CODEC_PCM) - size += write_PCM_data(((uint8_t *) buffer + head), packet->length - head, raw, &length); - else if (c->codec == PA_RAOP_CODEC_ALAC) + if (c->codec == PA_RAOP_CODEC_ALAC) size += write_ALAC_data(((uint8_t *) buffer + head), packet->length - head, raw, &length, false); - else - size += write_AAC_data(((uint8_t *) buffer + head), packet->length - head, raw, &length); + else { + pa_log_debug("Only ALAC encoding is supported, sending zeros..."); + pa_memzero(((uint8_t *) buffer + head), packet->length - head); + size += length; + } + c->rtptime += length / 4; if (c->seq == 0xFFFF) { -- 1.9.3
signature.asc
Description: This is a digitally signed message part
_______________________________________________ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss