| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 NotifyEndedTask(PassRefPtr<AudioScheduledSourceNode> scheduledNode); | 61 NotifyEndedTask(PassRefPtr<AudioScheduledSourceNode> scheduledNode); |
| 62 void notifyEnded(); | 62 void notifyEnded(); |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 RefPtr<AudioScheduledSourceNode> m_scheduledNode; | 65 RefPtr<AudioScheduledSourceNode> m_scheduledNode; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 AudioScheduledSourceNode(AudioContext*, float sampleRate); | 68 AudioScheduledSourceNode(AudioContext*, float sampleRate); |
| 69 | 69 |
| 70 // Scheduling. | 70 // Scheduling. |
| 71 void start(double when); | 71 void start(double when = 0); |
| 72 void stop(double when); | 72 void stop(double when = 0); |
| 73 | 73 |
| 74 void noteOn(double when); | 74 void noteOn(double when); |
| 75 void noteOff(double when); | 75 void noteOff(double when); |
| 76 | 76 |
| 77 unsigned short playbackState() const { return static_cast<unsigned short>(m_
playbackState); } | 77 unsigned short playbackState() const { return static_cast<unsigned short>(m_
playbackState); } |
| 78 bool isPlayingOrScheduled() const { return m_playbackState == PLAYING_STATE
|| m_playbackState == SCHEDULED_STATE; } | 78 bool isPlayingOrScheduled() const { return m_playbackState == PLAYING_STATE
|| m_playbackState == SCHEDULED_STATE; } |
| 79 bool hasFinished() const { return m_playbackState == FINISHED_STATE; } | 79 bool hasFinished() const { return m_playbackState == FINISHED_STATE; } |
| 80 | 80 |
| 81 EventListener* onended(DOMWrapperWorld* isolatedWorld) { return getAttribute
EventListener(EventTypeNames::ended, isolatedWorld); } | 81 EventListener* onended(DOMWrapperWorld* isolatedWorld) { return getAttribute
EventListener(EventTypeNames::ended, isolatedWorld); } |
| 82 void setOnended(PassRefPtr<EventListener>, DOMWrapperWorld* isolatedWorld =
0); | 82 void setOnended(PassRefPtr<EventListener>, DOMWrapperWorld* isolatedWorld =
0); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 110 double m_endTime; // in seconds | 110 double m_endTime; // in seconds |
| 111 | 111 |
| 112 bool m_hasEndedListener; | 112 bool m_hasEndedListener; |
| 113 | 113 |
| 114 static const double UnknownTime; | 114 static const double UnknownTime; |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 } // namespace WebCore | 117 } // namespace WebCore |
| 118 | 118 |
| 119 #endif // AudioScheduledSourceNode_h | 119 #endif // AudioScheduledSourceNode_h |
| OLD | NEW |