Skip to content

Commit

Permalink
Bump version to 1.7 ready for release, update ChangeLog, #ifdef surro…
Browse files Browse the repository at this point in the history
…und/harmonic OPL code so it will still compile on an old version of AdPlug
  • Loading branch information
Malvineous committed Jan 1, 2010
1 parent 1134df8 commit df4a1f3
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 10 deletions.
38 changes: 38 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
2009-12-27 08:06 malvineous

* src/adplay.cc: Added --surround option to use the new stereo
harmonic synth, and made this the default (works the same as the
old default mono synth)

2009-12-27 05:53 malvineous

* src/adplay.cc: Revert previous commit (gah, there's a command
line option to do that already!)

2009-12-27 05:19 malvineous

* src/adplay.cc: Display song description/remarks as well as title
and author

2009-12-27 02:39 malvineous

* src/: alsa.cc, output.cc, output.h: Tweaked ALSA code to work
better with certain audio devices

2007-04-16 17:31 dynamite

* NEWS, src/adplay.cc: Reverted default of stereo playback. On
standard AdPlug, where dual OPL2 is emulated, this produces sound
only on the left speaker, when only single OPL2 features are used
by the player. I don't know if this is how it was with old SB
Pro, but it seems to be. Frankly, it's just annoying.

2007-04-14 20:15 dynamite

* NEWS, configure.in, doc/adplay.1, src/adplay.cc: Changed default
subsong to default subsong of file.

2007-04-09 18:29 dynamite

* ChangeLog: Release

2007-04-09 18:21 dynamite

* README, configure.in: Release candidate.
Expand Down
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ This is a brief overview of user-visible changes in adplay.
Changes for version 1.7:
------------------------
- Changed default subsong to default subsong of file.
- ALSA playback works better with recent ALSA releases
- Surround/harmonic synth is now default (use --mono for old behaviour)

Changes for version 1.6:
------------------------
Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AdPlay/UNIX - UNIX console-based OPL2 audio player
Copyright (C) 2001 - 2007 Simon Peter <[email protected]>
Copyright (C) 2001 - 2010 Simon Peter <[email protected]>

Description
-----------
Expand All @@ -15,7 +15,7 @@ The following libraries are needed in order to compile this program:

Library Version
------- -------
AdPlug >= 1.4
AdPlug >= 1.4, or >= 2.2 for full feature support

CVS
---
Expand Down
2 changes: 2 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
AdPlay/UNIX To Do List:
-----------------------
- Remove warning about Ken's synth not working in surround mode once it has
been fixed in AdPlug.
2 changes: 1 addition & 1 deletion adplay.qpg
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<QPM:ProductDescriptionEmbedURL/>
</QPM:ProductDescription>
<QPM:ReleaseDescription>
<QPM:ReleaseVersion>1.6</QPM:ReleaseVersion>
<QPM:ReleaseVersion>1.7</QPM:ReleaseVersion>
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
<QPM:ReleaseNoteMinor/>
Expand Down
2 changes: 1 addition & 1 deletion adplay.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%define name adplay
%define version 1.6
%define version 1.7
%define release 1

Summary: AdLib music player for the command line
Expand Down
16 changes: 13 additions & 3 deletions configure.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Tell autoconf we're compiling a C++ program using automake and libtool.
AC_INIT(adplay,1.6)
AC_INIT(adplay,1.7)
AC_CONFIG_SRCDIR(src/adplay.cc)
AC_CONFIG_FILES(Makefile src/Makefile doc/Makefile)
AC_CANONICAL_TARGET
Expand Down Expand Up @@ -27,12 +27,14 @@ AC_CHECK_LIB(adplug,main,,AC_MSG_ERROR([*** AdPlug not installed ***]))])
AC_CHECK_HEADERS([getopt.h], ,
AC_SUBST(GETOPT_SOURCES, [getopt.c getopt1.c getopt.h]))

# Check if AdPlug supports the new getsubsong() method
AC_MSG_CHECKING([whether AdPlug supports the getsubsong() method])
# Save compiler flags and set up for compiling test programs
oldldflags="$LDFLAGS"
oldcppflags="$CPPFLAGS"
LDFLAGS="$LDFLAGS $adplug_LIBS"
CPPFLAGS="$CPPFLAGS $adplug_CFLAGS"

# Check if AdPlug supports the new getsubsong() method
AC_MSG_CHECKING([whether AdPlug supports the getsubsong() method])
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <adplug/player.h>

