Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Side by Side Diff: third_party/WebKit/Source/platform/audio/AudioDestination.cpp

Issue 2940933003: DO NOT SUBMIT results of new clang-format (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 AudioDestination::~AudioDestination() { 95 AudioDestination::~AudioDestination() {
96 Stop(); 96 Stop();
97 } 97 }
98 98
99 void AudioDestination::Render(const WebVector<float*>& destination_data, 99 void AudioDestination::Render(const WebVector<float*>& destination_data,
100 size_t number_of_frames, 100 size_t number_of_frames,
101 double delay, 101 double delay,
102 double delay_timestamp, 102 double delay_timestamp,
103 size_t prior_frames_skipped) { 103 size_t prior_frames_skipped) {
104 TRACE_EVENT1("webaudio", "AudioDestination::Render", 104 TRACE_EVENT1("webaudio", "AudioDestination::Render", "callback_buffer_size",
105 "callback_buffer_size", number_of_frames); 105 number_of_frames);
106 106
107 // This method is called by AudioDeviceThread. 107 // This method is called by AudioDeviceThread.
108 DCHECK(!IsRenderingThread()); 108 DCHECK(!IsRenderingThread());
109 109
110 CHECK_EQ(destination_data.size(), number_of_output_channels_); 110 CHECK_EQ(destination_data.size(), number_of_output_channels_);
111 CHECK_EQ(number_of_frames, callback_buffer_size_); 111 CHECK_EQ(number_of_frames, callback_buffer_size_);
112 112
113 // Note that this method is called by AudioDeviceThread. If FIFO is not ready, 113 // Note that this method is called by AudioDeviceThread. If FIFO is not ready,
114 // or the requested render size is greater than FIFO size return here. 114 // or the requested render size is greater than FIFO size return here.
115 // (crbug.com/692423) 115 // (crbug.com/692423)
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 DCHECK(is_buffer_size_valid); 253 DCHECK(is_buffer_size_valid);
254 return is_buffer_size_valid; 254 return is_buffer_size_valid;
255 } 255 }
256 256
257 bool AudioDestination::IsRenderingThread() { 257 bool AudioDestination::IsRenderingThread() {
258 return static_cast<ThreadIdentifier>(rendering_thread_->ThreadId()) == 258 return static_cast<ThreadIdentifier>(rendering_thread_->ThreadId()) ==
259 CurrentThread(); 259 CurrentThread();
260 } 260 }
261 261
262 } // namespace blink 262 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698