Commit 03d6416
committed
fix(tts): scan WAV data chunk instead of hardcoding 44-byte header offset
WAV files with extra chunks (LIST, fact, bext) had metadata bytes fed
into AudioTrack as PCM, causing distorted playback. Now walks the chunk
structure to find the actual "data" chunk start.1 parent 8c39083 commit 03d6416
1 file changed
Lines changed: 22 additions & 5 deletions
File tree
- examples/android/RunAnywhereAI/app/src/main/java/com/runanywhere/runanywhereai/presentation/tts
Lines changed: 22 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
521 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
522 | 539 | | |
523 | 540 | | |
524 | | - | |
| 541 | + | |
525 | 542 | | |
526 | 543 | | |
527 | 544 | | |
528 | 545 | | |
529 | 546 | | |
530 | | - | |
| 547 | + | |
531 | 548 | | |
532 | 549 | | |
533 | 550 | | |
| |||
0 commit comments