Commits

J.A. Roberts Tunney  committed 4889061

cleanup, now has m4 file and installs a man page

  • Participants
  • Parent commits 1808b23

Comments (0)

Files changed (4)

 
 syntax: glob
-
-.svn
 *.la
 *.lai
 *.lo
 TAGS
 soundtouch4c-*.tar.gz
 soundtouch4c-demo
+soundtouch4c.7
 
 .deps
 .libs
 
-EXTRA_DIST      = bootstrap.sh data/monkeys-8khz-slin.raw
 SUBDIRS         = 
 AUTOMAKE_OPTS   = gnu
 ACLOCAL_AMFLAGS = -I m4
+EXTRA_DIST      = bootstrap.sh data/monkeys-8khz-slin.raw m4/soundtouch4c.m4
+man7_MANS       = soundtouch4c.7
 
 AUX_DIST = \
 	config/config.guess \
 	config/missing
 
 MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config.h.in \
-	$(AUX_DIST)
+	soundtouch4c.7 $(AUX_DIST)
 
-AM_CC       = g++
-AM_CFLAGS   = -Isrc
-AM_CPPFLAGS = $(AM_CFLAGS)
-AM_LDFLAGS  = 
+AM_CC                        = g++
+AM_CFLAGS                    = -Isrc
+AM_CPPFLAGS                  = $(AM_CFLAGS)
+AM_LDFLAGS                   = 
 
-lib_LTLIBRARIES             = libsoundtouch4c.la
-bin_PROGRAMS                = soundtouch4c-demo
-library_includedir          = $(prefix)/include
-library_include_HEADERS     = src/soundtouch4c.h
+lib_LTLIBRARIES              = libsoundtouch4c.la
+bin_PROGRAMS                 = soundtouch4c-demo
+library_includedir           = $(prefix)/include
+library_include_HEADERS      = src/soundtouch4c.h
 
-libsoundtouch4c_la_SOURCES  = src/soundtouch4c.cpp
-libsoundtouch4c_la_CPPFLAGS = $(AM_CFLAGS) @SOUNDTOUCH_CXXFLAGS@
-libsoundtouch4c_la_LDFLAGS  = $(AM_LDFLAGS) -lstdc++ @SOUNDTOUCH_LIBS@
-libsoundtouch4c_la_LIBADD   = 
+libsoundtouch4c_la_SOURCES   = src/soundtouch4c.cpp
+libsoundtouch4c_la_CPPFLAGS  = $(AM_CFLAGS) @SOUNDTOUCH_CXXFLAGS@
+libsoundtouch4c_la_LIBADD    = -lstdc++ @SOUNDTOUCH_LIBS@
 
-soundtouch4c_demo_SOURCES   = src/example.c
-soundtouch4c_demo_LDADD     = libsoundtouch4c.la
+soundtouch4c_demo_SOURCES    = src/example.c
+soundtouch4c_demo_LDADD      = libsoundtouch4c.la
+
+m4datadir                    = $(datadir)/aclocal
+m4data_DATA                  = m4/soundtouch4c.m4
 
 # generate ChangeLog using mercurial
 dist-hook:
-	hg log --style changelog >$(distdir)/ChangeLog
+	if test -d .hg; then \
+	    hg log --style changelog >$(distdir)/ChangeLog; \
+	    rst2man README >$(distdir)/soundtouch4c.7; \
+	fi
+
+soundtouch4c.7: README
+	if test -d .hg; then \
+	    rst2man README >soundtouch4c.7; \
+	fi
 
 upgrade-code:
 	hg pull
 
 .. -*-restructuredtext-*-
 
-========================
-SoundTouch for C Library
-========================
+============
+soundtouch4c
+============
 
-:Info: soundtouch4c
-:Description: A wrapper for soundtouch so you can use it in C programs
+--------------------------------------------------------
+A wrapper for soundtouch so you can use it in C programs
+--------------------------------------------------------
+
+:Version: 0.5b
 :Copyright: Copyright (c) 2006-2009 J.A. Roberts Tunney and Anthony Minessale II
 :Maintainer: J.A. Roberts Tunney <jtunney@lobstertech.com>
 :Website: <http://lobstertech.com/2006/aug/23/soundtouch4c/>
