aboutsummaryrefslogtreecommitdiff
path: root/src/aomusicplayer.cpp
diff options
context:
space:
mode:
authorSalanto <support@salanto.de>2021-05-05 00:42:48 +0200
committerSalanto <support@salanto.de>2021-05-05 00:42:48 +0200
commitb8b6d3cbb32801fed87052e60fce73ea24cc684d (patch)
tree8809c7c2346e5bf540a78a545a713622fff0d2f6 /src/aomusicplayer.cpp
parent004bf12428eee35998d5246972ac77504a244696 (diff)
Add musclist streaming support
Attempt Nr. 2 - Based on #548 and #501 + Allows client to use a remote source as a last resort if the file can't be found locally. + Adds a check if the target file is missing. This implementation assumed the streaming source to be structured like a webao content respository
Diffstat (limited to 'src/aomusicplayer.cpp')
-rw-r--r--src/aomusicplayer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/aomusicplayer.cpp b/src/aomusicplayer.cpp
index 8a3142eb..e8bd690c 100644
--- a/src/aomusicplayer.cpp
+++ b/src/aomusicplayer.cpp
@@ -13,12 +13,12 @@ AOMusicPlayer::~AOMusicPlayer()
}
}
-void AOMusicPlayer::play(QString p_song, int channel, bool loop,
+int AOMusicPlayer::play(QString p_song, int channel, bool loop,
int effect_flags)
{
channel = channel % m_channelmax;
if (channel < 0) // wtf?
- return;
+ return BASS_ERROR_NOCHAN;
QString f_path = ao_app->get_music_path(p_song);
unsigned int flags = BASS_STREAM_PRESCAN | BASS_STREAM_AUTOFREE |
@@ -125,6 +125,7 @@ void AOMusicPlayer::play(QString p_song, int channel, bool loop,
this->set_looping(loop, channel); // Have to do this here due to any
// crossfading-related changes, etc.
+ return BASS_ErrorGetCode();
}
void AOMusicPlayer::stop(int channel)