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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // AudioHandler 45 // AudioHandler
46 void process(size_t) final { 46 void process(size_t) final {
47 } // we're pulled by hardware so this is never called 47 } // we're pulled by hardware so this is never called
48 48
49 // The audio hardware calls render() to get the next render quantum of audio 49 // The audio hardware calls render() to get the next render quantum of audio
50 // into destinationBus. It will optionally give us local/live audio input in 50 // into destinationBus. It will optionally give us local/live audio input in
51 // sourceBus (if it's not 0). 51 // sourceBus (if it's not 0).
52 void render(AudioBus* sourceBus, 52 void render(AudioBus* sourceBus,
53 AudioBus* destinationBus, 53 AudioBus* destinationBus,
54 size_t numberOfFrames) final; 54 size_t numberOfFrames,
55 const AudioIOPosition& outputPosition) final;
55 56
56 size_t currentSampleFrame() const { 57 size_t currentSampleFrame() const {
57 return acquireLoad(&m_currentSampleFrame); 58 return acquireLoad(&m_currentSampleFrame);
58 } 59 }
59 double currentTime() const { 60 double currentTime() const {
60 return currentSampleFrame() / static_cast<double>(sampleRate()); 61 return currentSampleFrame() / static_cast<double>(sampleRate());
61 } 62 }
62 63
63 virtual unsigned long maxChannelCount() const { return 0; } 64 virtual unsigned long maxChannelCount() const { return 0; }
64 65
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 113
113 unsigned long maxChannelCount() const; 114 unsigned long maxChannelCount() const;
114 115
115 protected: 116 protected:
116 AudioDestinationNode(BaseAudioContext&); 117 AudioDestinationNode(BaseAudioContext&);
117 }; 118 };
118 119
119 } // namespace blink 120 } // namespace blink
120 121
121 #endif // AudioDestinationNode_h 122 #endif // AudioDestinationNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698