class Testplayer: public CPlayer
Expand All @@ -49,6 +51,14 @@ class Testplayer: public CPlayer
Testplayer p;], [p.getsubsong();])],
AC_DEFINE(HAVE_ADPLUG_GETSUBSONG,, [Defined if AdPlug supports the getsubsong() method])
AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]))

# Check if AdPlug supports the new surround/harmonic synth
AC_MSG_CHECKING([whether AdPlug supports the surround/harmonic synth])
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <adplug/surroundopl.h>], [CSurroundopl *dummy;])],
AC_DEFINE(HAVE_ADPLUG_SURROUND,, [Defined if AdPlug supports the surround/harmonic synth])
AC_MSG_RESULT([yes]), AC_MSG_RESULT([no - AdPlug >= 2.2 required]))

# Restore flags after compiling test programs
LDFLAGS="$oldldflags"
CPPFLAGS="$oldcppflags"

Expand Down
9 changes: 7 additions & 2 deletions doc/adplay.1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.\" along with this program; see the file COPYING. If not, write to
.\" the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
.TH ADPLAY 1 "April 29, 2006" "AdPlay/UNIX 1.6" "User Commands"
.TH ADPLAY 1 "January 1, 2010" "AdPlay/UNIX 1.7" "User Commands"
.SH NAME
adplay \- AdPlay/UNIX console-based OPL2 audio player
.SH SYNOPSIS
Expand Down Expand Up @@ -119,7 +119,12 @@ have very obscure audio hardware that only accepts stereo streams. AdPlug
only generates mono streams because the OPL2 only generates mono sound.
.TP
.B --mono
Use only mono samples for playback (default).
Use only mono samples for playback (default if AdPlug <= 2.1.)
.TP
.B --surround
Use only stereo samples for playback, but generate them from two mono OPL2
chips. One OPL2 chip is very slightly transposed to produce a pleasant
harmonic/surround sound effect (default if AdPlug >= 2.2.)
.TP
.B -b --buffer=SIZE
Set sound buffer size to SIZE samples. If you notice sound skipping with the
Expand Down
22 changes: 21 additions & 1 deletion src/adplay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ static struct {
EmuType emutype;
Outputs output;
} cfg = {
2048, 44100, 2, 16, 1, MSG_NOTE,
2048, 44100,
#ifdef HAVE_ADPLUG_SURROUND
2, 16, 1, // Default to surround if available
#else
1, 16, 0, // Else default to mono (until stereo w/ single OPL is fixed)
#endif
MSG_NOTE,
-1,
NULL,
NULL,
Expand Down Expand Up @@ -371,16 +377,24 @@ int main(int argc, char **argv)
switch(cfg.emutype) {
case Emu_Satoh:
if (cfg.harmonic) {
#ifdef HAVE_ADPLUG_SURROUND
Copl *a = new CEmuopl(cfg.freq, cfg.bits == 16, false);
Copl *b = new CEmuopl(cfg.freq, cfg.bits == 16, false);
opl = new CSurroundopl(a, b, cfg.bits == 16);
// CSurroundopl now owns a and b and will free upon destruction
#else
fprintf(stderr, "Surround requires AdPlug v2.2 or newer. Use --mono "
"or upgrade and recompile AdPlay.\n");
if(userdb) free(userdb);
exit(EXIT_FAILURE);
#endif
} else {
opl = new CEmuopl(cfg.freq, cfg.bits == 16, cfg.channels == 2);
}
break;
case Emu_Ken:
if (cfg.harmonic) {
#ifdef HAVE_ADPLUG_SURROUND
fprintf(stderr, "%s: Sorry, Ken's emulator only supports one instance "
"so does not work properly in surround mode.\n", program_name);
// Leave the code though for future use (once Ken's emu is wrapped up
Expand All @@ -389,6 +403,12 @@ int main(int argc, char **argv)
Copl *b = new CKemuopl(cfg.freq, cfg.bits == 16, false);
opl = new CSurroundopl(a, b, cfg.bits == 16);
// CSurroundopl now owns a and b and will free upon destruction
#else
fprintf(stderr, "Surround requires AdPlug v2.2 or newer. Use --mono "
"or upgrade and recompile AdPlay.\n");
if(userdb) free(userdb);
exit(EXIT_FAILURE);
#endif
} else {
opl = new CKemuopl(cfg.freq, cfg.bits == 16, cfg.channels == 2);
}
Expand Down

0 comments on commit df4a1f3

Please sign in to comment.