| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 static PassRefPtr<AudioContext> create(Document&, unsigned numberOfChannels,
size_t numberOfFrames, float sampleRate, ExceptionState&); | 83 static PassRefPtr<AudioContext> create(Document&, unsigned numberOfChannels,
size_t numberOfFrames, float sampleRate, ExceptionState&); |
| 84 | 84 |
| 85 virtual ~AudioContext(); | 85 virtual ~AudioContext(); |
| 86 | 86 |
| 87 bool isInitialized() const; | 87 bool isInitialized() const; |
| 88 | 88 |
| 89 bool isOfflineContext() { return m_isOfflineContext; } | 89 bool isOfflineContext() { return m_isOfflineContext; } |
| 90 | 90 |
| 91 // Document notification | 91 // Document notification |
| 92 virtual void stop() OVERRIDE FINAL; | 92 virtual void stop() OVERRIDE FINAL; |
| 93 virtual bool hasPendingActivity() const OVERRIDE; |
| 93 | 94 |
| 94 AudioDestinationNode* destination() { return m_destinationNode.get(); } | 95 AudioDestinationNode* destination() { return m_destinationNode.get(); } |
| 95 size_t currentSampleFrame() const { return m_destinationNode->currentSampleF
rame(); } | 96 size_t currentSampleFrame() const { return m_destinationNode->currentSampleF
rame(); } |
| 96 double currentTime() const { return m_destinationNode->currentTime(); } | 97 double currentTime() const { return m_destinationNode->currentTime(); } |
| 97 float sampleRate() const { return m_destinationNode->sampleRate(); } | 98 float sampleRate() const { return m_destinationNode->sampleRate(); } |
| 98 unsigned long activeSourceCount() const { return static_cast<unsigned long>(
m_activeSourceCount); } | 99 unsigned long activeSourceCount() const { return static_cast<unsigned long>(
m_activeSourceCount); } |
| 99 | 100 |
| 100 void incrementActiveSourceCount(); | 101 void incrementActiveSourceCount(); |
| 101 void decrementActiveSourceCount(); | 102 void decrementActiveSourceCount(); |
| 102 | 103 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // It is somewhat arbitrary and could be increased if necessary. | 326 // It is somewhat arbitrary and could be increased if necessary. |
| 326 enum { MaxNumberOfChannels = 32 }; | 327 enum { MaxNumberOfChannels = 32 }; |
| 327 | 328 |
| 328 // Number of AudioBufferSourceNodes that are active (playing). | 329 // Number of AudioBufferSourceNodes that are active (playing). |
| 329 int m_activeSourceCount; | 330 int m_activeSourceCount; |
| 330 }; | 331 }; |
| 331 | 332 |
| 332 } // WebCore | 333 } // WebCore |
| 333 | 334 |
| 334 #endif // AudioContext_h | 335 #endif // AudioContext_h |
| OLD | NEW |