| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 bool isDestinationInitialized() const | 106 bool isDestinationInitialized() const |
| 107 { | 107 { |
| 108 AudioDestinationNode* dest = destination(); | 108 AudioDestinationNode* dest = destination(); |
| 109 return dest ? dest->audioDestinationHandler().isInitialized() : false; | 109 return dest ? dest->audioDestinationHandler().isInitialized() : false; |
| 110 } | 110 } |
| 111 | 111 |
| 112 // Document notification | 112 // Document notification |
| 113 void stop() final; | 113 void stop() final; |
| 114 bool hasPendingActivity() const final; | 114 bool hasPendingActivity() const final; |
| 115 | 115 |
| 116 AudioDestinationNode* destination() const { return m_destinationNode.get();
} | 116 // Cannnot be called from the audio thread. |
| 117 AudioDestinationNode* destination() const; |
| 117 | 118 |
| 118 size_t currentSampleFrame() const | 119 size_t currentSampleFrame() const |
| 119 { | 120 { |
| 120 return m_destinationNode ? m_destinationNode->audioDestinationHandler().
currentSampleFrame() : 0; | 121 return m_destinationNode ? m_destinationNode->audioDestinationHandler().
currentSampleFrame() : 0; |
| 121 } | 122 } |
| 122 | 123 |
| 123 double currentTime() const | 124 double currentTime() const |
| 124 { | 125 { |
| 125 return m_destinationNode ? m_destinationNode->audioDestinationHandler().
currentTime() : 0; | 126 return m_destinationNode ? m_destinationNode->audioDestinationHandler().
currentTime() : 0; |
| 126 } | 127 } |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 Member<PeriodicWave> m_periodicWaveTriangle; | 348 Member<PeriodicWave> m_periodicWaveTriangle; |
| 348 | 349 |
| 349 // This is considering 32 is large enough for multiple channels audio. | 350 // This is considering 32 is large enough for multiple channels audio. |
| 350 // It is somewhat arbitrary and could be increased if necessary. | 351 // It is somewhat arbitrary and could be increased if necessary. |
| 351 enum { MaxNumberOfChannels = 32 }; | 352 enum { MaxNumberOfChannels = 32 }; |
| 352 }; | 353 }; |
| 353 | 354 |
| 354 } // namespace blink | 355 } // namespace blink |
| 355 | 356 |
| 356 #endif // AbstractAudioContext_h | 357 #endif // AbstractAudioContext_h |
| OLD | NEW |