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

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

Issue 2839063003: Implement tail processing for AudioNodes (Closed)
Patch Set: Make declaration order consistent Created 3 years, 5 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) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // AudioDestinationHandler 53 // AudioDestinationHandler
54 void StartRendering() override; 54 void StartRendering() override;
55 void StopRendering() override; 55 void StopRendering() override;
56 unsigned long MaxChannelCount() const override; 56 unsigned long MaxChannelCount() const override;
57 // Returns the rendering callback buffer size. 57 // Returns the rendering callback buffer size.
58 size_t CallbackBufferSize() const override; 58 size_t CallbackBufferSize() const override;
59 double SampleRate() const override; 59 double SampleRate() const override;
60 int FramesPerBuffer() const override; 60 int FramesPerBuffer() const override;
61 61
62 // AudioNode
63 double TailTime() const override { return 0; } 62 double TailTime() const override { return 0; }
64 double LatencyTime() const override { return 0; } 63 double LatencyTime() const override { return 0; }
64 bool RequiresTailProcessing() const override { return false; }
65 65
66 private: 66 private:
67 explicit DefaultAudioDestinationHandler(AudioNode&, 67 explicit DefaultAudioDestinationHandler(AudioNode&,
68 const WebAudioLatencyHint&); 68 const WebAudioLatencyHint&);
69 void CreateDestination(); 69 void CreateDestination();
70 70
71 std::unique_ptr<AudioDestination> destination_; 71 std::unique_ptr<AudioDestination> destination_;
72 String input_device_id_; 72 String input_device_id_;
73 unsigned number_of_input_channels_; 73 unsigned number_of_input_channels_;
74 const WebAudioLatencyHint latency_hint_; 74 const WebAudioLatencyHint latency_hint_;
75 }; 75 };
76 76
77 class DefaultAudioDestinationNode final : public AudioDestinationNode { 77 class DefaultAudioDestinationNode final : public AudioDestinationNode {
78 public: 78 public:
79 static DefaultAudioDestinationNode* Create(BaseAudioContext*, 79 static DefaultAudioDestinationNode* Create(BaseAudioContext*,
80 const WebAudioLatencyHint&); 80 const WebAudioLatencyHint&);
81 81
82 size_t CallbackBufferSize() const { return Handler().CallbackBufferSize(); }; 82 size_t CallbackBufferSize() const { return Handler().CallbackBufferSize(); };
83 83
84 private: 84 private:
85 explicit DefaultAudioDestinationNode(BaseAudioContext&, 85 explicit DefaultAudioDestinationNode(BaseAudioContext&,
86 const WebAudioLatencyHint&); 86 const WebAudioLatencyHint&);
87 }; 87 };
88 88
89 } // namespace blink 89 } // namespace blink
90 90
91 #endif // DefaultAudioDestinationNode_h 91 #endif // DefaultAudioDestinationNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698