| OLD | NEW |
| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 String channelCountMode(); | 210 String channelCountMode(); |
| 211 virtual void setChannelCountMode(const String&, ExceptionState&); | 211 virtual void setChannelCountMode(const String&, ExceptionState&); |
| 212 | 212 |
| 213 String channelInterpretation(); | 213 String channelInterpretation(); |
| 214 void setChannelInterpretation(const String&, ExceptionState&); | 214 void setChannelInterpretation(const String&, ExceptionState&); |
| 215 | 215 |
| 216 ChannelCountMode internalChannelCountMode() const { return m_channelCountMod
e; } | 216 ChannelCountMode internalChannelCountMode() const { return m_channelCountMod
e; } |
| 217 AudioBus::ChannelInterpretation internalChannelInterpretation() const { retu
rn m_channelInterpretation; } | 217 AudioBus::ChannelInterpretation internalChannelInterpretation() const { retu
rn m_channelInterpretation; } |
| 218 | 218 |
| 219 void updateChannelCountMode(); | 219 void updateChannelCountMode(); |
| 220 void updateChannelInterpretation(); |
| 220 | 221 |
| 221 protected: | 222 protected: |
| 222 // Inputs and outputs must be created before the AudioHandler is | 223 // Inputs and outputs must be created before the AudioHandler is |
| 223 // initialized. | 224 // initialized. |
| 224 void addInput(); | 225 void addInput(); |
| 225 void addOutput(unsigned numberOfChannels); | 226 void addOutput(unsigned numberOfChannels); |
| 226 | 227 |
| 227 // Called by processIfNecessary() to cause all parts of the rendering graph
connected to us to process. | 228 // Called by processIfNecessary() to cause all parts of the rendering graph
connected to us to process. |
| 228 // Each rendering quantum, the audio data for each of the AudioNode's inputs
will be available after this method is called. | 229 // Each rendering quantum, the audio data for each of the AudioNode's inputs
will be available after this method is called. |
| 229 // Called from context's audio thread. | 230 // Called from context's audio thread. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 static int s_nodeCount[NodeTypeEnd]; | 267 static int s_nodeCount[NodeTypeEnd]; |
| 267 #endif | 268 #endif |
| 268 | 269 |
| 269 protected: | 270 protected: |
| 270 unsigned m_channelCount; | 271 unsigned m_channelCount; |
| 271 ChannelCountMode m_channelCountMode; | 272 ChannelCountMode m_channelCountMode; |
| 272 AudioBus::ChannelInterpretation m_channelInterpretation; | 273 AudioBus::ChannelInterpretation m_channelInterpretation; |
| 273 // The new channel count mode that will be used to set the actual mode in th
e pre or post | 274 // The new channel count mode that will be used to set the actual mode in th
e pre or post |
| 274 // rendering phase. | 275 // rendering phase. |
| 275 ChannelCountMode m_newChannelCountMode; | 276 ChannelCountMode m_newChannelCountMode; |
| 277 // The new channel interpretation that will be used to set the actual |
| 278 // intepretation in the pre or post rendering phase. |
| 279 AudioBus::ChannelInterpretation m_newChannelInterpretation; |
| 280 |
| 276 }; | 281 }; |
| 277 | 282 |
| 278 class MODULES_EXPORT AudioNode : public EventTargetWithInlineData { | 283 class MODULES_EXPORT AudioNode : public EventTargetWithInlineData { |
| 279 DEFINE_WRAPPERTYPEINFO(); | 284 DEFINE_WRAPPERTYPEINFO(); |
| 280 USING_PRE_FINALIZER(AudioNode, dispose); | 285 USING_PRE_FINALIZER(AudioNode, dispose); |
| 281 public: | 286 public: |
| 282 DECLARE_VIRTUAL_TRACE(); | 287 DECLARE_VIRTUAL_TRACE(); |
| 283 AudioHandler& handler() const; | 288 AudioHandler& handler() const; |
| 284 | 289 |
| 285 virtual AudioNode* connect(AudioNode*, unsigned outputIndex, unsigned inputI
ndex, ExceptionState&); | 290 virtual AudioNode* connect(AudioNode*, unsigned outputIndex, unsigned inputI
ndex, ExceptionState&); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes; | 337 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes; |
| 333 // Represents audio node graph with Oilpan references. N-th HeapHashSet | 338 // Represents audio node graph with Oilpan references. N-th HeapHashSet |
| 334 // represents a set of AudioParam objects connected to this AudioNode's N-th | 339 // represents a set of AudioParam objects connected to this AudioNode's N-th |
| 335 // output. | 340 // output. |
| 336 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams; | 341 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams; |
| 337 }; | 342 }; |
| 338 | 343 |
| 339 } // namespace blink | 344 } // namespace blink |
| 340 | 345 |
| 341 #endif // AudioNode_h | 346 #endif // AudioNode_h |
| OLD | NEW |