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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // Need to check if the context actually alive. Otherwise the subsequent | 54 // Need to check if the context actually alive. Otherwise the subsequent |
55 // steps will fail. If the context is not alive somehow, return immediately | 55 // steps will fail. If the context is not alive somehow, return immediately |
56 // and do nothing. | 56 // and do nothing. |
57 // | 57 // |
58 // TODO(hongchan): because the context can go away while rendering, so this | 58 // TODO(hongchan): because the context can go away while rendering, so this |
59 // check cannot guarantee the safe execution of the following steps. | 59 // check cannot guarantee the safe execution of the following steps. |
60 ASSERT(context()); | 60 ASSERT(context()); |
61 if (!context()) | 61 if (!context()) |
62 return; | 62 return; |
63 | 63 |
64 context()->deferredTaskHandler().setAudioThread(currentThread()); | 64 context()->deferredTaskHandler().setAudioThreadToCurrentThread(); |
65 | 65 |
66 // If the destination node is not initialized, pass the silence to the final | 66 // If the destination node is not initialized, pass the silence to the final |
67 // audio destination (one step before the FIFO). This check is for the case | 67 // audio destination (one step before the FIFO). This check is for the case |
68 // where the destination is in the middle of tearing down process. | 68 // where the destination is in the middle of tearing down process. |
69 if (!isInitialized()) { | 69 if (!isInitialized()) { |
70 destinationBus->zero(); | 70 destinationBus->zero(); |
71 return; | 71 return; |
72 } | 72 } |
73 | 73 |
74 // Let the context take care of any business at the start of each render qua
ntum. | 74 // Let the context take care of any business at the start of each render qua
ntum. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 return static_cast<AudioDestinationHandler&>(handler()); | 117 return static_cast<AudioDestinationHandler&>(handler()); |
118 } | 118 } |
119 | 119 |
120 unsigned long AudioDestinationNode::maxChannelCount() const | 120 unsigned long AudioDestinationNode::maxChannelCount() const |
121 { | 121 { |
122 return audioDestinationHandler().maxChannelCount(); | 122 return audioDestinationHandler().maxChannelCount(); |
123 } | 123 } |
124 | 124 |
125 } // namespace blink | 125 } // namespace blink |
126 | 126 |
OLD | NEW |