I hereby claim:
- I am 72lions on github.
- I am 72lions (https://keybase.io/72lions) on keybase.
- I have a public key whose fingerprint is DFDF 68CA 58D4 3CEA 1DEF 8797 94D4 DF3C AB45 E082
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| // Adding a bit of scheduling so that we won't have single digit milisecond overlaps. | |
| // Thanks to Chris Wilson for his suggestion. | |
| var scheduledTime = 0.015; | |
| try { | |
| _audioSource.stop(scheduledTime); | |
| } catch (e) {} | |
| _audioSource = _context.createBufferSource(); | |
| _audioSource.buffer = _audioBuffer; |
| /** | |
| * Creates a new Uint8Array based on two different ArrayBuffers | |
| * | |
| * @private | |
| * @param {ArrayBuffers} buffer1 The first buffer. | |
| * @param {ArrayBuffers} buffer2 The second buffer. | |
| * @return {ArrayBuffers} The new ArrayBuffer created out of the two. | |
| */ | |
| var _appendBuffer = function(buffer1, buffer2) { | |
| var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); |
| /** | |
| * Is triggered when a chunk is loaded | |
| */ | |
| var _onChunkLoaded = function() { | |
| // Concat two ArrayBuffers into a new one | |
| _activeBuffer = _appendBuffer(_activeBuffer, _request.response); | |
| // Use decodeAudioData for creating an AudioBuffer, | |
| // so that we don't block the main thread. |
| /** | |
| * It is responsible for loading all the different chunks | |
| * | |
| * @private | |
| * @type {XMLHttpRequest} | |
| */ | |
| var _request = new XMLHttpRequest(); | |
| // Set the responseType to arraybuffer | |
| _request.responseType = 'arraybuffer'; |
| var alreadyInstantiatedGridModel = FrameworkJS.retrieve( | |
| 'gridModel', | |
| 'models.Grid'); |
| var instanceOfGridModel = FrameworkJS.retrieve( | |
| 'gridModel', | |
| 'models.Grid'); |
| FrameworkJS.extend(function() { | |
| // Overwritting the properties | |
| this.name = 'GridModel'; | |
| // Initial data | |
| this._data = {title: "MyTitle", prop1: 'Property 1'}; | |
| }, FrameworkJS.Model, 'models.Grid'); |
| var gridView = FrameworkJS.retrieve( | |
| 'SomeId', | |
| 'views.Grid'); |
| var alreadyInstantiatedGridView = FrameworkJS.retrieve( | |
| 'SomeId', | |
| 'views.Grid'); |