mirror of
https://github.com/azahar-emu/soundtouch
synced 2025-11-07 07:30:02 +01:00
Repaired Linux compilation
This commit is contained in:
parent
c43da9c421
commit
0e2ee653db
@ -34,5 +34,3 @@ INCLUDES=-I$(top_srcdir)/include
|
|||||||
|
|
||||||
# doc directory
|
# doc directory
|
||||||
pkgdocdir=$(prefix)/doc/@PACKAGE@
|
pkgdocdir=$(prefix)/doc/@PACKAGE@
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ dnl this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
|||||||
dnl Place - Suite 330, Boston, MA 02111-1307, USA
|
dnl Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_INIT(SoundTouch, 1.3.2, [http://www.surina.net/soundtouch])
|
AC_INIT(SoundTouch, 1.4.0, [http://www.surina.net/soundtouch])
|
||||||
AC_CONFIG_AUX_DIR(config)
|
AC_CONFIG_AUX_DIR(config)
|
||||||
AM_CONFIG_HEADER([include/soundtouch_config.h])
|
AM_CONFIG_HEADER([include/soundtouch_config.h])
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
@ -126,7 +126,6 @@ AC_CONFIG_FILES([
|
|||||||
source/SoundTouch/Makefile
|
source/SoundTouch/Makefile
|
||||||
source/example/Makefile
|
source/example/Makefile
|
||||||
source/example/SoundStretch/Makefile
|
source/example/SoundStretch/Makefile
|
||||||
source/example/bpm/Makefile
|
|
||||||
include/Makefile
|
include/Makefile
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@ -26,11 +26,11 @@ include $(top_srcdir)/config/am_include.mk
|
|||||||
# set to something if you want other stuff to be included in the distribution tarball
|
# set to something if you want other stuff to be included in the distribution tarball
|
||||||
EXTRA_DIST=3dnow_win.cpp cpu_detect_x86_win.cpp SoundTouch.dsp SoundTouch.dsw SoundTouch.sln SoundTouch.vcproj
|
EXTRA_DIST=3dnow_win.cpp cpu_detect_x86_win.cpp SoundTouch.dsp SoundTouch.dsw SoundTouch.sln SoundTouch.vcproj
|
||||||
|
|
||||||
noinst_HEADERS=AAFilter.h cpu_detect.h cpu_detect_x86_gcc.cpp FIRFilter.h RateTransposer.h TDStretch.h
|
noinst_HEADERS=AAFilter.h cpu_detect.h cpu_detect_x86_gcc.cpp FIRFilter.h RateTransposer.h TDStretch.h PeakFinder.h
|
||||||
|
|
||||||
lib_LTLIBRARIES=libSoundTouch.la
|
lib_LTLIBRARIES=libSoundTouch.la
|
||||||
#
|
#
|
||||||
libSoundTouch_la_SOURCES=AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp mmx_optimized.cpp sse_optimized.cpp RateTransposer.cpp SoundTouch.cpp TDStretch.cpp cpu_detect_x86_gcc.cpp
|
libSoundTouch_la_SOURCES=AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp mmx_optimized.cpp sse_optimized.cpp RateTransposer.cpp SoundTouch.cpp TDStretch.cpp cpu_detect_x86_gcc.cpp BPMDetect.cpp PeakFinder.cpp
|
||||||
|
|
||||||
|
|
||||||
# Note by authore: '-msse2' might not work in non-X86 compilations. If someone can
|
# Note by authore: '-msse2' might not work in non-X86 compilations. If someone can
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
include $(top_srcdir)/config/am_include.mk
|
include $(top_srcdir)/config/am_include.mk
|
||||||
|
|
||||||
SUBDIRS=bpm SoundStretch
|
SUBDIRS=SoundStretch
|
||||||
|
|
||||||
# set to something if you want other stuff to be included in the distribution tarball
|
# set to something if you want other stuff to be included in the distribution tarball
|
||||||
#EXTRA_DIST=
|
#EXTRA_DIST=
|
||||||
|
|||||||
@ -41,14 +41,13 @@ soundstretch_SOURCES=main.cpp RunParameters.cpp WavFile.cpp
|
|||||||
## created by the above soundstretch_SOURCES are automatically linked in, so here I
|
## created by the above soundstretch_SOURCES are automatically linked in, so here I
|
||||||
## list object files from other directories as well as flags passed to the
|
## list object files from other directories as well as flags passed to the
|
||||||
## linker.
|
## linker.
|
||||||
soundstretch_LDADD=../../SoundTouch/libSoundTouch.la ../bpm/libBPM.la -lm
|
soundstretch_LDADD=../../SoundTouch/libSoundTouch.la -lm
|
||||||
|
|
||||||
## linker flags
|
## linker flags
|
||||||
soundstretch_LDFLAGS=-s
|
soundstretch_LDFLAGS=-s
|
||||||
|
|
||||||
## additional compiler flags
|
## additional compiler flags
|
||||||
soundstretch_CXXFLAGS=-O3 -I../bpm
|
soundstretch_CXXFLAGS=-O3
|
||||||
|
|
||||||
#clean-local:
|
#clean-local:
|
||||||
# -rm -f additional-files-to-remove-on-make-clean
|
# -rm -f additional-files-to-remove-on-make-clean
|
||||||
|
|
||||||
|
|||||||
@ -366,7 +366,7 @@ static int isAlphaStr(char *str)
|
|||||||
|
|
||||||
int WavInFile::readRIFFBlock()
|
int WavInFile::readRIFFBlock()
|
||||||
{
|
{
|
||||||
fread(&(header.riff), sizeof(WavRiff), 1, fptr);
|
if (fread(&(header.riff), sizeof(WavRiff), 1, fptr) != 1) return -1;
|
||||||
|
|
||||||
// swap 32bit data byte order if necessary
|
// swap 32bit data byte order if necessary
|
||||||
_swap32((unsigned int &)header.riff.package_len);
|
_swap32((unsigned int &)header.riff.package_len);
|
||||||
@ -388,7 +388,7 @@ int WavInFile::readHeaderBlock()
|
|||||||
string sLabel;
|
string sLabel;
|
||||||
|
|
||||||
// lead label string
|
// lead label string
|
||||||
fread(label, 1, 4, fptr);
|
if (fread(label, 1, 4, fptr) !=4) return -1;
|
||||||
label[4] = 0;
|
label[4] = 0;
|
||||||
|
|
||||||
if (isAlphaStr(label) == 0) return -1; // not a valid label
|
if (isAlphaStr(label) == 0) return -1; // not a valid label
|
||||||
@ -402,7 +402,7 @@ int WavInFile::readHeaderBlock()
|
|||||||
memcpy(header.format.fmt, fmtStr, 4);
|
memcpy(header.format.fmt, fmtStr, 4);
|
||||||
|
|
||||||
// read length of the format field
|
// read length of the format field
|
||||||
fread(&nLen, sizeof(int), 1, fptr);
|
if (fread(&nLen, sizeof(int), 1, fptr) != 1) return -1;
|
||||||
// swap byte order if necessary
|
// swap byte order if necessary
|
||||||
_swap32((unsigned int &)nLen); // int format_len;
|
_swap32((unsigned int &)nLen); // int format_len;
|
||||||
header.format.format_len = nLen;
|
header.format.format_len = nLen;
|
||||||
@ -417,7 +417,7 @@ int WavInFile::readHeaderBlock()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// read data
|
// read data
|
||||||
fread(&(header.format.fixed), nLen, 1, fptr);
|
if (fread(&(header.format.fixed), nLen, 1, fptr) != 1) return -1;
|
||||||
|
|
||||||
// swap byte order if necessary
|
// swap byte order if necessary
|
||||||
_swap16((unsigned short &)header.format.fixed); // short int fixed;
|
_swap16((unsigned short &)header.format.fixed); // short int fixed;
|
||||||
@ -439,7 +439,7 @@ int WavInFile::readHeaderBlock()
|
|||||||
{
|
{
|
||||||
// 'data' block
|
// 'data' block
|
||||||
memcpy(header.data.data_field, dataStr, 4);
|
memcpy(header.data.data_field, dataStr, 4);
|
||||||
fread(&(header.data.data_len), sizeof(uint), 1, fptr);
|
if (fread(&(header.data.data_len), sizeof(uint), 1, fptr) != 1) return -1;
|
||||||
|
|
||||||
// swap byte order if necessary
|
// swap byte order if necessary
|
||||||
_swap32((unsigned int &)header.data.data_len);
|
_swap32((unsigned int &)header.data.data_len);
|
||||||
@ -453,11 +453,11 @@ int WavInFile::readHeaderBlock()
|
|||||||
// unknown block
|
// unknown block
|
||||||
|
|
||||||
// read length
|
// read length
|
||||||
fread(&len, sizeof(len), 1, fptr);
|
if (fread(&len, sizeof(len), 1, fptr) != 1) return -1;
|
||||||
// scan through the block
|
// scan through the block
|
||||||
for (i = 0; i < len; i ++)
|
for (i = 0; i < len; i ++)
|
||||||
{
|
{
|
||||||
fread(&temp, 1, 1, fptr);
|
if (fread(&temp, 1, 1, fptr) != 1) return -1;
|
||||||
if (feof(fptr)) return -1; // unexpected eof
|
if (feof(fptr)) return -1; // unexpected eof
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include "RunParameters.h"
|
#include "RunParameters.h"
|
||||||
#include "WavFile.h"
|
#include "WavFile.h"
|
||||||
#include "SoundTouch.h"
|
#include "SoundTouch.h"
|
||||||
@ -56,8 +57,8 @@ using namespace std;
|
|||||||
// Macro for Win32 standard input/output stream support: Sets a file stream into binary mode
|
// Macro for Win32 standard input/output stream support: Sets a file stream into binary mode
|
||||||
#define SET_STREAM_TO_BIN_MODE(f) (_setmode(fileno(f), _O_BINARY))
|
#define SET_STREAM_TO_BIN_MODE(f) (_setmode(fileno(f), _O_BINARY))
|
||||||
#else
|
#else
|
||||||
// Not needed for GNU environment... ?
|
// Not needed for GNU environment...
|
||||||
#define SET_STREAM_TO_BIN_MODE(f) ()
|
#define SET_STREAM_TO_BIN_MODE(f) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user