praat/external/opusfile/READ_ME.TXT
David Weenink and Paul Boersma, 2 January 2021
This file describes the adaptations made to libopusfile-0.12 sources, the part of Opus that directly interacts with Praat,
to make them compilable with the C++ compiler and compatible with Praat.

We adapted the header files and sources to be able to compile with our compilers.
We replaced all memory allocations with the corresponding Melder routines.
Only files needed for decoding were copied.

In a subdirectory "opus" we copied the Opus-1.3.1 sources which also include a "celt" and a "silk" directory.
A couple of files that were clearly not meant for decoding were left out.
The silk code also needs a subdirectory "float" for proper decoding with floating-point arithmetic.

All instances of #ifdef HAVE_CONFIG_H were commented out,
so as no to have to define HAVE_CONFIG_H as a Praat-wide global symbol if we are working in an IDE (Xcode).
The file config.h had to be renamed opus__config.h, so as not to clash with two other files called config.h
in Praat (under espeak and vorbis; they also have to be renamed).
The file opusfile_stream.cpp uses the nonportable Windows function _filelengthi64(),
so we adapted that to use fseeko() instead, which is available with x86_64-w64-mingw32;
the same file uses _get_osfhandle(), for which we included <io.h>.

The files opus/opus_compare.c en opus/celt/custom_demo.c contain "main" functions and are not needed.
