aboutsummaryrefslogtreecommitdiff
path: root/src/aosfxplayer.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-11-04 15:32:01 +0300
committerCrystalwarrior <varsash@gmail.com>2019-11-04 15:32:01 +0300
commit773a61f3d4ce2284b2d5d753b5c696f7bd44a531 (patch)
tree66a897474b6a341e09afa9792da443e7dcd72bdc /src/aosfxplayer.cpp
parentf575f07770c440fe753991b55dc108835fdb0f80 (diff)
Make the music search bar search in music metadata instead of just the displayed name (aka the filepath)
Make sfx player able to play sfx without the file extension provided Allow blipsounds to seek in blips/ folder to allow better categorization, as well as direct sound references add get_emote_blip for detecting the blipsound used by an emote. Currently unused. Less strict/hardcoded custom objection detection system Allow system (charid -1) messages, and don't do the same message detection on blankposting Allow objection, hold it, take that and custom sound players to detect sounds that are not exclusively .wav
Diffstat (limited to 'src/aosfxplayer.cpp')
-rw-r--r--src/aosfxplayer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/aosfxplayer.cpp b/src/aosfxplayer.cpp
index ca2b3930..cc019725 100644
--- a/src/aosfxplayer.cpp
+++ b/src/aosfxplayer.cpp
@@ -56,6 +56,9 @@ void AOSfxPlayer::play(QString p_sfx, QString p_char, QString shout, int channel
else
f_path = sound_path;
+ if (!file_exists(f_path))
+ f_path = ao_app->get_sfx_suffix(f_path); //If we're not given a sound file with .wav/.ogg/.opus already there, let's do this thing
+
m_stream_list[channel] = BASS_StreamCreateFile(FALSE, f_path.utf16(), 0, 0, BASS_STREAM_AUTOFREE | BASS_UNICODE | BASS_ASYNCFILE);
set_volume_internal(m_volume);