annotate R/rdyncall/demo/Win32PlaySound.R @ 34:2682a627168c
- breaking changes:
* restrict 'Z' conversions to immutable types
* restrict 'p' to mutable types (and handles)
author |
Tassilo Philipp |
date |
Sun, 12 Apr 2020 19:37:37 +0200 |
parents |
0cfcc391201f |
children |
|
rev |
line source |
0
|
1 # Package: rdyncall
|
|
2 # File: demo/Win32PlaySound.R
|
|
3 # Description: Win32 Demo, playing a wav file (dynbind demo)
|
|
4
|
|
5 if (.Platform$OS.type == "windows") {
|
|
6
|
|
7 dynbind("winmm", "PlaySoundA(Zii)v;", callmode="stdcall")
|
|
8 tada <- paste( Sys.getenv("SystemRoot"), "\\Media\\tada.wav", sep="" )
|
|
9 PlaySoundA(tada,0,0)
|
|
10
|
|
11 } else {
|
|
12 cat("This demo is runnable on windows only.")
|
|
13 }
|
|
14
|