Skip to content

Commit 820eb94

Browse files
authored
[AUDIO_WORKLET] Add interactive hard-pan test NFC (#24942)
Built on #24931 (it touches the same file, but a rebase after merge will fix this). This adds hard-panned audio files to test that the left and right channels don't get flipped with any changes to the audio worklet code (relevant for #24891, which changes how the copies are performed). ``` test/runner interactive.test_audio_worklet_hard_pans ``` The bass track is hard-left (with its right muted), drums are right.
1 parent 7f355d7 commit 820eb94

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

test/test_interactive.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,13 @@ def test_audio_worklet_params_mixing(self):
336336
shutil.copy(test_file('webaudio/audio_files/emscripten-bass.mp3'), 'audio_files/')
337337
self.btest_exit('webaudio/audioworklet_params_mixing.c', cflags=['-sAUDIO_WORKLET', '-sWASM_WORKERS'])
338338

339+
# Mixing test above with hard-pans to verify left and right ordering
340+
def test_audio_worklet_hard_pans(self):
341+
os.mkdir('audio_files')
342+
shutil.copy(test_file('webaudio/audio_files/emscripten-beat-right.mp3'), 'audio_files/emscripten-beat.mp3')
343+
shutil.copy(test_file('webaudio/audio_files/emscripten-bass-left.mp3'), 'audio_files/emscripten-bass.mp3')
344+
self.btest_exit('webaudio/audioworklet_params_mixing.c', cflags=['-sAUDIO_WORKLET', '-sWASM_WORKERS'])
345+
339346
# Tests an AudioWorklet with a growable heap
340347
def test_audio_worklet_memory_growth(self):
341348
os.mkdir('audio_files')
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)