equal
deleted
inserted
replaced
215 ARTS_FlushCapture(_THIS) |
215 ARTS_FlushCapture(_THIS) |
216 { |
216 { |
217 arts_stream_t stream = this->hidden->stream; |
217 arts_stream_t stream = this->hidden->stream; |
218 int remain = SDL_NAME(arts_stream_get)(stream, ARTS_P_BUFFER_SPACE); |
218 int remain = SDL_NAME(arts_stream_get)(stream, ARTS_P_BUFFER_SPACE); |
219 Uint8 buf[512]; |
219 Uint8 buf[512]; |
220 while (space > 0) { |
220 while (remain > 0) { |
221 const int len = SDL_min(sizeof (buf), remain); |
221 const int len = SDL_min(sizeof (buf), remain); |
222 const int br = SDL_NAME(arts_read)(stream, buf, len); |
222 const int br = SDL_NAME(arts_read)(stream, buf, len); |
223 if (br <= 0) { |
223 if (br <= 0) { |
224 return; /* oh well. */ |
224 return; /* oh well. */ |
225 } |
225 } |
226 space -= br; |
226 remain -= br; |
227 } |
227 } |
228 } |
228 } |
229 |
229 |
230 static void |
230 static void |
231 ARTS_CloseDevice(_THIS) |
231 ARTS_CloseDevice(_THIS) |