comparison src/testdir/test_sound.vim @ 30719:71137f73c94d v9.0.0694

patch 9.0.0694: no native sound support on Mac OS Commit: https://github.com/vim/vim/commit/4314e4f7da4db5d85f63cdf43b73be3689502c93 Author: Yee Cheng Chin <ychin.git@gmail.com> Date: Sat Oct 8 13:50:05 2022 +0100 patch 9.0.0694: no native sound support on Mac OS Problem: No native sound support on Mac OS. Solution: Add sound support for Mac OS. (Yee Cheng Chin, closes https://github.com/vim/vim/issues/11274)
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Oct 2022 15:00:05 +0200
parents 237dace53473
children 70c1a9c6f41d
comparison
equal deleted inserted replaced
30718:118268e20251 30719:71137f73c94d
15 if has('win32') 15 if has('win32')
16 throw 'Skipped: Playing event with callback is not supported on Windows' 16 throw 'Skipped: Playing event with callback is not supported on Windows'
17 endif 17 endif
18 let g:playcallback_count = 0 18 let g:playcallback_count = 0
19 let g:id = 0 19 let g:id = 0
20 let id = 'bell'->sound_playevent('PlayCallback') 20 let event_name = 'bell'
21 if has('osx')
22 let event_name = 'Tink'
23 endif
24 let id = event_name->sound_playevent('PlayCallback')
21 if id == 0 25 if id == 0
22 throw 'Skipped: bell event not available' 26 throw 'Skipped: bell event not available'
23 endif 27 endif
24 28
25 " Stop it quickly, avoid annoying the user. 29 " Stop it quickly, avoid annoying the user.