Skip to content

Commit

Permalink
OSS sound tidying up and change request from FreeBSD ports.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGriffith committed May 26, 2015
1 parent a158215 commit 58a174d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ COLOR_DEFS = -DCOLOR_SUPPORT
# Define your sound device
# This should probably be a command-line/config-file option.
#
#SOUND_DEV = /dev/dsp
SOUND_DEV = /dev/dsp
#SOUND_DEV = /dev/sound
#SOUND_DEV = /dev/audio

Expand Down Expand Up @@ -184,7 +184,7 @@ BLORB_OBJECT = $(BLORB_DIR)/blorblib.o
TARGETS = $(COMMON_TARGET) $(CURSES_TARGET) $(BLORB_TARGET)

OPT_DEFS = -DCONFIG_DIR="\"$(CONFIG_DIR)\"" $(CURSES_DEF) \
-DVERSION="\"$(VERSION)\""
-DVERSION="\"$(VERSION)\"" -DSOUND_DEV="\"$(SOUND_DEV)\""

CURSES_DEFS = $(OPT_DEFS) $(COLOR_DEFS) $(SOUND_DEFS) $(SOUNDCARD) \
$(MEMMOVE_DEF)
Expand Down
4 changes: 2 additions & 2 deletions src/curses/ux_audio_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static void sigterm_handler(int signal) {
_exit(0);
}

static void sigint_handler(int signal) {
static void oss_sigint_handler(int signal) {
num_repeats = 1;
}

Expand Down Expand Up @@ -141,7 +141,7 @@ static void play_sound(int volume, int repeats) {
sigaddset(&sa.sa_mask, SIGTERM);
sa.sa_flags = 0;
sigaction(SIGTERM, &sa, NULL);
sa.sa_handler = sigint_handler;
sa.sa_handler = oss_sigint_handler;
sigaction(SIGINT, &sa, NULL);

for (num_repeats = repeats; num_repeats > 0;
Expand Down
16 changes: 16 additions & 0 deletions src/misc/findsound.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
INCLUDE1="/usr/include/sys"
INCLUDE2="/usr/include"
INCLUDE3="/usr/include/machine"
INCLUDE4="/usr/include/linux"

SOUNDCARD_H="soundcard.h"
OUTFILE="$1/soundcard.h"
Expand Down Expand Up @@ -88,3 +89,18 @@ if [ -f $FILE ] ; then
fi



FILE=$INCLUDE4/$SOUNDCARD_H
if [ -f $FILE ] ; then
echo "I see we have $FILE..."
echo
if [ -r $FILE ] ; then
echo '#include <linux/soundcard.h>' >> $OUTFILE
else
echo "====================================="
echo "Oops... Can't read $FILE!"
echo "====================================="
exit 3
fi
exit 0
fi

0 comments on commit 58a174d

Please sign in to comment.