+:Manual section: 7
+:Manual group: Audio Processing
 
-Synopsis
-========
+Description
+===========
 
 This library provides an API allowing C projects to use the SoundTouch
 library (which is written in C++.)  Using soundtouch4c, you can do
 
   sox lol.mp3 $FORMAT data/lol.raw
 
-To compile your own program, try the following command::
+Compiling
+---------
 
+To compile your own program using libsoundtouch4c, this should get you
+started::
+
+  cp libsoundtouch4c/src/example.c proggy.c
   gcc proggy.c -o my-proggy -g -lsoundtouch4c
+  ./my-proggy
+
+AutoTools
+---------
+
+If you use GNU AutoTools, you can copy `m4/soundtouch4c.m4` to your
+``m4`` directory to check that libsoundtouch4c is installed::
+
+  AC_LIB_SOUNDTOUCH4C
+
+Developer Reference
+===================
+
+Types
+-----
+
+* ``struct soundtouch4c``
+* ``SETTING_USE_AA_FILTER``: 0
+* ``SETTING_AA_FILTER_LENGTH``: 1
+* ``SETTING_USE_QUICKSEEK``: 2
+* ``SETTING_SEQUENCE_MS``: 3
+* ``SETTING_SEEKWINDOW_MS``: 4
+* ``SETTING_OVERLAP_MS``: 5
+
+Functions
+---------
+
+* ``struct soundtouch4c *SoundTouch_construct(void)``
+* ``void SoundTouch_destruct(struct soundtouch4c *st)``
+* ``void SoundTouch_setRate(struct soundtouch4c *st, float newRate)``
+* ``void SoundTouch_setTempo(struct soundtouch4c *st, float newTempo)``
+* ``void SoundTouch_setRateChange(struct soundtouch4c *st, float newRate)``
+* ``void SoundTouch_setTempoChange(struct soundtouch4c *st, float newTempo)``
+* ``void SoundTouch_setPitch(struct soundtouch4c *st, float newPitch)``
+* ``void SoundTouch_setPitchOctaves(struct soundtouch4c *st, float newPitch)``
+* ``void SoundTouch_setPitchSemiTonesInt(struct soundtouch4c *st, int newPitch)``
+* ``void SoundTouch_setPitchSemiTonesFloat(struct soundtouch4c *st, float newPitch)``
+* ``void SoundTouch_setChannels(struct soundtouch4c *st, uint numChannels)``
+* ``void SoundTouch_setSampleRate(struct soundtouch4c *st, uint srate)``
+* ``void SoundTouch_flush(struct soundtouch4c *st)``
+* ``void SoundTouch_putSamples(struct soundtouch4c *st, int16_t *samples, uint numSamples)``
+* ``void SoundTouch_clear(struct soundtouch4c *st)``
+* ``int SoundTouch_setSetting(struct soundtouch4c *st, uint settingId, uint value)``
+* ``uint SoundTouch_getSetting(struct soundtouch4c *st, uint settingId)``
+* ``uint SoundTouch_numUnprocessedSamples(struct soundtouch4c *st)``
+* ``uint SoundTouch_receiveSamplesEx(struct soundtouch4c *st, int16_t *output, uint maxSamples)``
+* ``uint SoundTouch_receiveSamples(struct soundtouch4c *st, uint maxSamples)``
+* ``uint SoundTouch_numSamples(struct soundtouch4c *st)``
+* ``int SoundTouch_isEmpty(struct soundtouch4c *st)``
+

File m4/soundtouch4c.m4

+#  -*-Autoconf-*-
+
+AC_DEFUN([AC_LIB_SOUNDTOUCH4C], [
+
+AC_CHECK_HEADER([soundtouch4c.h], ,
+        AC_MSG_ERROR([Please install libsoundtouch4c: http://bitbucket.org/jart/soundtouch4c]))
+
+AC_CHECK_LIB([soundtouch4c], [SoundTouch_construct],
+        AC_DEFINE(HAVE_LIBSOUNDTOUCH4C, 1, [libsoundtouch4c library is installed]),
+        AC_MSG_ERROR([Please install libsoundtouch4c: http://bitbucket.org/jart/soundtouch4c]))
+
+])