Menu

Tree [352bc5] master /
 History

HTTPS access


File Date Author Commit
 Makefile 2015-07-07 Fabrizio Gennari Fabrizio Gennari [630279] Windows fixes
 README 2012-10-20 Fabrizio Gennari Fabrizio Gennari [fa84fd] Add resource linking and optimisation to Makefile
 audiofile.h 2015-02-24 Fabrizio Gennari Fabrizio Gennari [532e39] Add writing WAV to standard output
 audiotap.def 2015-04-19 Fabrizio Gennari Fabrizio Gennari [35d0ae] Windows version is now able to pause and unpaus...
 audiotap.h 2015-04-19 Fabrizio Gennari Fabrizio Gennari [35d0ae] Windows version is now able to pause and unpaus...
 lesser-license.txt 2006-08-13 fabbo fabbo [8b8730] Convert line endings
 libaudiotap-resource.rc 2015-07-07 Fabrizio Gennari Fabrizio Gennari [04f218] Bump version number
 libaudiotap.c 2015-07-31 Fabrizio Gennari Fabrizio Gennari [d2736f] Correct a condition (clang warned)
 libaudiotap_external_symbols.c 2018-06-02 Fabrizio Gennari Fabrizio Gennari [f448ce] After having upgraded all other version to the ...
 portaudio.h 2012-05-29 fabbo fabbo [984884] Make the API self-contained, no more need for ....
 pthread_wait_event.c 2015-07-18 Fabrizio Gennari Fabrizio Gennari [18558a] Remove pthread-specific code
 tapdecoder.h 2012-09-06 fabbo fabbo [d3fd60] Add ability to change between half and full wav...
 tapencoder.h 2022-07-20 Fabrizio Gennari Fabrizio Gennari [352bc5] Add a missing EXTERN definition for a symbol, t...
 wait_event.h 2015-07-05 Fabrizio Gennari Fabrizio Gennari [bd72be] A file was missing
 windows_wait_event.c 2015-07-07 Fabrizio Gennari Fabrizio Gennari [630279] Windows fixes

Read Me

This is libaudiotap (the Audiotap library). This provides a handy interface to
* read TAP files (as specified in http://computerbrains.com/tapformat.html)
* read DMP files produced by a DC2N
  (http://www.luigidifraia.com/c64/dc2n/tech.html)
* 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 (http://www.68k.org/~michael/audiofile/) to read and write audio
  files, including WAV
* portaudio (http://www.portaudio.com/) 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 (http://www.mingw.org/). If
your development environment is set up, from a command prompt or terminal,
type
>make audiotap.dll
or just
>make
to build the Windows DLL, or
>make libaudiotap.so
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 libaudiotap.so DEBUG=1
* OPTIMISE: set to 1 to create an optimised build. Examples:
  >make libaudiotap.so 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 libtapencoder.so and libtapdecoder.so even if they are
  not installed. In order to do so, set USE_RPATH to the directory where
  libtapencoder.so and libtapdecoder.so are (absolute path recommended). This
  is recommended for the development phase, the best way to deploy it is to
  properly install libtapencoder.so and libtapdecoder.so 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
  executable.
  Example:
  >make libaudiotap.so 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 libaudiotap.so LINUX64BIT=1

Overview of the architecture

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