summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman_oal.cpp
diff options
context:
space:
mode:
authorRoman Masanin <36927roma@gmail.com>2020-09-13 20:45:53 +0200
committerRoman Masanin <36927roma@gmail.com>2020-09-13 20:45:53 +0200
commit8f948228d5e60eb89055a8d40210e99e9f4f2c47 (patch)
treeee8c238c77e53e29c650d911e9d198452f5a7ba9 /src/audio/sampman_oal.cpp
parentvehicle audio(first part) and temp fix for openAL (diff)
parentMerge pull request #702 from Sergeanur/VC/MusicManager (diff)
downloadre3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.gz
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.bz2
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.lz
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.xz
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.zst
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.zip
Diffstat (limited to 'src/audio/sampman_oal.cpp')
-rw-r--r--src/audio/sampman_oal.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index 1e9f60fd..0b59766f 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -131,6 +131,7 @@ uint32 nNumMP3s;
CStream *aStream[MAX_STREAMS];
uint8 nStreamPan [MAX_STREAMS];
uint8 nStreamVolume[MAX_STREAMS];
+uint8 nStreamLoopedFlag[MAX_STREAMS];
///////////////////////////////////////////////////////////////
// Env Size Diffus Room RoomHF RoomLF DecTm DcHF DcLF Refl RefDel Ref Pan Revb RevDel Rev Pan EchTm EchDp ModTm ModDp AirAbs HFRef LFRef RRlOff FLAGS
@@ -468,6 +469,38 @@ int8 cSampleManager::SetCurrent3DProvider(uint8 nProvider)
return curprovider;
}
+int8
+cSampleManager::AutoDetect3DProviders()
+{
+ if (!AudioManager.IsAudioInitialised())
+ return -1;
+
+ int eax = -1, eax2 = -1, eax3 = -1, ds3dh = -1, ds3ds = -1;
+
+ for (uint32 i = 0; i < GetNum3DProvidersAvailable(); i++)
+ {
+ char* providername = Get3DProviderName(i);
+
+ if (!strcasecmp(providername, "OPENAL SOFT")) {
+ SetCurrent3DProvider(i);
+ if (GetCurrent3DProviderIndex() == i)
+ return i;
+ }
+ }
+
+ if (eax3 != -1)
+ return eax3;
+ if (eax2 != -1)
+ return eax2;
+ if (eax != -1)
+ return eax;
+ if (ds3dh != -1)
+ return ds3dh;
+ if (ds3ds != -1)
+ return ds3ds;
+ return -1;
+}
+
bool
cSampleManager::IsMP3RadioChannelAvailable(void)
{
@@ -730,6 +763,12 @@ cSampleManager::SetMusicMasterVolume(uint8 nVolume)
}
void
+cSampleManager::SetMP3BoostVolume(uint8 nVolume)
+{
+ m_nMP3BoostVolume = nVolume;
+}
+
+void
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
{
m_nEffectsFadeVolume = nVolume;
@@ -1468,4 +1507,11 @@ cSampleManager::InitialiseSampleBanks(void)
return true;
}
+void
+cSampleManager::SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nChannel)
+{
+ if (m_bInitialised)
+ nStreamLoopedFlag[nChannel] = nLoopFlag;
+}
+
#endif