Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
4892dcc6
Commit
4892dcc6
authored
17 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Rename USE_SDL build flag to USE_SDL_AUDIO so that we can still build
with SDL audio if we need to in the future.
parent
ad803803
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/xpdev/Common.gmake
+12
-12
12 additions, 12 deletions
src/xpdev/Common.gmake
src/xpdev/gen_defs.h
+1
-1
1 addition, 1 deletion
src/xpdev/gen_defs.h
src/xpdev/xpbeep.c
+6
-6
6 additions, 6 deletions
src/xpdev/xpbeep.c
with
19 additions
and
19 deletions
src/xpdev/Common.gmake
+
12
−
12
View file @
4892dcc6
...
...
@@ -70,32 +70,32 @@ ifeq ($(os),darwin)
endif
# Find SDL headers!
if
n
def
WITHOUT_SDL
ifdef
USE_SDL_AUDIO
ifdef SDL_CONFIG
ifeq ($(shell ${SDL_CONFIG} --cflags > /dev/null 2>&1 && echo YES),YES)
WITH_SDL := 1
WITH_SDL
_AUDIO
:= 1
endif
else
ifeq ($(os),darwin)
ifeq ($(shell if [ -d /Library/Frameworks/SDL.framework ] ; then echo YES ; fi),YES)
WITH_SDL := 1
WITH_SDL
_AUDIO
:= 1
endif
else
ifeq ($(shell sdl-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl-config
WITH_SDL := 1
WITH_SDL
_AUDIO
:= 1
else
ifeq ($(shell sdl13-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl13-config
WITH_SDL := 1
WITH_SDL
_AUDIO
:= 1
else
ifeq ($(shell sdl12-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl12-config
WITH_SDL := 1
WITH_SDL
_AUDIO
:= 1
else
ifeq ($(shell sdl11-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl11-config
WITH_SDL := 1
WITH_SDL
_AUDIO
:= 1
endif
endif
endif
...
...
@@ -104,12 +104,12 @@ ifndef WITHOUT_SDL
endif
endif
ifdef WITH_SDL
ifdef WITH_SDL
_AUDIO
ifdef SDL_CONFIG
ifeq ($(shell ${SDL_CONFIG} --cflags > /dev/null 2>&1 && echo YES),YES)
XPDEV-MT_CFLAGS += -DWITH_SDL
XPDEV-MT_CFLAGS += -DWITH_SDL
_AUDIO
XPDEV-MT_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
XPDEV_CFLAGS += -DWITH_SDL
XPDEV_CFLAGS += -DWITH_SDL
_AUDIO
XPDEV_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
ifdef STATIC_SDL
XPDEV-MT_LIBS += $(shell $(SDL_CONFIG) --static-libs)
...
...
@@ -133,10 +133,10 @@ ifdef WITH_SDL
endif
else
ifeq ($(os),darwin)
XPDEV-MT_CFLAGS += -DWITH_SDL -DSTATIC_SDL
XPDEV-MT_CFLAGS += -DWITH_SDL
_AUDIO
-DSTATIC_SDL
XPDEV-MT_CFLAGS += -I/Library/Frameworks/SDL.framework/Headers
XPDEV-MT_LIBS += -framework SDL -framework Cocoa -framework Carbon -I/Library/Frameworks/SDL.framework/Headers
XPDEV_CFLAGS += -DWITH_SDL -DSTATIC_SDL
XPDEV_CFLAGS += -DWITH_SDL
_AUDIO
-DSTATIC_SDL
XPDEV_CFLAGS += -I/Library/Frameworks/SDL.framework/Headers
XPDEV_LIBS += -framework SDL -framework Cocoa -framework Carbon -I/Library/Frameworks/SDL.framework/Headers
endif
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/gen_defs.h
+
1
−
1
View file @
4892dcc6
...
...
@@ -354,7 +354,7 @@ typedef struct {
#endif
/* Special hackery for SDL */
#ifdef WITH_SDL
#ifdef WITH_SDL
_AUDIO
#include
<SDL.h>
#ifdef main
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/xpbeep.c
+
6
−
6
View file @
4892dcc6
...
...
@@ -49,7 +49,7 @@
#include
"portaudio.h"
#endif
#ifdef WITH_SDL
#ifdef WITH_SDL
_AUDIO
#include
"sdlfuncs.h"
#endif
...
...
@@ -82,7 +82,7 @@ static unsigned char pawave[S_RATE*15/2+1];
static
int
portaudio_initialized
=
FALSE
;
#endif
#ifdef WITH_SDL
#ifdef WITH_SDL
_AUDIO
static
SDL_AudioSpec
spec
;
static
int
sdl_audio_buf_len
=
0
;
static
int
sdl_audio_buf_pos
=
0
;
...
...
@@ -231,7 +231,7 @@ static int portaudio_callback(void *inputBuffer
}
#endif
#ifdef WITH_SDL
#ifdef WITH_SDL
_AUDIO
void
sdl_fillbuf
(
void
*
userdata
,
Uint8
*
stream
,
int
len
)
{
int
copylen
=
len
;
...
...
@@ -297,7 +297,7 @@ BOOL xptone_open(void)
}
#endif
#ifdef WITH_SDL
#ifdef WITH_SDL
_AUDIO
if
(
!
sdl_device_open_failed
)
{
if
(
init_sdl_audio
()
==-
1
)
sdl_device_open_failed
=
TRUE
;
...
...
@@ -438,7 +438,7 @@ BOOL xptone_close(void)
}
#endif
#ifdef WITH_SDL
#ifdef WITH_SDL
_AUDIO
if
(
handle_type
==
SOUND_DEVICE_SDL
)
{
sdl
.
CloseAudio
();
sdl
.
SDL_DestroySemaphore
(
sdlToneDone
);
...
...
@@ -513,7 +513,7 @@ BOOL DLLCALL xptone(double freq, DWORD duration, enum WAVE_SHAPE shape)
}
#endif
#ifdef WITH_SDL
#ifdef WITH_SDL
_AUDIO
if
(
handle_type
==
SOUND_DEVICE_SDL
)
{
sdl
.
LockAudio
();
sdl_audio_buf_pos
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment