2017-02-10 57 views
2

缺少的功能是播放聲音。我正在考慮調用一個系統庫或一個可以接受聲音名稱作爲參數的終端命令。如何在Mac OS X上使用Rebol 2播放聲音

目標是從點擊按鈕中獲得一些聲音。

PS。我使用Mac OS X Panther在iBook G3上使用Rebol/view。

回答

1

不幸的是,在MacOS/OSX上不支持Rebol sound portsound://)。

兩項措施浮現在腦海中:

1)基本終端鍾

prin #"^G" 

2)call出良好的工具,如afplay

call [afplay %/System/Library/Sounds/Ping.aiff] 
+0

Afplay不可用豹。 – felix

+0

@felix - 您需要使用Panther隨附的任何音頻/音響系統。我記得有人通過[osascript]調用Applescript/iTunes(https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/osascript.1.html) – draegtun