summaryrefslogtreecommitdiffstats
path: root/src/audio/DMAudio.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio/DMAudio.cpp114
1 files changed, 52 insertions, 62 deletions
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index b3c16941..486daebf 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -65,6 +65,15 @@ cDMAudio::SetMonoMode(uint8 mono)
}
void
+cDMAudio::SetMP3BoostVolume(uint8 volume)
+{
+ uint8 vol = volume;
+ if (vol > MAX_VOLUME) vol = MAX_VOLUME;
+
+ AudioManager.SetMP3BoostVolume(vol);
+}
+
+void
cDMAudio::SetEffectsMasterVolume(uint8 volume)
{
uint8 vol = volume;
@@ -112,70 +121,9 @@ cDMAudio::Get3DProviderName(uint8 id)
return AudioManager.Get3DProviderName(id);
}
-// TODO(Miami): Content of this moved to cSampleManager or cAudioManager
int8 cDMAudio::AutoDetect3DProviders(void)
{
- if (!AudioManager.IsAudioInitialised())
- return -1;
-
- int eax = -1, eax2 = -1, eax3 = -1, ds3dh = -1, ds3ds = -1;
-
- for ( int32 i = 0; i < GetNum3DProvidersAvailable(); i++ )
- {
- char *providername = Get3DProviderName(i);
- strupr(providername);
-
-#if defined(AUDIO_OAL)
- if (!strcmp(providername, "OPENAL SOFT")) {
- SetCurrent3DProvider(i);
- if (GetCurrent3DProviderIndex() == i)
- return i;
- }
-#else
- if (!strcmp(providername, "CREATIVE LABS EAX 3 (TM)")) {
- SetCurrent3DProvider(i);
- if (GetCurrent3DProviderIndex() == i) {
- eax3 = i;
- }
- }
-
- if (!strcmp(providername, "CREATIVE LABS EAX 2 (TM)")) {
- SetCurrent3DProvider(i);
- if (GetCurrent3DProviderIndex() == i)
- eax2 = i;
- }
-
- if (!strcmp(providername, "CREATIVE LABS EAX (TM)")) {
- SetCurrent3DProvider(i);
- if (GetCurrent3DProviderIndex() == i)
- eax = i;
- }
-
- if (!strcmp(providername, "DIRECTSOUND3D HARDWARE SUPPORT")) {
- SetCurrent3DProvider(i);
- if (GetCurrent3DProviderIndex() == i)
- ds3dh = i;
- }
-
- if (!strcmp(providername, "DIRECTSOUND3D SOFTWARE EMULATION")) {
- SetCurrent3DProvider(i);
- if (GetCurrent3DProviderIndex() == i)
- ds3ds = i;
- }
-#endif
- }
-
- 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;
+ return AudioManager.AutoDetect3DProviders();
}
int8
@@ -392,3 +340,45 @@ cDMAudio::SetRadioChannel(int8 radio, int32 pos)
{
MusicManager.SetRadioChannelByScript(radio, pos);
}
+
+void
+cDMAudio::SetStartingTrackPositions(uint8 isStartGame)
+{
+ MusicManager.SetStartingTrackPositions(isStartGame);
+}
+
+float *
+cDMAudio::GetListenTimeArray()
+{
+ return MusicManager.GetListenTimeArray();
+}
+
+uint32
+cDMAudio::GetFavouriteRadioStation()
+{
+ return MusicManager.GetFavouriteRadioStation();
+}
+
+int32
+cDMAudio::GetRadioPosition(uint32 station)
+{
+ return MusicManager.GetRadioPosition(station);
+}
+
+void
+cDMAudio::SetPedTalkingStatus(CPed *ped, uint8 status)
+{
+ return AudioManager.SetPedTalkingStatus(ped, status);
+}
+
+void
+cDMAudio::SetPlayersMood(uint8 mood, int32 time)
+{
+ return AudioManager.SetPlayersMood(mood, time);
+}
+
+void
+cDMAudio::ShutUpPlayerTalking(uint8 state)
+{
+ AudioManager.m_bIsPlayerShutUp = state;
+} \ No newline at end of file