Added in 1.9.0
_
/splay -cmpqw [filename | stop | pause | resume | seek | skip] [pos]
Plays the specified sound, which can be a .wav, .mid, or .mp3 file.
When a sound finishes playing, it triggers a sound event.
Playing mp3 files with large ID3 tags and/or album art, may not work.
See also on SONGEND, on MP3END, on WAVEEND, on MIDIEND, $filename, $sound, $mp3dir, $wavedir, $mididir, $insong , /vol, $vol.
Switches
Switch | Description |
-c | Clears the song queue. |
-m | Midi. |
-p | Mp3. |
-q | Queue song to play after current song. |
-w | Wave. |
Parameters
Parameter | Description |
[filename | stop | pause | resume | seek | skip] | File to play or operation to perform on current song. |
[pos] | If pos is defined, file will start playing at position pos. |
Example
; Match on "play a song" then play "mysong.mp3" on *:TEXT:play a song:*:splay c:\mysong.mp3
Note: The -q switch allows adding the sound to the queue instead of interrupting the currently playing sound. However each type of sound file has a different response to using/not-using the -q switch as it interacts with other filetypes.
If an MP3 is already playing, and you use "/splay filename.mp3" without using the -q switch, the current MP3 stops playing in order to play your new MP3, and when it finishes, the original MP3 does NOT play, and instead you'll hear whatever is the next file in the queue, if any.
However, if an MP3 is currently playing and you play a MIDI or WAV without using the -q switch, the new sound plays without stopping the existing MP3. While this seems strange to allow playing 3 different songs at the same time, this is important because it can allow you to hear an alert.wav immediately without waiting for the existing MP3 to finish. It's also used in scripting arcade games where you have 3 kinds of sounds playing together to complement each other. Even though the current sound is interrupted when you use /splay without the -q switch, the queue remains unaffected, and those sounds will play next.
Using the -q switch will put a sound file into the queue, even if the currently playing sound is of a different filetype. MP3 MIDI and WAV all share the same queue, so sounds will play in the order in which they were added to the queue, and the queue'ed sounds play 1 at a time, so you won't have a WAV and an MP3 coming out of the que to play at the same time, like can happen without using the -q switch.
Troubleshooting Sound: the default install of AdiIRC does not have sound enabled, so you will not hear any sound file you play until you check the "enable sounds" box in options/sounds.
By default, AdiIRC looks for sound files in the 'sounds' subfolder beneath the folder where config.ini is located. If you wish to change that location, see options/sounds/"sound folders" where you can optionally create subfolders for each type of sound file. Either as brother folders to 'sound' or subfolders beneath it.
Also, by default all your sound files will be downloaded by DCC GET into the same "downloads" subfolder where all other files get downloaded. If you wish to have them downloaded into the same folder where /splay looks for them, you will also need to go to options/DCC/"dcc get folders" and create an entry there for *.mp3 which matches the options/Sounds folder where it's looking for mp3 filetypes. If you have done this correctly, these will point to the same folder:
//echo -a $getdir(*.mp3) and $mp3dir //echo -a $getdir(*.wav) and $wavedir
If you STILL cannot hear sounds, be aware that AdiIRC uses the master sound settings for the computer, so if the volume level is turned down, or mute is enabled then you won't hear anything. To troubleshoot, paste the next comand into an editbox. The first number is the loudness on a scale of 0 to 65535, with 65535 being 100%. If the 2nd word is $true then your computer itself has the sounds muted.
//echo -a $vol(master) $vol(master).mute
If the volume is too low or is muted, you can use your computer's speaker icon near the bottom pc taskbar's clock to change the volume or to un-mute it. If you STILL cannot hear the sound, make sure your speakers themselves are turned on and have the volume turned up too.
In summary, the loudness of the song you hear, or whether you even hear it at all - is affected by 4 things - Whether sound is enabled in AdiIRC, the volume level the file itself was recorded at, the volume setting in the computer's speaker icon and whether the mute it set there, and whether the speaker itself is turn on and turned up.
You can also change your mute-state and the volume from within AdiIRC:
Turns mute ON so you cannot hear: /vol -vu1 Turns mute OFF so you can hear: /vol -vu2 Turn the volume to 100% max: /vol -v 65535
Updated by Per Amundsen over 1 year ago · 10 revisions