(string)
| 2563 | } |
| 2564 | |
| 2565 | function parseRIFF(string) { |
| 2566 | var offset = 0; |
| 2567 | var chunks = {}; |
| 2568 | |
| 2569 | while (offset < string.length) { |
| 2570 | var id = string.substr(offset, 4); |
| 2571 | var len = getStrLength(string, offset); |
| 2572 | var data = string.substr(offset + 4 + 4, len); |
| 2573 | offset += 4 + 4 + len; |
| 2574 | chunks[id] = chunks[id] || []; |
| 2575 | |
| 2576 | if (id === 'RIFF' || id === 'LIST') { |
| 2577 | chunks[id].push(parseRIFF(data)); |
| 2578 | } else { |
| 2579 | chunks[id].push(data); |
| 2580 | } |
| 2581 | } |
| 2582 | return chunks; |
| 2583 | } |
| 2584 | |
| 2585 | function doubleToString(num) { |
| 2586 | return [].slice.call( |
no test coverage detected