Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ Suggestions
➜ sound support
Posting of new messages is disabled at present.
Refresh page
Posted by
| Tspivey
Canada (54 posts) Bio
|
Date
| Sat 12 Nov 2005 02:07 AM (UTC) |
Message
| I think that sound support should call a function with the name of the
sound file that is wanting to be played. Personally, I think that the
sound support not being able to play more than 1 sound at once is quite
annoying, and want to override it cleanly without needing to use an
alias that would be incompatible with the rest of the system.
| Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 12 Nov 2005 07:07 PM (UTC) Amended on Sat 12 Nov 2005 07:28 PM (UTC) by Nick Gammon
|
Message
| I don't see why not.
Version 3.69 now supports a plugin callback that lets you override default sound output. Here is an example:
function OnPluginPlaySound (sound)
Note ("Playing sound " .. sound)
end -- function
Of course, you would normally do something more complicated than doing a Note. Inside the plugin you can use COM objects or other techniques to play multiple sounds at once. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Tspivey
Canada (54 posts) Bio
|
Date
| Reply #2 on Sat 12 Nov 2005 10:40 PM (UTC) |
Message
| What will this do if a "stop all sound" command is issued from the menu or the stopSound function?
Would a check for an empty string be sufficient to tell your custom sound
function to stop? | Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Date
| Reply #3 on Sun 13 Nov 2005 01:04 AM (UTC) |
Message
| I was hoping you wouldn't ask that, but as you have, I have amended it so that the "stop sound playing" menu item will call your plugin with an empty sound name. You could use that to tell your sounds to stop. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
12,886 views.
Posting of new messages is disabled at present.
Refresh page
top