aboutsummaryrefslogtreecommitdiff
path: root/src/aoblipplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/aoblipplayer.cpp')
-rw-r--r--src/aoblipplayer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/aoblipplayer.cpp b/src/aoblipplayer.cpp
index 74757c50..0a8b4279 100644
--- a/src/aoblipplayer.cpp
+++ b/src/aoblipplayer.cpp
@@ -12,9 +12,11 @@ void AOBlipPlayer::set_blips(QString p_sfx)
for (int n_stream = 0 ; n_stream < 5 ; ++n_stream)
{
+ #ifdef BASSAUDIO
BASS_StreamFree(m_stream_list[n_stream]);
m_stream_list[n_stream] = BASS_StreamCreateFile(FALSE, f_path.utf16(), 0, 0, BASS_UNICODE | BASS_ASYNCFILE);
+ #endif
}
set_volume(m_volume);
@@ -28,10 +30,11 @@ void AOBlipPlayer::blip_tick()
m_cycle = 0;
HSTREAM f_stream = m_stream_list[f_cycle];
-
+ #ifdef BASSAUDIO
if (ao_app->get_audio_output_device() != "default")
BASS_ChannelSetDevice(f_stream, BASS_GetDevice());
BASS_ChannelPlay(f_stream, false);
+ #endif
}
void AOBlipPlayer::set_volume(int p_value)
@@ -42,6 +45,8 @@ void AOBlipPlayer::set_volume(int p_value)
for (int n_stream = 0 ; n_stream < 5 ; ++n_stream)
{
+ #ifdef BASSAUDIO
BASS_ChannelSetAttribute(m_stream_list[n_stream], BASS_ATTRIB_VOL, volume);
+ #endif
}
}