 Chromium Code Reviews
 Chromium Code Reviews Issue 1140723003:
  Implement suspend() and resume() for OfflineAudioContext  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 1140723003:
  Implement suspend() and resume() for OfflineAudioContext  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 virtual void render(AudioBus* sourceBus, AudioBus* destinationBus, size_t nu mberOfFrames) override final; | 49 virtual void render(AudioBus* sourceBus, AudioBus* destinationBus, size_t nu mberOfFrames) override final; | 
| 50 | 50 | 
| 51 size_t currentSampleFrame() const { return acquireLoad(&m_currentSampleFrame ); } | 51 size_t currentSampleFrame() const { return acquireLoad(&m_currentSampleFrame ); } | 
| 52 double currentTime() const { return currentSampleFrame() / static_cast<doubl e>(sampleRate()); } | 52 double currentTime() const { return currentSampleFrame() / static_cast<doubl e>(sampleRate()); } | 
| 53 | 53 | 
| 54 virtual unsigned long maxChannelCount() const { return 0; } | 54 virtual unsigned long maxChannelCount() const { return 0; } | 
| 55 | 55 | 
| 56 virtual void startRendering() = 0; | 56 virtual void startRendering() = 0; | 
| 57 virtual void stopRendering() = 0; | 57 virtual void stopRendering() = 0; | 
| 58 | 58 | 
| 59 // FIXME: Refacotring needed. This method is only used by OfflineAudioContex t. | |
| 
Raymond Toy
2015/06/12 21:11:36
Typo: Refacotring.
 
hongchan
2015/06/15 18:40:46
Done.
 | |
| 60 virtual size_t quantizeTimeToRenderQuantum(double) const { return 0; } | |
| 61 | |
| 59 protected: | 62 protected: | 
| 60 // LocalAudioInputProvider allows us to expose an AudioSourceProvider for lo cal/live audio input. | 63 // LocalAudioInputProvider allows us to expose an AudioSourceProvider for lo cal/live audio input. | 
| 61 // If there is local/live audio input, we call set() with the audio input da ta every render quantum. | 64 // If there is local/live audio input, we call set() with the audio input da ta every render quantum. | 
| 62 class LocalAudioInputProvider final : public AudioSourceProvider { | 65 class LocalAudioInputProvider final : public AudioSourceProvider { | 
| 63 public: | 66 public: | 
| 64 LocalAudioInputProvider() | 67 LocalAudioInputProvider() | 
| 65 : m_sourceBus(AudioBus::create(2, ProcessingSizeInFrames)) // FIXME: handle non-stereo local input. | 68 : m_sourceBus(AudioBus::create(2, ProcessingSizeInFrames)) // FIXME: handle non-stereo local input. | 
| 66 { | 69 { | 
| 67 } | 70 } | 
| 68 | 71 | 
| (...skipping 29 matching lines...) Expand all Loading... | |
| 98 | 101 | 
| 99 unsigned long maxChannelCount() const; | 102 unsigned long maxChannelCount() const; | 
| 100 | 103 | 
| 101 protected: | 104 protected: | 
| 102 AudioDestinationNode(AudioContext&); | 105 AudioDestinationNode(AudioContext&); | 
| 103 }; | 106 }; | 
| 104 | 107 | 
| 105 } // namespace blink | 108 } // namespace blink | 
| 106 | 109 | 
| 107 #endif // AudioDestinationNode_h | 110 #endif // AudioDestinationNode_h | 
| OLD | NEW |