Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

討論:音效聲的可行性 #266

Open
oniondelta opened this issue Aug 30, 2023 · 2 comments
Open

討論:音效聲的可行性 #266

oniondelta opened this issue Aug 30, 2023 · 2 comments

Comments

@oniondelta
Copy link

oniondelta commented Aug 30, 2023

最近設置 os.execute() 調出電腦內檔案或開啟網址!
突發奇想,許多形碼,在空碼上屏時,會清屏,並出現「提醒的音效聲」,
如用 os.execute() 播放音效,就得一直開著播放器 XD

爬文知 Lua 不支持原生音頻 API,播放音頻需額外的庫,

好奇,在 librime-lua 原生支持播放音效聲的可行性?😄

@ksqsf
Copy link
Contributor

ksqsf commented Oct 15, 2023

如用 os.execute() 播放音效,就得一直開著播放器

無需一直開啓,只需調用一次性的beep命令即可,如在 macOS 下可使用

os.execute('osascript -e beep')

@oniondelta
Copy link
Author

感謝提供解法!🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants