Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Gribnau <mail@maartengribnau.com>2002-11-05 00:50:33 +0300
committerMaarten Gribnau <mail@maartengribnau.com>2002-11-05 00:50:33 +0300
commitbd39a84c8b22c69017cfd05bf7c0d063b8a62ff1 (patch)
tree841705fa0cb2c7c4cfeb06226db637114b7ef066 /intern/SoundSystem/fmod
parentc458cc73102e920e54bc1f997fc8d3f16c9eb34d (diff)
Added fmod sound for OSX and fixed some endian problems in
gameengine/SoundSystem to get it to work. Maarten (mail@maartengribnau.com)
Diffstat (limited to 'intern/SoundSystem/fmod')
-rw-r--r--intern/SoundSystem/fmod/SND_FmodDevice.cpp44
1 files changed, 40 insertions, 4 deletions
diff --git a/intern/SoundSystem/fmod/SND_FmodDevice.cpp b/intern/SoundSystem/fmod/SND_FmodDevice.cpp
index 862703d0d59..cc01b864428 100644
--- a/intern/SoundSystem/fmod/SND_FmodDevice.cpp
+++ b/intern/SoundSystem/fmod/SND_FmodDevice.cpp
@@ -366,19 +366,31 @@ void SND_FmodDevice::SetObjectLoop(int id, unsigned int loopmode) const
{
case SND_LOOP_OFF:
{
+#ifndef __APPLE__
char result = FSOUND_Sample_SetLoopMode(m_sources[id], FSOUND_LOOP_OFF);
+#else
+ char result = FSOUND_SetLoopMode(m_sources[id], FSOUND_LOOP_OFF);
+#endif
// char result = FSOUND_SetLoopMode(m_channels[id], FSOUND_LOOP_OFF);
break;
}
case SND_LOOP_NORMAL:
{
+#ifndef __APPLE__
char result = FSOUND_Sample_SetLoopMode(m_sources[id], FSOUND_LOOP_NORMAL);
+#else
+ char result = FSOUND_SetLoopMode(m_sources[id], FSOUND_LOOP_NORMAL);
+#endif
// char result = FSOUND_SetLoopMode(m_channels[id], FSOUND_LOOP_NORMAL);
break;
}
case SND_LOOP_BIDIRECTIONAL:
{
+#ifndef __APPLE__
char result = FSOUND_Sample_SetLoopMode(m_sources[id], FSOUND_LOOP_BIDI);
+#else
+ char result = FSOUND_SetLoopMode(m_sources[id], FSOUND_LOOP_BIDI);
+#endif
// char result = FSOUND_SetLoopMode(m_channels[id], FSOUND_LOOP_NORMAL);
break;
}
@@ -460,10 +472,14 @@ void SND_FmodDevice::SetObjectTransform(int id,
void SND_FmodDevice::PlayCD(int track) const
{
+#ifndef __APPLE__
signed char result = FSOUND_CD_Play(track);
+#else
+ signed char result = FSOUND_CD_Play(0, track);
+#endif
#ifdef ONTKEVER
- printf("play track %d, result: %c\n", track, result);
+ printf("SND_FmodDevice::PlayCD(): track=%d, result=%d\n", track, (int)result);
#endif
}
@@ -471,10 +487,14 @@ void SND_FmodDevice::PlayCD(int track) const
void SND_FmodDevice::PauseCD(bool pause) const
{
+#ifndef __APPLE__
signed char result = FSOUND_CD_SetPaused(pause);
+#else
+ signed char result = FSOUND_CD_SetPaused(0, pause);
+#endif
#ifdef ONTKEVER
- printf("pause cd: %d, result: %c\n", pause, result);
+ printf("SND_FmodDevice::PauseCD(): pause=%d, result=%d\n", pause, (int)result);
#endif
}
@@ -488,10 +508,14 @@ void SND_FmodDevice::StopCD() const
{
if (pCD->GetUsed())
{
+#ifndef __APPLE__
signed char result = FSOUND_CD_Stop();
+#else
+ signed char result = FSOUND_CD_Stop(0);
+#endif
#ifdef ONTKEVER
- printf("stop cd, result: %c\n", result);
+ printf("SND_FmodDevice::StopCD(): result=%d\n", (int)result);
#endif
}
}
@@ -501,7 +525,15 @@ void SND_FmodDevice::StopCD() const
void SND_FmodDevice::SetCDPlaymode(int playmode) const
{
+#ifndef __APPLE__
FSOUND_CD_SetPlayMode(playmode);
+#else
+ FSOUND_CD_SetPlayMode(0, playmode);
+#endif
+
+#ifdef ONTKEVER
+ printf("SND_FmodDevice::SetCDPlaymode(): playmode=%d,\n", playmode);
+#endif
}
@@ -509,10 +541,14 @@ void SND_FmodDevice::SetCDPlaymode(int playmode) const
void SND_FmodDevice::SetCDGain(MT_Scalar gain) const
{
int volume = gain * 255;
+#ifndef __APPLE__
signed char result = FSOUND_CD_SetVolume(volume);
+#else
+ signed char result = FSOUND_CD_SetVolume(0, volume);
+#endif
#ifdef ONTKEVER
- printf("gain: %f, volume: %d, result: %c\n", gain, volume, result);
+ printf("SND_FmodDevice::SetCDGain(): gain=%f, volume=%d, result=%d\n", gain, volume, (int)result);
#endif
}