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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 DECLARE_VIRTUAL_TRACE(); | 103 DECLARE_VIRTUAL_TRACE(); |
104 | 104 |
105 // Is the destination node initialized and ready to handle audio? | 105 // Is the destination node initialized and ready to handle audio? |
106 bool isDestinationInitialized() const { | 106 bool isDestinationInitialized() const { |
107 AudioDestinationNode* dest = destination(); | 107 AudioDestinationNode* dest = destination(); |
108 return dest ? dest->audioDestinationHandler().isInitialized() : false; | 108 return dest ? dest->audioDestinationHandler().isInitialized() : false; |
109 } | 109 } |
110 | 110 |
111 // Document notification | 111 // Document notification |
112 void stop() final; | 112 void contextDestroyed() final; |
113 bool hasPendingActivity() const final; | 113 bool hasPendingActivity() const final; |
114 | 114 |
115 // Cannnot be called from the audio thread. | 115 // Cannnot be called from the audio thread. |
116 AudioDestinationNode* destination() const; | 116 AudioDestinationNode* destination() const; |
117 | 117 |
118 size_t currentSampleFrame() const { | 118 size_t currentSampleFrame() const { |
119 // TODO: What is the correct value for the current frame if the destination
node has gone | 119 // TODO: What is the correct value for the current frame if the destination
node has gone |
120 // away? 0 is a valid frame. | 120 // away? 0 is a valid frame. |
121 return m_destinationNode | 121 return m_destinationNode |
122 ? m_destinationNode->audioDestinationHandler() | 122 ? m_destinationNode->audioDestinationHandler() |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 Member<PeriodicWave> m_periodicWaveTriangle; | 410 Member<PeriodicWave> m_periodicWaveTriangle; |
411 | 411 |
412 // This is considering 32 is large enough for multiple channels audio. | 412 // This is considering 32 is large enough for multiple channels audio. |
413 // It is somewhat arbitrary and could be increased if necessary. | 413 // It is somewhat arbitrary and could be increased if necessary. |
414 enum { MaxNumberOfChannels = 32 }; | 414 enum { MaxNumberOfChannels = 32 }; |
415 }; | 415 }; |
416 | 416 |
417 } // namespace blink | 417 } // namespace blink |
418 | 418 |
419 #endif // BaseAudioContext_h | 419 #endif // BaseAudioContext_h |
OLD | NEW |