Mercurial > vim
comparison src/sound.c @ 24842:237dace53473 v8.2.2959
patch 8.2.2959: sound_playfile() is not tested on MS-Windows
Commit: https://github.com/vim/vim/commit/2f9c209ba089d81fd727122bbe0ae1da00585d80
Author: Dominique Pelle <dominique.pelle@gmail.com>
Date: Mon Jun 7 20:28:45 2021 +0200
patch 8.2.2959: sound_playfile() is not tested on MS-Windows
Problem: sound_playfile() is not tested on MS-Windows.
Solution: Make it work and enable the test. (Dominique Pell?, closes https://github.com/vim/vim/issues/8338)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 07 Jun 2021 20:30:03 +0200 |
parents | e47b04b01793 |
children | 1cde96e768e4 |
comparison
equal
deleted
inserted
replaced
24841:2393bed3aefb | 24842:237dace53473 |
---|---|
353 | 353 |
354 wp = enc_to_utf16(tv_get_string(&argvars[0]), NULL); | 354 wp = enc_to_utf16(tv_get_string(&argvars[0]), NULL); |
355 if (wp == NULL) | 355 if (wp == NULL) |
356 return; | 356 return; |
357 | 357 |
358 PlaySoundW(wp, NULL, SND_ASYNC | SND_ALIAS); | 358 if (PlaySoundW(wp, NULL, SND_ASYNC | SND_ALIAS)) |
359 rettv->vval.v_number = ++sound_id; | |
359 free(wp); | 360 free(wp); |
360 | |
361 rettv->vval.v_number = ++sound_id; | |
362 } | 361 } |
363 | 362 |
364 void | 363 void |
365 f_sound_playfile(typval_T *argvars, typval_T *rettv) | 364 f_sound_playfile(typval_T *argvars, typval_T *rettv) |
366 { | 365 { |