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
path: root/intern
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2008-09-21 17:03:39 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2008-09-21 17:03:39 +0400
commit518b8fe01834b6379614f65f7c611645e5ad4bd5 (patch)
tree4ae32e35c1faa81b9df422280e533358d9ab8780 /intern
parentfc312fae98f54b56d00812fee64aa9e9e1ee74ff (diff)
parent92829e821f345596edec123e06187186e2471027 (diff)
svn merge -r 16593:16648 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'intern')
-rw-r--r--intern/SoundSystem/SConscript3
-rw-r--r--intern/SoundSystem/sdl/SND_SDLCDDevice.cpp17
2 files changed, 19 insertions, 1 deletions
diff --git a/intern/SoundSystem/SConscript b/intern/SoundSystem/SConscript
index baf680f03f0..be19c4b7915 100644
--- a/intern/SoundSystem/SConscript
+++ b/intern/SoundSystem/SConscript
@@ -14,4 +14,7 @@ if env['WITH_BF_OPENAL']:
else:
defs = 'NO_SOUND'
+if not env['WITH_BF_SDL']:
+ defs += ' DISABLE_SDL'
+
env.BlenderLib ('bf_soundsystem', sources, Split(incs), Split(defs), libtype=['core','player'], priority = [20,140] )
diff --git a/intern/SoundSystem/sdl/SND_SDLCDDevice.cpp b/intern/SoundSystem/sdl/SND_SDLCDDevice.cpp
index 8bb6c642b11..0ab0fa94c7b 100644
--- a/intern/SoundSystem/sdl/SND_SDLCDDevice.cpp
+++ b/intern/SoundSystem/sdl/SND_SDLCDDevice.cpp
@@ -55,6 +55,10 @@ SND_SDLCDDevice::SND_SDLCDDevice() :
void SND_SDLCDDevice::init()
{
+#ifdef DISABLE_SDL
+ fprintf(stderr, "Blender compiled without SDL, no CDROM support\n");
+ return;
+#else
if (SDL_InitSubSystem(SDL_INIT_CDROM))
{
fprintf(stderr, "Error initializing CDROM\n");
@@ -75,19 +79,23 @@ void SND_SDLCDDevice::init()
/* Did if open? Check if cdrom is NULL */
if(!m_cdrom)
{
- fprintf(stderr, "Couldn't open drive: %s", SDL_GetError());
+ fprintf(stderr, "Couldn't open drive: %s\n", SDL_GetError());
return;
}
+#endif
}
SND_SDLCDDevice::~SND_SDLCDDevice()
{
+#ifndef DISABLE_SDL
StopCD();
SDL_CDClose(m_cdrom);
+#endif
}
void SND_SDLCDDevice::NextFrame()
{
+#ifndef DISABLE_SDL
m_frame++;
m_frame &= 127;
@@ -111,20 +119,24 @@ void SND_SDLCDDevice::NextFrame()
}
}
+#endif
}
void SND_SDLCDDevice::PlayCD(int track)
{
+#ifndef DISABLE_SDL
if ( m_cdrom && CD_INDRIVE(SDL_CDStatus(m_cdrom)) ) {
SDL_CDPlayTracks(m_cdrom, track-1, 0, track, 0);
m_cdplaying = true;
m_cdtrack = track;
}
+#endif
}
void SND_SDLCDDevice::PauseCD(bool pause)
{
+#ifndef DISABLE_SDL
if (!m_cdrom)
return;
@@ -132,13 +144,16 @@ void SND_SDLCDDevice::PauseCD(bool pause)
SDL_CDPause(m_cdrom);
else
SDL_CDResume(m_cdrom);
+#endif
}
void SND_SDLCDDevice::StopCD()
{
+#ifndef DISABLE_SDL
if (m_cdrom)
SDL_CDStop(m_cdrom);
m_cdplaying = false;
+#endif
}
void SND_SDLCDDevice::SetCDPlaymode(int playmode)