No description, website, or topics provided.
C Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This is libaudiotap (the Audiotap library). This provides a handy interface to
* read TAP files (as specified in
* read DMP files produced by a DC2N
* convert an audio signal to pulses, as a Commodore computer does when it
  loads data from a Datassette tape deck
* write TAP files
* convert pulses to an audio signal, as a Commodore computer does when it
  saves data to a Datassette tape deck

In order to process audio signals, libaudiotap is able to dynamically load the
following external libraries:
* audiofile ( to read and write audio
  files, including WAV
* portaudio ( to play and record from the sound card
* libtapencoder, to detect pulses from audio signals
* libtapdecoder, to create audio signals from pulses

In order to build it from sources, you need a development environment
including GNU make and a compiler. Unix systems typically have that, while, on
Windows, it might be necessary to install MinGW ( If
your development environment is set up, from a command prompt or terminal,
>make audiotap.dll
or just
to build the Windows DLL, or
to build the Unix shared library.

Modifiers can (and sometimes have to) be added to make's command line. Here
are some:
* CC: changes the compiler. Examples:
  >make CC=gcc
   needed if your installation does not provide cc.
  >make CC=clang
   if you want to use LLVM instead of gcc (and LLVM is installed).
  >make CC=i586-mingw32msvc-gcc
   if you are running Linux and you want to produce Windows DLLs (and you have
   the MinGW cross-compiler installed)
* DEBUG: set to 1 to create a debug build. Examples:
  >make DEBUG=1
* OPTIMISE: set to 1 to create an optimised build. Examples:
  >make OPTIMISE=1
* USE_RPATH: On Unix, dynamic libraries are searched in the
  libraries' installation path. However, it is also possible to add a
  search path at link time: this comes handy if you want the Audiotap library
  to be able to find and even if they are
  not installed. In order to do so, set USE_RPATH to the directory where and are (absolute path recommended). This
  is recommended for the development phase, the best way to deploy it is to
  properly install and in /usr/lib or
  equivalent locations. Note: this is not necessary on Windows, because
  Windows will find the DLL files if they are in the same directory as the
  >make USE_RPATH=/path/to/libs
* LINUX64BIT: set to 1 if you get the error 'relocation R_X86_64_32S against
  `.rodata' can not be used when making a shared object; recompile with
  -fPIC'. This may happen when building for Linux 64-bit. Example:
   >make LINUX64BIT=1

Overview of the architecture

      +--------+                                                  +----------+
      |        |<-------------------------------------------------| TAP file |
      |        |                                                  +----------+
      |        |
      |        |                                                  +----------+
      |        |<-------------------------------------------------| DMP file |
      |Audiotap|                                                  +----------+
      |        |
      |library |                +-------------+    +---------+    +----------+
      |        |                |             |<---|Audiofile|<---| WAV file |
      |        |                |             |    +---------+    +----------+
      |        |<---------------|libtapencoder|
      |        |                |             |    +---------+    +----------+
      |        |                |             |<---|Portaudio|<---|Sound card|
      +--------+                +-------------+    +---------+    +----------+
      +--------+                                                  +----------+
      |        |------------------------------------------------->| TAP file |
      |        |                                                  +----------+
      |        |
      |Audiotap|                +-------------+    +---------+    +----------+
      |        |                |             |--->|Audiofile|--->| WAV file |
      |library |                |             |    +---------+    +----------+
      |        |--------------->|libtapdecoder|
      |        |                |             |    +---------+    +----------+
      |        |                |             |--->|Portaudio|--->|Sound card|
      +--------+                +-------------+    +---------+    +----------+