OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/renderer/media/audio_renderer_impl.h" | 5 #include "chrome/renderer/media/audio_renderer_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include "chrome/common/render_messages.h" | 9 #include "chrome/common/render_messages_params.h" |
10 #include "chrome/renderer/audio_message_filter.h" | 10 #include "chrome/renderer/audio_message_filter.h" |
11 #include "chrome/renderer/render_view.h" | 11 #include "chrome/renderer/render_view.h" |
12 #include "chrome/renderer/render_thread.h" | 12 #include "chrome/renderer/render_thread.h" |
13 #include "media/base/filter_host.h" | 13 #include "media/base/filter_host.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // We will try to fill 200 ms worth of audio samples in each packet. A round | 17 // We will try to fill 200 ms worth of audio samples in each packet. A round |
18 // trip latency for IPC messages are typically 10 ms, this should give us | 18 // trip latency for IPC messages are typically 10 ms, this should give us |
19 // plenty of time to avoid clicks. | 19 // plenty of time to avoid clicks. |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 DCHECK(MessageLoop::current() == io_loop_); | 366 DCHECK(MessageLoop::current() == io_loop_); |
367 | 367 |
368 // We treat the IO loop going away the same as stopping. | 368 // We treat the IO loop going away the same as stopping. |
369 AutoLock auto_lock(lock_); | 369 AutoLock auto_lock(lock_); |
370 if (stopped_) | 370 if (stopped_) |
371 return; | 371 return; |
372 | 372 |
373 stopped_ = true; | 373 stopped_ = true; |
374 DestroyTask(); | 374 DestroyTask(); |
375 } | 375 } |
OLD | NEW |