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

Side by Side Diff: third_party/WebKit/public/platform/WebAudioDevice.h

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 3 years, 12 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
« no previous file with comments | « third_party/WebKit/Source/platform/exported/WebAudioDevice.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 17 matching lines...) Expand all
28 28
29 #ifndef WebAudioDevice_h 29 #ifndef WebAudioDevice_h
30 #define WebAudioDevice_h 30 #define WebAudioDevice_h
31 31
32 #include "WebCommon.h" 32 #include "WebCommon.h"
33 #include "WebVector.h" 33 #include "WebVector.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 // Abstract interface to the Chromium audio system. 37 // Abstract interface to the Chromium audio system.
38
39 class WebAudioDevice { 38 class WebAudioDevice {
40 public: 39 public:
41 class BLINK_PLATFORM_EXPORT RenderCallback { 40 class BLINK_PLATFORM_EXPORT RenderCallback {
42 public: 41 public:
42 // Note: |delay| and |delayTimestamp| arguments are high-precision
43 // measurements of the state of the system in the recent past. To be clear,
44 // |delay| does *not* represent the point-in-time at which the first
45 // rendered sample will be played out.
43 virtual void render(const WebVector<float*>& sourceData, 46 virtual void render(const WebVector<float*>& sourceData,
44 const WebVector<float*>& destinationData, 47 const WebVector<float*>& destinationData,
45 size_t numberOfFrames); 48 size_t numberOfFrames,
49 double delay, // Output delay in seconds.
50 double delayTimestamp, // System timestamp in seconds
51 // when |delay| was obtained.
52 size_t priorFramesSkipped);
46 53
47 protected: 54 protected:
48 virtual ~RenderCallback(); 55 virtual ~RenderCallback();
49 }; 56 };
50 57
51 virtual ~WebAudioDevice() {} 58 virtual ~WebAudioDevice() {}
52 59
53 virtual void start() = 0; 60 virtual void start() = 0;
54 virtual void stop() = 0; 61 virtual void stop() = 0;
55 virtual double sampleRate() = 0; 62 virtual double sampleRate() = 0;
56 }; 63 };
57 64
58 } // namespace blink 65 } // namespace blink
59 66
60 #endif // WebAudioDevice_h 67 #endif // WebAudioDevice_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/exported/WebAudioDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698