diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-06-28 13:05:52 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-06-28 13:05:52 +0000 |
commit | 49c0b1e46e7d1f4734ce9aa9d38a253b9e1f829f (patch) | |
tree | 1878305a9e200f102c45dfd256fc01f91c488780 /src/conversation | |
parent | ab37ad67d7347feafdcba9635cc290bf85e7b728 (diff) | |
download | gnunet-49c0b1e46e7d1f4734ce9aa9d38a253b9e1f829f.tar.gz gnunet-49c0b1e46e7d1f4734ce9aa9d38a253b9e1f829f.zip |
-fix indent
Diffstat (limited to 'src/conversation')
-rw-r--r-- | src/conversation/gnunet-helper-audio-playback.c | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/src/conversation/gnunet-helper-audio-playback.c b/src/conversation/gnunet-helper-audio-playback.c index 272eda576..a3d19652c 100644 --- a/src/conversation/gnunet-helper-audio-playback.c +++ b/src/conversation/gnunet-helper-audio-playback.c | |||
@@ -137,9 +137,11 @@ struct OpusHeadPacket | |||
137 | 137 | ||
138 | GNUNET_NETWORK_STRUCT_END | 138 | GNUNET_NETWORK_STRUCT_END |
139 | 139 | ||
140 | /*Process an Opus header and setup the opus decoder based on it. | 140 | /** |
141 | It takes several pointers for header values which are needed | 141 | * Process an Opus header and setup the opus decoder based on it. |
142 | elsewhere in the code.*/ | 142 | * It takes several pointers for header values which are needed |
143 | * elsewhere in the code. | ||
144 | */ | ||
143 | static OpusDecoder * | 145 | static OpusDecoder * |
144 | process_header (ogg_packet *op) | 146 | process_header (ogg_packet *op) |
145 | { | 147 | { |
@@ -163,19 +165,24 @@ process_header (ogg_packet *op) | |||
163 | 165 | ||
164 | if (header.channel_mapping != 0) | 166 | if (header.channel_mapping != 0) |
165 | { | 167 | { |
166 | fprintf (stderr, "This implementation does not support non-mono streams\n"); | 168 | fprintf (stderr, |
169 | "This implementation does not support non-mono streams\n"); | ||
167 | return NULL; | 170 | return NULL; |
168 | } | 171 | } |
169 | 172 | ||
170 | dec = opus_decoder_create (SAMPLING_RATE, channels, &err); | 173 | dec = opus_decoder_create (SAMPLING_RATE, channels, &err); |
171 | if (OPUS_OK != err) | 174 | if (OPUS_OK != err) |
172 | { | 175 | { |
173 | fprintf (stderr, "Cannot create encoder: %s\n", opus_strerror (err)); | 176 | fprintf (stderr, |
177 | "Cannot create encoder: %s\n", | ||
178 | opus_strerror (err)); | ||
174 | return NULL; | 179 | return NULL; |
175 | } | 180 | } |
176 | if (!dec) | 181 | if (! dec) |
177 | { | 182 | { |
178 | fprintf (stderr, "Decoder initialization failed: %s\n", opus_strerror (err)); | 183 | fprintf (stderr, |
184 | "Decoder initialization failed: %s\n", | ||
185 | opus_strerror (err)); | ||
179 | return NULL; | 186 | return NULL; |
180 | } | 187 | } |
181 | 188 | ||
@@ -202,7 +209,8 @@ process_header (ogg_packet *op) | |||
202 | 209 | ||
203 | 210 | ||
204 | #ifdef DEBUG_DUMP_DECODED_OGG | 211 | #ifdef DEBUG_DUMP_DECODED_OGG |
205 | static size_t fwrite_le32(opus_int32 i32, FILE *file) | 212 | static size_t |
213 | fwrite_le32(opus_int32 i32, FILE *file) | ||
206 | { | 214 | { |
207 | unsigned char buf[4]; | 215 | unsigned char buf[4]; |
208 | buf[0]=(unsigned char)(i32&0xFF); | 216 | buf[0]=(unsigned char)(i32&0xFF); |
@@ -212,7 +220,9 @@ static size_t fwrite_le32(opus_int32 i32, FILE *file) | |||
212 | return fwrite(buf,4,1,file); | 220 | return fwrite(buf,4,1,file); |
213 | } | 221 | } |
214 | 222 | ||
215 | static size_t fwrite_le16(int i16, FILE *file) | 223 | |
224 | static size_t | ||
225 | fwrite_le16(int i16, FILE *file) | ||
216 | { | 226 | { |
217 | unsigned char buf[2]; | 227 | unsigned char buf[2]; |
218 | buf[0]=(unsigned char)(i16&0xFF); | 228 | buf[0]=(unsigned char)(i16&0xFF); |
@@ -220,7 +230,9 @@ static size_t fwrite_le16(int i16, FILE *file) | |||
220 | return fwrite(buf,2,1,file); | 230 | return fwrite(buf,2,1,file); |
221 | } | 231 | } |
222 | 232 | ||
223 | static int write_wav_header() | 233 | |
234 | static int | ||
235 | write_wav_header() | ||
224 | { | 236 | { |
225 | int ret; | 237 | int ret; |
226 | FILE *file = stdout; | 238 | FILE *file = stdout; |
@@ -245,6 +257,7 @@ static int write_wav_header() | |||
245 | 257 | ||
246 | #endif | 258 | #endif |
247 | 259 | ||
260 | |||
248 | static int64_t | 261 | static int64_t |
249 | audio_write (int64_t maxout) | 262 | audio_write (int64_t maxout) |
250 | { | 263 | { |