mirror of https://github.com/PCSX2/pcsx2.git
3rdparty/portaudio: Updated portaudio to the march 26 stable release (svn rev 1647). Too many changes to list here.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4844 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
529f620e37
commit
5a3cd8e57e
|
@ -38,12 +38,13 @@ LT_REVISION=@LT_REVISION@
|
|||
LT_AGE=@LT_AGE@
|
||||
|
||||
OTHER_OBJS = @OTHER_OBJS@
|
||||
INCLUDES = @INCLUDES@
|
||||
|
||||
PALIB = libportaudio.la
|
||||
PAINC = include/portaudio.h
|
||||
|
||||
PA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined \
|
||||
-export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio)_.*" \
|
||||
-export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS)_.*" \
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
|
||||
COMMON_OBJS = \
|
||||
|
@ -54,9 +55,17 @@ COMMON_OBJS = \
|
|||
src/common/pa_debugprint.o \
|
||||
src/common/pa_front.o \
|
||||
src/common/pa_process.o \
|
||||
src/common/pa_skeleton.o \
|
||||
src/common/pa_stream.o \
|
||||
src/common/pa_trace.o
|
||||
src/common/pa_trace.o \
|
||||
src/hostapi/skeleton/pa_hostapi_skeleton.o
|
||||
|
||||
LOOPBACK_OBJS = \
|
||||
qa/loopback/src/audio_analyzer.o \
|
||||
qa/loopback/src/biquad_filter.o \
|
||||
qa/loopback/src/paqa_tools.o \
|
||||
qa/loopback/src/test_audio_analyzer.o \
|
||||
qa/loopback/src/write_wav.o \
|
||||
qa/loopback/src/paqa.o
|
||||
|
||||
TESTS = \
|
||||
bin/paqa_devs \
|
||||
|
@ -73,6 +82,7 @@ TESTS = \
|
|||
bin/patest_longsine \
|
||||
bin/patest_many \
|
||||
bin/patest_maxsines \
|
||||
bin/patest_mono \
|
||||
bin/patest_multi_sine \
|
||||
bin/patest_out_underflow \
|
||||
bin/patest_pink \
|
||||
|
@ -92,9 +102,11 @@ TESTS = \
|
|||
bin/patest_stop \
|
||||
bin/patest_stop_playout \
|
||||
bin/patest_toomanysines \
|
||||
bin/patest_two_rates \
|
||||
bin/patest_underflow \
|
||||
bin/patest_wire \
|
||||
bin/patest_write_sine \
|
||||
bin/patest_write_sine_nonint \
|
||||
bin/pa_devs \
|
||||
bin/pa_fuzz \
|
||||
bin/pa_minlat
|
||||
|
@ -143,6 +155,7 @@ all: lib/$(PALIB) all-recursive tests
|
|||
|
||||
tests: bin-stamp $(TESTS)
|
||||
|
||||
loopback: bin-stamp bin/paloopback
|
||||
|
||||
# With ASIO enabled we must link libportaudio and all test programs with CXX
|
||||
lib/$(PALIB): lib-stamp $(LTOBJS) $(MAKEFILE) $(PAINC)
|
||||
|
@ -153,12 +166,17 @@ $(ALL_TESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) test/%.c
|
|||
@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
|
||||
@WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
|
||||
|
||||
bin/paloopback: lib/$(PALIB) $(MAKEFILE) $(PAINC) $(LOOPBACK_OBJS)
|
||||
@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)
|
||||
@WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)
|
||||
|
||||
install: lib/$(PALIB) portaudio-2.0.pc
|
||||
$(INSTALL) -d $(DESTDIR)$(libdir)
|
||||
$(LIBTOOL) --mode=install $(INSTALL) lib/$(PALIB) $(DESTDIR)$(libdir)
|
||||
$(INSTALL) -d $(DESTDIR)$(includedir)
|
||||
$(INSTALL_DATA) -m 644 $(top_srcdir)/$(PAINC) $(DESTDIR)$(includedir)/portaudio.h
|
||||
for include in $(INCLUDES); do \
|
||||
$(INSTALL_DATA) -m 644 $(top_srcdir)/include/$$include $(DESTDIR)$(includedir)/$$include; \
|
||||
done
|
||||
$(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
|
||||
$(INSTALL) -m 644 portaudio-2.0.pc $(DESTDIR)$(libdir)/pkgconfig/portaudio-2.0.pc
|
||||
@echo ""
|
||||
|
@ -179,7 +197,7 @@ uninstall:
|
|||
$(MAKE) uninstall-recursive
|
||||
|
||||
clean:
|
||||
$(LIBTOOL) --mode=clean rm -f $(LTOBJS) $(ALL_TESTS) lib/$(PALIB)
|
||||
$(LIBTOOL) --mode=clean rm -f $(LTOBJS) $(LOOPBACK_OBJS) $(ALL_TESTS) lib/$(PALIB)
|
||||
$(RM) bin-stamp lib-stamp
|
||||
-$(RM) -r bin lib
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
PortAudio uses "autoconf" tools to generate Makefiles for Linux and Mac platforms.
|
||||
The source for these are configure.in and Makefile.in
|
||||
If you modify either of these files then please run this command before
|
||||
testing and checking in your changes.
|
||||
|
||||
autoreconf -if
|
||||
|
||||
Then test a build by doing:
|
||||
|
||||
./configure
|
||||
make clean
|
||||
make
|
||||
sudo make install
|
||||
|
||||
then check in the related files that are modified.
|
||||
These might include files like:
|
||||
|
||||
configure
|
||||
config.guess
|
||||
depcomp
|
||||
install.sh
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -5,11 +5,11 @@ CPP = g++.exe
|
|||
CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
RES =
|
||||
OBJ = ./pa_skeleton.o ./pa_stream.o ./pa_trace.o ./pa_allocation.o ./pa_converters.o ./pa_cpuload.o ./pa_dither.o ./pa_front.o ./pa_process.o ./pa_asio.o ./pa_win_util.o ./pa_win_hostapis.o ./pa_win_ds.o ./dsound_wrapper.o ./pa_win_wmme.o ./iasiothiscallresolver.o $(RES)
|
||||
LINKOBJ = ./pa_skeleton.o ./pa_stream.o ./pa_trace.o ./pa_allocation.o ./pa_converters.o ./pa_cpuload.o ./pa_dither.o ./pa_front.o ./pa_process.o ./pa_asio.o ./pa_win_util.o ./pa_win_hostapis.o ./pa_win_ds.o ./dsound_wrapper.o ./pa_win_wmme.o ./iasiothiscallresolver.o $(RES)
|
||||
OBJ = ./pa_hostapi_skeleton.o ./pa_stream.o ./pa_trace.o ./pa_allocation.o ./pa_converters.o ./pa_cpuload.o ./pa_dither.o ./pa_front.o ./pa_process.o ./pa_asio.o ./pa_win_util.o ./pa_win_hostapis.o ./pa_win_ds.o ./dsound_wrapper.o ./pa_win_wmme.o ./iasiothiscallresolver.o $(RES)
|
||||
LINKOBJ = ./pa_hostapi_skeleton.o ./pa_stream.o ./pa_trace.o ./pa_allocation.o ./pa_converters.o ./pa_cpuload.o ./pa_dither.o ./pa_front.o ./pa_process.o ./pa_asio.o ./pa_win_util.o ./pa_win_hostapis.o ./pa_win_ds.o ./dsound_wrapper.o ./pa_win_wmme.o ./iasiothiscallresolver.o $(RES)
|
||||
LIBS = -L"C:/Dev-CPP/lib" -fmessage-length=0 --no-export-all-symbols --add-stdcall-alias ../../../asiosdk2/asiosdk2.a -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lwinmm -O3 -s
|
||||
INCS = -I"C:/Dev-CPP/include" -I"../../../asiosdk2" -I"../../../asiosdk2/common" -I"../../../asiosdk2/host" -I"../../../asiosdk2/host/pc" -I"../../pa_common"
|
||||
CXXINCS = -I"C:/Dev-CPP/include/c++" -I"C:/Dev-CPP/include/c++/mingw32" -I"C:/Dev-CPP/include/c++/backward" -I"C:/Dev-CPP/include" -I"../../../asiosdk2" -I"../../../asiosdk2/common" -I"../../../asiosdk2/host" -I"../../../asiosdk2/host/pc" -I"../../pa_common"
|
||||
INCS = -I"C:/Dev-CPP/include" -I"../../../asiosdk2" -I"../../../asiosdk2/common" -I"../../../asiosdk2/host" -I"../../../asiosdk2/host/pc" -I"../../common"
|
||||
CXXINCS = -I"C:/Dev-CPP/include/c++" -I"C:/Dev-CPP/include/c++/mingw32" -I"C:/Dev-CPP/include/c++/backward" -I"C:/Dev-CPP/include" -I"../../../asiosdk2" -I"../../../asiosdk2/common" -I"../../../asiosdk2/host" -I"../../../asiosdk2/host/pc" -I"../../common"
|
||||
BIN = portaudio-dll.dll
|
||||
CXXFLAGS = $(CXXINCS)-O3 -fmessage-length=0 -Wall
|
||||
CFLAGS = $(INCS)-DBUILDING_DLL=1 -O3 -fmessage-length=0 -Wall
|
||||
|
@ -29,32 +29,32 @@ STATICLIB=libportaudio-dll.a
|
|||
$(BIN): $(LINKOBJ)
|
||||
$(DLLWRAP) --output-def $(DEFFILE) --driver-name c++ --implib $(STATICLIB) $(LINKOBJ) $(LIBS) -o $(BIN)
|
||||
|
||||
./pa_skeleton.o: ../../pa_common/pa_skeleton.c
|
||||
$(CPP) -c ../../pa_common/pa_skeleton.c -o ./pa_skeleton.o $(CXXFLAGS)
|
||||
./pa_hostapi_skeleton.o: ../../hostapi/skeleton/pa_hostapi_skeleton.c
|
||||
$(CPP) -c ../../hostapi/skeleton/pa_hostapi_skeleton.c -o ./pa_hostapi_skeleton.o $(CXXFLAGS)
|
||||
|
||||
./pa_stream.o: ../../pa_common/pa_stream.c
|
||||
$(CPP) -c ../../pa_common/pa_stream.c -o ./pa_stream.o $(CXXFLAGS)
|
||||
./pa_stream.o: ../../common/pa_stream.c
|
||||
$(CPP) -c ../../common/pa_stream.c -o ./pa_stream.o $(CXXFLAGS)
|
||||
|
||||
./pa_trace.o: ../../pa_common/pa_trace.c
|
||||
$(CPP) -c ../../pa_common/pa_trace.c -o ./pa_trace.o $(CXXFLAGS)
|
||||
./pa_trace.o: ../../common/pa_trace.c
|
||||
$(CPP) -c ../../common/pa_trace.c -o ./pa_trace.o $(CXXFLAGS)
|
||||
|
||||
./pa_allocation.o: ../../pa_common/pa_allocation.c
|
||||
$(CPP) -c ../../pa_common/pa_allocation.c -o ./pa_allocation.o $(CXXFLAGS)
|
||||
./pa_allocation.o: ../../common/pa_allocation.c
|
||||
$(CPP) -c ../../common/pa_allocation.c -o ./pa_allocation.o $(CXXFLAGS)
|
||||
|
||||
./pa_converters.o: ../../pa_common/pa_converters.c
|
||||
$(CPP) -c ../../pa_common/pa_converters.c -o ./pa_converters.o $(CXXFLAGS)
|
||||
./pa_converters.o: ../../common/pa_converters.c
|
||||
$(CPP) -c ../../common/pa_converters.c -o ./pa_converters.o $(CXXFLAGS)
|
||||
|
||||
./pa_cpuload.o: ../../pa_common/pa_cpuload.c
|
||||
$(CPP) -c ../../pa_common/pa_cpuload.c -o ./pa_cpuload.o $(CXXFLAGS)
|
||||
./pa_cpuload.o: ../../common/pa_cpuload.c
|
||||
$(CPP) -c ../../common/pa_cpuload.c -o ./pa_cpuload.o $(CXXFLAGS)
|
||||
|
||||
./pa_dither.o: ../../pa_common/pa_dither.c
|
||||
$(CPP) -c ../../pa_common/pa_dither.c -o ./pa_dither.o $(CXXFLAGS)
|
||||
./pa_dither.o: ../../common/pa_dither.c
|
||||
$(CPP) -c ../../common/pa_dither.c -o ./pa_dither.o $(CXXFLAGS)
|
||||
|
||||
./pa_front.o: ../../pa_common/pa_front.c
|
||||
$(CPP) -c ../../pa_common/pa_front.c -o ./pa_front.o $(CXXFLAGS)
|
||||
./pa_front.o: ../../common/pa_front.c
|
||||
$(CPP) -c ../../common/pa_front.c -o ./pa_front.o $(CXXFLAGS)
|
||||
|
||||
./pa_process.o: ../../pa_common/pa_process.c
|
||||
$(CPP) -c ../../pa_common/pa_process.c -o ./pa_process.o $(CXXFLAGS)
|
||||
./pa_process.o: ../../common/pa_process.c
|
||||
$(CPP) -c ../../common/pa_process.c -o ./pa_process.o $(CXXFLAGS)
|
||||
|
||||
./pa_asio.o: ../../pa_asio/pa_asio.cpp
|
||||
$(CPP) -c ../../pa_asio/pa_asio.cpp -o ./pa_asio.o $(CXXFLAGS)
|
||||
|
|
|
@ -5,11 +5,11 @@ CPP = g++.exe
|
|||
CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
RES =
|
||||
OBJ = ./pa_skeleton.o ./pa_stream.o ./pa_trace.o ./pa_allocation.o ./pa_converters.o ./pa_cpuload.o ./pa_dither.o ./pa_front.o ./pa_process.o ./pa_asio.o ./pa_win_util.o ./pa_win_hostapis.o ./pa_win_ds.o ./dsound_wrapper.o ./pa_win_wmme.o ./iasiothiscallresolver.o $(RES)
|
||||
LINKOBJ = ./pa_skeleton.o ./pa_stream.o ./pa_trace.o ./pa_allocation.o ./pa_converters.o ./pa_cpuload.o ./pa_dither.o ./pa_front.o ./pa_process.o ./pa_asio.o ./pa_win_util.o ./pa_win_hostapis.o ./pa_win_ds.o ./dsound_wrapper.o ./pa_win_wmme.o ./iasiothiscallresolver.o $(RES)
|
||||
OBJ = ./pa_hostapi_skeleton.o ./pa_stream.o ./pa_trace.o ./pa_allocation.o ./pa_converters.o ./pa_cpuload.o ./pa_dither.o ./pa_front.o ./pa_process.o ./pa_asio.o ./pa_win_util.o ./pa_win_hostapis.o ./pa_win_ds.o ./dsound_wrapper.o ./pa_win_wmme.o ./iasiothiscallresolver.o $(RES)
|
||||
LINKOBJ = ./pa_hostapi_skeleton.o ./pa_stream.o ./pa_trace.o ./pa_allocation.o ./pa_converters.o ./pa_cpuload.o ./pa_dither.o ./pa_front.o ./pa_process.o ./pa_asio.o ./pa_win_util.o ./pa_win_hostapis.o ./pa_win_ds.o ./dsound_wrapper.o ./pa_win_wmme.o ./iasiothiscallresolver.o $(RES)
|
||||
LIBS = -L"C:/Dev-CPP/lib" -fmessage-length=0 -O3 -s
|
||||
INCS = -I"C:/Dev-CPP/include" -I"../../../asiosdk2" -I"../../../asiosdk2/common" -I"../../../asiosdk2/host" -I"../../../asiosdk2/host/pc" -I"../../pa_common"
|
||||
CXXINCS = -I"C:/Dev-CPP/include/c++" -I"C:/Dev-CPP/include/c++/mingw32" -I"C:/Dev-CPP/include/c++/backward" -I"C:/Dev-CPP/include" -I"../../../asiosdk2" -I"../../../asiosdk2/common" -I"../../../asiosdk2/host" -I"../../../asiosdk2/host/pc" -I"../../pa_common"
|
||||
INCS = -I"C:/Dev-CPP/include" -I"../../../asiosdk2" -I"../../../asiosdk2/common" -I"../../../asiosdk2/host" -I"../../../asiosdk2/host/pc" -I"../../common"
|
||||
CXXINCS = -I"C:/Dev-CPP/include/c++" -I"C:/Dev-CPP/include/c++/mingw32" -I"C:/Dev-CPP/include/c++/backward" -I"C:/Dev-CPP/include" -I"../../../asiosdk2" -I"../../../asiosdk2/common" -I"../../../asiosdk2/host" -I"../../../asiosdk2/host/pc" -I"../../common"
|
||||
BIN = portaudio-static.a
|
||||
CXXFLAGS = $(CXXINCS)-O3 -fmessage-length=0 -Wall
|
||||
CFLAGS = $(INCS)-O3 -fmessage-length=0 -Wall
|
||||
|
@ -26,32 +26,32 @@ $(BIN): $(LINKOBJ)
|
|||
ar r $(BIN) $(LINKOBJ)
|
||||
ranlib $(BIN)
|
||||
|
||||
./pa_skeleton.o: ../../pa_common/pa_skeleton.c
|
||||
$(CPP) -c ../../pa_common/pa_skeleton.c -o ./pa_skeleton.o $(CXXFLAGS)
|
||||
./pa_hostapi_skeleton.o: ../../hostapi/skeleton/pa_hostapi_skeleton.c
|
||||
$(CPP) -c ../../hostapi/skeleton/pa_hostapi_skeleton.c -o ./pa_hostapi_skeleton.o $(CXXFLAGS)
|
||||
|
||||
./pa_stream.o: ../../pa_common/pa_stream.c
|
||||
$(CPP) -c ../../pa_common/pa_stream.c -o ./pa_stream.o $(CXXFLAGS)
|
||||
./pa_stream.o: ../../common/pa_stream.c
|
||||
$(CPP) -c ../../common/pa_stream.c -o ./pa_stream.o $(CXXFLAGS)
|
||||
|
||||
./pa_trace.o: ../../pa_common/pa_trace.c
|
||||
$(CPP) -c ../../pa_common/pa_trace.c -o ./pa_trace.o $(CXXFLAGS)
|
||||
./pa_trace.o: ../../common/pa_trace.c
|
||||
$(CPP) -c ../../common/pa_trace.c -o ./pa_trace.o $(CXXFLAGS)
|
||||
|
||||
./pa_allocation.o: ../../pa_common/pa_allocation.c
|
||||
$(CPP) -c ../../pa_common/pa_allocation.c -o ./pa_allocation.o $(CXXFLAGS)
|
||||
./pa_allocation.o: ../../common/pa_allocation.c
|
||||
$(CPP) -c ../../common/pa_allocation.c -o ./pa_allocation.o $(CXXFLAGS)
|
||||
|
||||
./pa_converters.o: ../../pa_common/pa_converters.c
|
||||
$(CPP) -c ../../pa_common/pa_converters.c -o ./pa_converters.o $(CXXFLAGS)
|
||||
./pa_converters.o: ../../common/pa_converters.c
|
||||
$(CPP) -c ../../common/pa_converters.c -o ./pa_converters.o $(CXXFLAGS)
|
||||
|
||||
./pa_cpuload.o: ../../pa_common/pa_cpuload.c
|
||||
$(CPP) -c ../../pa_common/pa_cpuload.c -o ./pa_cpuload.o $(CXXFLAGS)
|
||||
./pa_cpuload.o: ../../common/pa_cpuload.c
|
||||
$(CPP) -c ../../common/pa_cpuload.c -o ./pa_cpuload.o $(CXXFLAGS)
|
||||
|
||||
./pa_dither.o: ../../pa_common/pa_dither.c
|
||||
$(CPP) -c ../../pa_common/pa_dither.c -o ./pa_dither.o $(CXXFLAGS)
|
||||
./pa_dither.o: ../../common/pa_dither.c
|
||||
$(CPP) -c ../../common/pa_dither.c -o ./pa_dither.o $(CXXFLAGS)
|
||||
|
||||
./pa_front.o: ../../pa_common/pa_front.c
|
||||
$(CPP) -c ../../pa_common/pa_front.c -o ./pa_front.o $(CXXFLAGS)
|
||||
./pa_front.o: ../../common/pa_front.c
|
||||
$(CPP) -c ../../common/pa_front.c -o ./pa_front.o $(CXXFLAGS)
|
||||
|
||||
./pa_process.o: ../../pa_common/pa_process.c
|
||||
$(CPP) -c ../../pa_common/pa_process.c -o ./pa_process.o $(CXXFLAGS)
|
||||
./pa_process.o: ../../common/pa_process.c
|
||||
$(CPP) -c ../../common/pa_process.c -o ./pa_process.o $(CXXFLAGS)
|
||||
|
||||
./pa_asio.o: ../../pa_asio/pa_asio.cpp
|
||||
$(CPP) -c ../../pa_asio/pa_asio.cpp -o ./pa_asio.o $(CXXFLAGS)
|
||||
|
|
|
@ -5,7 +5,7 @@ UnitCount=16
|
|||
Type=3
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=..\..\..\asiosdk2;..\..\..\asiosdk2\common;..\..\..\asiosdk2\host;..\..\..\asiosdk2\host\pc;..\..\pa_common
|
||||
Includes=..\..\..\asiosdk2;..\..\..\asiosdk2\common;..\..\..\asiosdk2\host;..\..\..\asiosdk2\host\pc;..\..\common
|
||||
Libs=
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
|
@ -30,17 +30,17 @@ UseCustomMakefile=0
|
|||
CustomMakefile=
|
||||
|
||||
[Unit1]
|
||||
FileName=..\..\pa_common\pa_skeleton.c
|
||||
FileName=..\..\hostapi\skeleton\pa_hostapi_skeleton.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=$(CC) -c pa_skeleton.c -o ./pa_skeleton.o $(CFLAGS)
|
||||
BuildCmd=$(CC) -c pa_hostapi_skeleton.c -o ./pa_hostapi_skeleton.o $(CFLAGS)
|
||||
|
||||
[Unit2]
|
||||
FileName=..\..\pa_common\pa_stream.c
|
||||
FileName=..\..\common\pa_stream.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -50,7 +50,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_stream.c -o ./pa_stream.o $(CFLAGS)
|
||||
|
||||
[Unit3]
|
||||
FileName=..\..\pa_common\pa_trace.c
|
||||
FileName=..\..\common\pa_trace.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -60,7 +60,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_trace.c -o ./pa_trace.o $(CFLAGS)
|
||||
|
||||
[Unit4]
|
||||
FileName=..\..\pa_common\pa_allocation.c
|
||||
FileName=..\..\common\pa_allocation.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -70,7 +70,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_allocation.c -o ./pa_allocation.o $(CFLAGS)
|
||||
|
||||
[Unit5]
|
||||
FileName=..\..\pa_common\pa_converters.c
|
||||
FileName=..\..\common\pa_converters.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -80,7 +80,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_converters.c -o ./pa_converters.o $(CFLAGS)
|
||||
|
||||
[Unit6]
|
||||
FileName=..\..\pa_common\pa_cpuload.c
|
||||
FileName=..\..\common\pa_cpuload.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -90,7 +90,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_cpuload.c -o ./pa_cpuload.o $(CFLAGS)
|
||||
|
||||
[Unit7]
|
||||
FileName=..\..\pa_common\pa_dither.c
|
||||
FileName=..\..\common\pa_dither.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -100,7 +100,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_dither.c -o ./pa_dither.o $(CFLAGS)
|
||||
|
||||
[Unit8]
|
||||
FileName=..\..\pa_common\pa_front.c
|
||||
FileName=..\..\common\pa_front.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -110,7 +110,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_front.c -o ./pa_front.o $(CFLAGS)
|
||||
|
||||
[Unit9]
|
||||
FileName=..\..\pa_common\pa_process.c
|
||||
FileName=..\..\common\pa_process.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
|
|
@ -5,7 +5,7 @@ UnitCount=16
|
|||
Type=2
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=..\..\..\asiosdk2;..\..\..\asiosdk2\common;..\..\..\asiosdk2\host;..\..\..\asiosdk2\host\pc;..\..\pa_common
|
||||
Includes=..\..\..\asiosdk2;..\..\..\asiosdk2\common;..\..\..\asiosdk2\host;..\..\..\asiosdk2\host\pc;..\..\common
|
||||
Libs=
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
|
@ -30,17 +30,17 @@ UseCustomMakefile=0
|
|||
CustomMakefile=
|
||||
|
||||
[Unit1]
|
||||
FileName=..\..\pa_common\pa_skeleton.c
|
||||
FileName=..\..\hostapi\skeleton\pa_hostapi_skeleton.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=$(CC) -c pa_skeleton.c -o ./pa_skeleton.o $(CFLAGS)
|
||||
BuildCmd=$(CC) -c pa_hostapi_skeleton.c -o ./pa_hostapi_skeleton.o $(CFLAGS)
|
||||
|
||||
[Unit2]
|
||||
FileName=..\..\pa_common\pa_stream.c
|
||||
FileName=..\..\common\pa_stream.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -50,7 +50,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_stream.c -o ./pa_stream.o $(CFLAGS)
|
||||
|
||||
[Unit3]
|
||||
FileName=..\..\pa_common\pa_trace.c
|
||||
FileName=..\..\common\pa_trace.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -60,7 +60,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_trace.c -o ./pa_trace.o $(CFLAGS)
|
||||
|
||||
[Unit4]
|
||||
FileName=..\..\pa_common\pa_allocation.c
|
||||
FileName=..\..\common\pa_allocation.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -70,7 +70,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_allocation.c -o ./pa_allocation.o $(CFLAGS)
|
||||
|
||||
[Unit5]
|
||||
FileName=..\..\pa_common\pa_converters.c
|
||||
FileName=..\..\common\pa_converters.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -80,7 +80,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_converters.c -o ./pa_converters.o $(CFLAGS)
|
||||
|
||||
[Unit6]
|
||||
FileName=..\..\pa_common\pa_cpuload.c
|
||||
FileName=..\..\common\pa_cpuload.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -90,7 +90,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_cpuload.c -o ./pa_cpuload.o $(CFLAGS)
|
||||
|
||||
[Unit7]
|
||||
FileName=..\..\pa_common\pa_dither.c
|
||||
FileName=..\..\common\pa_dither.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -100,7 +100,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_dither.c -o ./pa_dither.o $(CFLAGS)
|
||||
|
||||
[Unit8]
|
||||
FileName=..\..\pa_common\pa_front.c
|
||||
FileName=..\..\common\pa_front.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
@ -110,7 +110,7 @@ OverrideBuildCmd=0
|
|||
BuildCmd=$(CC) -c pa_front.c -o ./pa_front.o $(CFLAGS)
|
||||
|
||||
[Unit9]
|
||||
FileName=..\..\pa_common\pa_process.c
|
||||
FileName=..\..\common\pa_process.c
|
||||
CompileCpp=1
|
||||
Folder=portaudio
|
||||
Compile=1
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -452,7 +452,6 @@
|
|||
<ClCompile Include="..\..\src\common\pa_front.c" />
|
||||
<ClCompile Include="..\..\src\common\pa_process.c" />
|
||||
<ClCompile Include="..\..\src\common\pa_ringbuffer.c" />
|
||||
<ClCompile Include="..\..\src\common\pa_skeleton.c" />
|
||||
<ClCompile Include="..\..\src\common\pa_stream.c" />
|
||||
<ClCompile Include="..\..\src\common\pa_trace.c" />
|
||||
<ClCompile Include="..\..\src\hostapi\asio\pa_asio.cpp">
|
||||
|
|
|
@ -66,9 +66,6 @@
|
|||
<ClCompile Include="..\..\src\common\pa_ringbuffer.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\common\pa_skeleton.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\common\pa_stream.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Hello
|
||||
|
||||
This is a small list of steps in order to build portaudio
|
||||
(Currently v19-devel) into a VC6 DLL and lib file.
|
||||
This DLL contains all 3 current win32 PA APIS (MM/DS/ASIO)
|
||||
(Currently v19-devel) into a VS2005 DLL and lib file.
|
||||
This DLL contains all 5 current Win32 PA APIS (MME/DS/ASIO/WASAPI/WDMKS)
|
||||
|
||||
1)Copy the source dirs that comes with the ASIO SDK inside src\hostapi\asio\ASIOSDK
|
||||
so you should now have example:
|
||||
|
@ -29,7 +29,7 @@ This DLL contains all 3 current win32 PA APIS (MM/DS/ASIO)
|
|||
Processor Pack(only works with above SP5)
|
||||
Latest known URL:
|
||||
http://msdn2.microsoft.com/en-us/vstudio/Aa718349.aspx
|
||||
This isnt absolutely required for portaudio, but if you plan on using SSE intrinsics and similar things.
|
||||
This isn't absolutely required for portaudio, but if you plan on using SSE intrinsics and similar things.
|
||||
Up to you to decide upon Service pack 5 or 6 depending on your need for intrinsics.
|
||||
|
||||
Platform SDK (Feb 2003) :
|
||||
|
@ -51,8 +51,9 @@ This DLL contains all 3 current win32 PA APIS (MM/DS/ASIO)
|
|||
*If you have 7.0(VC.NET/2001) or 7.1(VC.2003) *
|
||||
then I suggest you open portaudio.dsp (and convert if needed)
|
||||
|
||||
*If you have Visual Studio 2005*, I suggest you open the portaudio.sln file
|
||||
which contains 4 configurations. Win32/x64 in both Release and Debug variants
|
||||
*If you have Visual Studio 2005 * (or later), I suggest you open the portaudio.sln file
|
||||
which contains 2 projects (portaudio & portaudio_static) each with 6 configurations: Win32/x64 in both Debug, Release and ReleaseMinDependency,
|
||||
last of which removes dependency of all but basic OS system DLLs.
|
||||
|
||||
hit compile and hope for the best.
|
||||
|
||||
|
@ -88,22 +89,24 @@ To build PortAudio without ASIO support you need to:
|
|||
|
||||
B. Make sure your project doesn't try to build the PortAudio ASIO
|
||||
implementation files:
|
||||
src/hostapi/pa_asio.cpp src/hostapi/iasiothiscallresolver.cpp
|
||||
src/hostapi/pa_asio.cpp
|
||||
src/hostapi/iasiothiscallresolver.cpp
|
||||
If you're using one of the shipped projects remove them from the project.
|
||||
|
||||
C. Define the PA_NO_ASIO preprocessor symbol in the project properties.
|
||||
C. Set the PA_USE_ASIO preprocessor symbol to zero (i.e. PA_USE_ASIO=0) in the project properties.
|
||||
In VS2005 this can be added under
|
||||
Project Properties > Configuration Properties > C/C++ > Preprocessor > Preprocessor Definitions
|
||||
|
||||
Defining PA_NO_ASIO stops src/os/win/pa_win_hostapis.c
|
||||
Setting PA_USE_ASIO=0 stops src/os/win/pa_win_hostapis.c
|
||||
from trying to initialize the PA ASIO implementation.
|
||||
|
||||
D. Remove PaAsio_* entry points from portaudio.def
|
||||
D. Remove PaAsio_* entry points from portaudio.def, or comment them out with ;
|
||||
|
||||
|
||||
A similar procedure can be used to omit any of the other host APIs from the
|
||||
build. The relevant preprocessor symbols used by pa_win_hostapis.c are:
|
||||
PA_NO_WMME, PA_NO_DS, PA_NO_ASIO, PA_NO_WASAPI and PA_NO_WDMKS
|
||||
|
||||
PA_USE_WMME, PA_USE_DSOUND, PA_USE_ASIO, PA_USE_WASAPI and PA_USE_WDMKS
|
||||
|
||||
-----
|
||||
David Viens, davidv@plogue.com
|
||||
Robert Bielik, robert@xponaut.se
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,9 +1,10 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2003-02-22'
|
||||
timestamp='2010-01-22'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
|
@ -21,22 +22,26 @@ timestamp='2003-02-22'
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
# diff and a properly formatted GNU ChangeLog entry.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
# If it is invalid, we print an error message on stderr and exit with code 1.
|
||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
|
||||
# This file is supposed to be the same for all GNU packages
|
||||
# and recognize all the CPU types, system types and aliases
|
||||
# that are meaningful with *any* GNU software.
|
||||
|
@ -70,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
@ -83,11 +89,11 @@ Try \`$me --help' for more information."
|
|||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
--time-stamp | --time* | -t )
|
||||
echo "$timestamp" ; exit 0 ;;
|
||||
echo "$timestamp" ; exit ;;
|
||||
--version | -v )
|
||||
echo "$version" ; exit 0 ;;
|
||||
echo "$version" ; exit ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
echo "$usage"; exit ;;
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
- ) # Use stdin as input.
|
||||
|
@ -99,7 +105,7 @@ while test $# -gt 0 ; do
|
|||
*local*)
|
||||
# First pass through any local machine types.
|
||||
echo $1
|
||||
exit 0;;
|
||||
exit ;;
|
||||
|
||||
* )
|
||||
break ;;
|
||||
|
@ -118,7 +124,10 @@ esac
|
|||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
kopensolaris*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
|
@ -144,10 +153,13 @@ case $os in
|
|||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis)
|
||||
-apple | -axis | -knuth | -cray | -microblaze)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-bluegene*)
|
||||
os=-cnk
|
||||
;;
|
||||
-sim | -cisco | -oki | -wec | -winbond)
|
||||
os=
|
||||
basic_machine=$1
|
||||
|
@ -169,6 +181,10 @@ case $os in
|
|||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco6)
|
||||
os=-sco5v6
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5)
|
||||
os=-sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
|
@ -185,6 +201,10 @@ case $os in
|
|||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5v6*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
|
@ -228,53 +248,71 @@ case $basic_machine in
|
|||
| a29k \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| clipper \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| fido | fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k \
|
||||
| m32r | m68000 | m68k | m88k | mcore \
|
||||
| ip2k | iq2000 \
|
||||
| lm32 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep | metag \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
| mips64vr | mips64vrel \
|
||||
| mips64octeon | mips64octeonel \
|
||||
| mips64orion | mips64orionel \
|
||||
| mips64r5900 | mips64r5900el \
|
||||
| mips64vr | mips64vrel \
|
||||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| moxie \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nios | nios2 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc | or32 \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| tahoe | thumb | tic80 | tron \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| ubicom32 \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| z8k | z80)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
|
||||
# Motorola 68HC11/12.
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
||||
;;
|
||||
ms1)
|
||||
basic_machine=mt-unknown
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
|
@ -294,54 +332,69 @@ case $basic_machine in
|
|||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* \
|
||||
| bs2000-* \
|
||||
| avr-* | avr32-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | cydra-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* \
|
||||
| m32r-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| lm32-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | mcore-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
| mips64vr-* | mips64vrel-* \
|
||||
| mips64octeon-* | mips64octeonel-* \
|
||||
| mips64orion-* | mips64orionel-* \
|
||||
| mips64r5900-* | mips64r5900el-* \
|
||||
| mips64vr-* | mips64vrel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mips64vr5900-* | mips64vr5900el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
|
||||
| nios-* | nios2-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| romp-* | rs6000-* | rx-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tile-* | tilegx-* \
|
||||
| tron-* \
|
||||
| ubicom32-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
|
||||
| xtensa-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
| z8k-* | z80-*)
|
||||
;;
|
||||
# Recognize the basic CPU types without company name, with glob match.
|
||||
xtensa*)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
|
@ -359,6 +412,9 @@ case $basic_machine in
|
|||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
abacus)
|
||||
basic_machine=abacus-unknown
|
||||
;;
|
||||
adobe68k)
|
||||
basic_machine=m68010-adobe
|
||||
os=-scout
|
||||
|
@ -373,6 +429,12 @@ case $basic_machine in
|
|||
basic_machine=a29k-none
|
||||
os=-bsd
|
||||
;;
|
||||
amd64)
|
||||
basic_machine=x86_64-pc
|
||||
;;
|
||||
amd64-*)
|
||||
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
os=-sysv
|
||||
|
@ -396,6 +458,10 @@ case $basic_machine in
|
|||
basic_machine=m68k-apollo
|
||||
os=-bsd
|
||||
;;
|
||||
aros)
|
||||
basic_machine=i386-pc
|
||||
os=-aros
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
|
@ -404,10 +470,26 @@ case $basic_machine in
|
|||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
blackfin)
|
||||
basic_machine=bfin-unknown
|
||||
os=-linux
|
||||
;;
|
||||
blackfin-*)
|
||||
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
bluegene*)
|
||||
basic_machine=powerpc-ibm
|
||||
os=-cnk
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cegcc)
|
||||
basic_machine=arm-unknown
|
||||
os=-cegcc
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
|
@ -432,12 +514,27 @@ case $basic_machine in
|
|||
basic_machine=j90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
craynv)
|
||||
basic_machine=craynv-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
cr16)
|
||||
basic_machine=cr16-unknown
|
||||
os=-elf
|
||||
;;
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
crisv32 | crisv32-* | etraxfs*)
|
||||
basic_machine=crisv32-axis
|
||||
;;
|
||||
cris | cris-* | etrax*)
|
||||
basic_machine=cris-axis
|
||||
;;
|
||||
crx)
|
||||
basic_machine=crx-unknown
|
||||
os=-elf
|
||||
;;
|
||||
da30 | da30-*)
|
||||
basic_machine=m68k-da30
|
||||
;;
|
||||
|
@ -460,6 +557,14 @@ case $basic_machine in
|
|||
basic_machine=m88k-motorola
|
||||
os=-sysv3
|
||||
;;
|
||||
dicos)
|
||||
basic_machine=i686-pc
|
||||
os=-dicos
|
||||
;;
|
||||
djgpp)
|
||||
basic_machine=i586-pc
|
||||
os=-msdosdjgpp
|
||||
;;
|
||||
dpx20 | dpx20-*)
|
||||
basic_machine=rs6000-bull
|
||||
os=-bosx
|
||||
|
@ -610,6 +715,14 @@ case $basic_machine in
|
|||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
m68knommu)
|
||||
basic_machine=m68k-unknown
|
||||
os=-linux
|
||||
;;
|
||||
m68knommu-*)
|
||||
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
m88k-omron*)
|
||||
basic_machine=m88k-omron
|
||||
;;
|
||||
|
@ -621,10 +734,17 @@ case $basic_machine in
|
|||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
microblaze)
|
||||
basic_machine=microblaze-xilinx
|
||||
;;
|
||||
mingw32)
|
||||
basic_machine=i386-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
mingw32ce)
|
||||
basic_machine=arm-unknown
|
||||
os=-mingw32ce
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
|
@ -638,10 +758,6 @@ case $basic_machine in
|
|||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
mmix*)
|
||||
basic_machine=mmix-knuth
|
||||
os=-mmixware
|
||||
;;
|
||||
monitor)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
|
@ -654,6 +770,9 @@ case $basic_machine in
|
|||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
;;
|
||||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
|
@ -722,10 +841,6 @@ case $basic_machine in
|
|||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
nv1)
|
||||
basic_machine=nv1-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
|
@ -733,9 +848,12 @@ case $basic_machine in
|
|||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
or32 | or32-*)
|
||||
openrisc | openrisc-*)
|
||||
basic_machine=or32-unknown
|
||||
os=-coff
|
||||
;;
|
||||
os400)
|
||||
basic_machine=powerpc-ibm
|
||||
os=-os400
|
||||
;;
|
||||
OSE68000 | ose68000)
|
||||
basic_machine=m68000-ericsson
|
||||
|
@ -753,6 +871,14 @@ case $basic_machine in
|
|||
basic_machine=i860-intel
|
||||
os=-osf
|
||||
;;
|
||||
parisc)
|
||||
basic_machine=hppa-unknown
|
||||
os=-linux
|
||||
;;
|
||||
parisc-*)
|
||||
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
pbd)
|
||||
basic_machine=sparc-tti
|
||||
;;
|
||||
|
@ -762,24 +888,36 @@ case $basic_machine in
|
|||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pc98)
|
||||
basic_machine=i386-pc
|
||||
;;
|
||||
pc98-*)
|
||||
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | 6x86 | athlon | athlon_*)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
pentiumii | pentium2 | pentiumiii | pentium3)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentium4)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium4-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
|
@ -812,6 +950,10 @@ case $basic_machine in
|
|||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rom68k)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
|
@ -838,6 +980,14 @@ case $basic_machine in
|
|||
sb1el)
|
||||
basic_machine=mipsisa64sb1el-unknown
|
||||
;;
|
||||
sde)
|
||||
basic_machine=mipsisa32-sde
|
||||
os=-elf
|
||||
;;
|
||||
sei)
|
||||
basic_machine=mips-sei
|
||||
os=-seiux
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
|
@ -845,6 +995,12 @@ case $basic_machine in
|
|||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sh5el)
|
||||
basic_machine=sh5le-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparclite-wrs | simso-wrs)
|
||||
basic_machine=sparclite-wrs
|
||||
os=-vxworks
|
||||
|
@ -919,10 +1075,6 @@ case $basic_machine in
|
|||
basic_machine=t90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic4x | c4x*)
|
||||
basic_machine=tic4x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
basic_machine=tic54x-unknown
|
||||
os=-coff
|
||||
|
@ -935,6 +1087,15 @@ case $basic_machine in
|
|||
basic_machine=tic6x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
# This must be matched before tile*.
|
||||
tilegx*)
|
||||
basic_machine=tilegx-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
tile*)
|
||||
basic_machine=tile-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
|
@ -948,6 +1109,10 @@ case $basic_machine in
|
|||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
tpf)
|
||||
basic_machine=s390x-ibm
|
||||
os=-tpf
|
||||
;;
|
||||
udi29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
|
@ -991,6 +1156,10 @@ case $basic_machine in
|
|||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
xbox)
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
|
@ -1002,6 +1171,10 @@ case $basic_machine in
|
|||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
;;
|
||||
z80-*-coff)
|
||||
basic_machine=z80-unknown
|
||||
os=-sim
|
||||
;;
|
||||
none)
|
||||
basic_machine=none-none
|
||||
os=-none
|
||||
|
@ -1021,6 +1194,9 @@ case $basic_machine in
|
|||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
mmix)
|
||||
basic_machine=mmix-knuth
|
||||
;;
|
||||
rs6000)
|
||||
basic_machine=rs6000-ibm
|
||||
;;
|
||||
|
@ -1037,13 +1213,10 @@ case $basic_machine in
|
|||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparc | sparcv9 | sparcv9b)
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
|
@ -1090,6 +1263,9 @@ case $os in
|
|||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# -solaris* is a basic system type, with this one exception.
|
||||
-auroraux)
|
||||
os=-auroraux
|
||||
;;
|
||||
-solaris1 | -solaris1.*)
|
||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||
;;
|
||||
|
@ -1110,25 +1286,30 @@ case $os in
|
|||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* \
|
||||
| -aos* | -aros* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix*)
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
|
@ -1146,12 +1327,15 @@ case $os in
|
|||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
|
||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||
;;
|
||||
-mac*)
|
||||
os=`echo $os | sed -e 's|mac|macos|'`
|
||||
;;
|
||||
-linux-dietlibc)
|
||||
os=-linux-dietlibc
|
||||
;;
|
||||
-linux*)
|
||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
|
@ -1164,6 +1348,9 @@ case $os in
|
|||
-opened*)
|
||||
os=-openedition
|
||||
;;
|
||||
-os400*)
|
||||
os=-os400
|
||||
;;
|
||||
-wince*)
|
||||
os=-wince
|
||||
;;
|
||||
|
@ -1185,6 +1372,9 @@ case $os in
|
|||
-atheos*)
|
||||
os=-atheos
|
||||
;;
|
||||
-syllable*)
|
||||
os=-syllable
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
|
@ -1207,6 +1397,9 @@ case $os in
|
|||
-sinix*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-tpf*)
|
||||
os=-tpf
|
||||
;;
|
||||
-triton*)
|
||||
os=-sysv3
|
||||
;;
|
||||
|
@ -1243,6 +1436,14 @@ case $os in
|
|||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
-dicos*)
|
||||
os=-dicos
|
||||
;;
|
||||
-nacl*)
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
|
@ -1265,6 +1466,12 @@ else
|
|||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
score-*)
|
||||
os=-elf
|
||||
;;
|
||||
spu-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
|
@ -1274,6 +1481,9 @@ case $basic_machine in
|
|||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
|
@ -1299,6 +1509,9 @@ case $basic_machine in
|
|||
m68*-cisco)
|
||||
os=-aout
|
||||
;;
|
||||
mep-*)
|
||||
os=-elf
|
||||
;;
|
||||
mips*-cisco)
|
||||
os=-elf
|
||||
;;
|
||||
|
@ -1317,9 +1530,15 @@ case $basic_machine in
|
|||
*-be)
|
||||
os=-beos
|
||||
;;
|
||||
*-haiku)
|
||||
os=-haiku
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-knuth)
|
||||
os=-mmixware
|
||||
;;
|
||||
*-wec)
|
||||
os=-proelf
|
||||
;;
|
||||
|
@ -1422,7 +1641,7 @@ case $basic_machine in
|
|||
-sunos*)
|
||||
vendor=sun
|
||||
;;
|
||||
-aix*)
|
||||
-cnk*|-aix*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-beos*)
|
||||
|
@ -1452,9 +1671,15 @@ case $basic_machine in
|
|||
-mvs* | -opened*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-os400*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
-tpf*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-vxsim* | -vxworks* | -windiss*)
|
||||
vendor=wrs
|
||||
;;
|
||||
|
@ -1479,7 +1704,7 @@ case $basic_machine in
|
|||
esac
|
||||
|
||||
echo $basic_machine$os
|
||||
exit 0
|
||||
exit
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -165,6 +165,7 @@ AC_SUBST(DLL_LIBS)
|
|||
AC_SUBST(CXXFLAGS)
|
||||
AC_SUBST(NASM)
|
||||
AC_SUBST(NASMOPT)
|
||||
AC_SUBST(INCLUDES)
|
||||
|
||||
dnl -g is optional on darwin
|
||||
if ( echo "${host_os}" | grep ^darwin >> /dev/null ) &&
|
||||
|
@ -188,6 +189,8 @@ add_objects()
|
|||
done
|
||||
}
|
||||
|
||||
INCLUDES=portaudio.h
|
||||
|
||||
case "${host_os}" in
|
||||
darwin* )
|
||||
dnl Mac OS X configuration
|
||||
|
@ -223,7 +226,7 @@ case "${host_os}" in
|
|||
PADLL="portaudio.dll"
|
||||
THREAD_CFLAGS="-mthreads"
|
||||
SHARED_FLAGS="-shared"
|
||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/include -DPA_NO_WMME -DPA_NO_ASIO -DPA_NO_WDMKS -DPA_NO_DS -DPA_NO_WASAPI"
|
||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/include -DPA_USE_WMME=0 -DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0 -DPA_USE_WASAPI=0"
|
||||
|
||||
if [[ "x$with_directx" = "xyes" ]]; then
|
||||
DXDIR="$with_dxdir"
|
||||
|
@ -232,7 +235,7 @@ case "${host_os}" in
|
|||
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -ldsound -lole32"
|
||||
#VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
|
||||
#CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
|
||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/win -I$DXDIR/include -UPA_NO_DS"
|
||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/win -I$DXDIR/include -UPA_USE_DS -DPA_USE_DS=1"
|
||||
fi
|
||||
|
||||
if [[ "x$with_asio" = "xyes" ]]; then
|
||||
|
@ -240,7 +243,7 @@ case "${host_os}" in
|
|||
add_objects src/hostapi/asio/pa_asio.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/hostapi/asio/iasiothiscallresolver.o $ASIODIR/common/asio.o $ASIODIR/host/asiodrivers.o $ASIODIR/host/pc/asiolist.o
|
||||
LIBS="-lwinmm -lm -lole32 -luuid"
|
||||
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -lole32 -luuid"
|
||||
CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer -I\$(top_srcdir)/src/common -I\$(top_srcdir)/src/hostapi/asio -I$ASIODIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -UPA_NO_ASIO -DWINDOWS"
|
||||
CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer -I\$(top_srcdir)/src/common -I\$(top_srcdir)/src/hostapi/asio -I$ASIODIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -UPA_USE_ASIO -DPA_USE_ASIO=1 -DWINDOWS"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
fi
|
||||
|
||||
|
@ -251,21 +254,21 @@ case "${host_os}" in
|
|||
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
|
||||
#VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
|
||||
#CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
|
||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -I$DXDIR/include -UPA_NO_WDMKS"
|
||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -I$DXDIR/include -UPA_USE_WDMKS -DPA_USE_WDMKS=1"
|
||||
fi
|
||||
|
||||
if [[ "x$with_wmme" = "xyes" ]]; then
|
||||
add_objects src/hostapi/wmme/pa_win_wmme.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o
|
||||
LIBS="-lwinmm -lm -lole32 -luuid"
|
||||
DLL_LIBS="${DLL_LIBS} -lwinmm"
|
||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -UPA_NO_WMME"
|
||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -UPA_USE_WMME -DPA_USE_WMME=1"
|
||||
fi
|
||||
|
||||
if [[ "x$with_wasapi" = "xyes" ]]; then
|
||||
add_objects src/hostapi/wasapi/pa_win_wasapi.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o
|
||||
add_objects src/hostapi/wasapi/pa_win_wasapi.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o
|
||||
LIBS="-lwinmm -lm -lole32 -luuid"
|
||||
DLL_LIBS="${DLL_LIBS} -lwinmm"
|
||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_NO_WASAPI"
|
||||
DLL_LIBS="${DLL_LIBS} -lwinmm -lole32"
|
||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_USE_WASAPI -DPA_USE_WASAPI=1"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
@ -273,7 +276,7 @@ case "${host_os}" in
|
|||
dnl Cygwin configuration
|
||||
|
||||
OTHER_OBJS="src/hostapi/wmme/pa_win_wmme.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o"
|
||||
CFLAGS="$CFLAGS -DPA_NO_DS -DPA_NO_WDMKS -DPA_NO_ASIO -DPA_NO_WASAPI"
|
||||
CFLAGS="$CFLAGS -DPA_USE_DS=0 -DPA_USE_WDMKS=0 -DPA_USE_ASIO=0 -DPA_USE_WASAPI=0 -DPA_USE_WMME=1"
|
||||
LIBS="-lwinmm -lm"
|
||||
PADLL="portaudio.dll"
|
||||
THREAD_CFLAGS="-mthreads"
|
||||
|
@ -317,6 +320,7 @@ case "${host_os}" in
|
|||
DLL_LIBS="$DLL_LIBS -lasound"
|
||||
LIBS="$LIBS -lasound"
|
||||
OTHER_OBJS="$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o"
|
||||
INCLUDES="$INCLUDES pa_linux_alsa.h"
|
||||
AC_DEFINE(PA_USE_ALSA)
|
||||
fi
|
||||
|
||||
|
@ -324,6 +328,7 @@ case "${host_os}" in
|
|||
DLL_LIBS="$DLL_LIBS $JACK_LIBS"
|
||||
CFLAGS="$CFLAGS $JACK_CFLAGS"
|
||||
OTHER_OBJS="$OTHER_OBJS src/hostapi/jack/pa_jack.o src/common/pa_ringbuffer.o"
|
||||
INCLUDES="$INCLUDES pa_jack.h"
|
||||
AC_DEFINE(PA_USE_JACK)
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2005-07-09.11
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
||||
# Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -16,9 +17,7 @@ scriptversion=2005-07-09.11
|
|||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
@ -86,12 +85,34 @@ if test "$depmode" = dashXmstdout; then
|
|||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u="sed s,\\\\\\\\,/,g"
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
|
@ -178,14 +199,14 @@ sgi)
|
|||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
' ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
|
@ -201,34 +222,39 @@ aix)
|
|||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
|
@ -276,6 +302,51 @@ icc)
|
|||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
|
@ -288,13 +359,13 @@ tru64)
|
|||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mecanism is used in libtool 1.4 series to
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in in $dir.libs/$base.o.d and
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
|
@ -345,7 +416,7 @@ dashmstdout)
|
|||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
@ -396,32 +467,39 @@ makedepend)
|
|||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
|
@ -441,7 +519,7 @@ cpp)
|
|||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
@ -479,13 +557,27 @@ cpp)
|
|||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
|
@ -498,16 +590,23 @@ msvisualcpp)
|
|||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
@ -526,5 +625,6 @@ exit 0
|
|||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @page api_overview PortAudio API Overview
|
||||
|
||||
This page provides a top-down overview of the entire PortAudio API. It shows how all of the PortAudio data types and functions fit together. It provides links to the documentation for each function and data type. You can find all of the detailed documentation for each API function and data type on the portaudio.h page.
|
||||
This page provides a top-down overview of the entire PortAudio API. It describes how all of the PortAudio data types and functions fit together. It provides links to the documentation for each function and data type. You can find all of the detailed documentation for each API function and data type on the portaudio.h page.
|
||||
|
||||
@section introduction Introduction
|
||||
|
||||
|
@ -32,7 +32,7 @@ The PortAudio API offers the following functionality:
|
|||
- Provide Stream timing information to support synchronising audio with other parts of your application
|
||||
- Retrieve version and error information.
|
||||
|
||||
These functions are described in more detail in the sections that follow.
|
||||
These functions are described in more detail below.
|
||||
|
||||
|
||||
@section top_level_functions Initialization, termination and utility functions
|
||||
|
|
|
@ -29,6 +29,7 @@ http://www.portaudio.com/trac
|
|||
- Coding guidelines:
|
||||
http://www.portaudio.com/docs/proposals/014-StyleGuide.html
|
||||
|
||||
If you're interested in helping out with PortAudio development, you may be interested in the doxygen generated <a href="todo.html">TODO List</a>. Feel free to pick an item off TODO list and fix/implement it. You may want to enquire about status on the PortAudio mailing list first.
|
||||
|
||||
If you're interested in helping out with PortAudio development we're more than happy for you to be involved. Just drop by the PortAudio mailing list and ask how you can help.
|
||||
|
||||
*/
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef PA_ASIO_H
|
||||
#define PA_ASIO_H
|
||||
/*
|
||||
* $Id: pa_asio.h 1400 2009-01-21 10:20:42Z rossb $
|
||||
* $Id: pa_asio.h 1592 2011-02-04 10:41:58Z rossb $
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* ASIO specific extensions
|
||||
*
|
||||
|
@ -44,7 +44,6 @@
|
|||
@brief ASIO-specific PortAudio API extension header file.
|
||||
*/
|
||||
|
||||
|
||||
#include "portaudio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -65,7 +64,8 @@ extern "C"
|
|||
|
||||
@see ASIOGetBufferSize in the ASIO SDK.
|
||||
|
||||
@todo This function should have a better name, any suggestions?
|
||||
@todo This function should be renamed to PaAsio_GetAvailableBufferSizes.
|
||||
No reason to use a wildly different name from the ASIO version.
|
||||
*/
|
||||
PaError PaAsio_GetAvailableLatencyValues( PaDeviceIndex device,
|
||||
long *minLatency, long *maxLatency, long *preferredLatency, long *granularity );
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
* @ingroup public_header
|
||||
* @brief JACK-specific PortAudio API extension header file.
|
||||
*/
|
||||
|
||||
#include "portaudio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define PA_LINUX_ALSA_H
|
||||
|
||||
/*
|
||||
* $Id: pa_linux_alsa.h 1414 2009-05-24 17:02:10Z aknudsen $
|
||||
* $Id: pa_linux_alsa.h 1597 2011-02-11 00:15:51Z dmitrykos $
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* ALSA-specific extensions
|
||||
*
|
||||
|
@ -43,6 +43,7 @@
|
|||
* @ingroup public_header
|
||||
* @brief ALSA-specific PortAudio API extension header file.
|
||||
*/
|
||||
|
||||
#include "portaudio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -92,6 +93,13 @@ PaError PaAlsa_SetNumPeriods( int numPeriods );
|
|||
*/
|
||||
PaError PaAlsa_SetRetriesBusy( int retries );
|
||||
|
||||
/** Set the path and name of ALSA library file if PortAudio is configured to load it dynamically (see
|
||||
* PA_ALSA_DYNAMIC). This setting will overwrite the default name set by PA_ALSA_PATHNAME define.
|
||||
* @param pathName Full path with filename. Only filename can be used, but dlopen() will lookup default
|
||||
* searchable directories (/usr/lib;/usr/local/lib) then.
|
||||
*/
|
||||
void PaAlsa_SetLibraryPathName( const char *pathName );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
* @brief CoreAudio-specific PortAudio API extension header file.
|
||||
*/
|
||||
|
||||
#include "portaudio.h"
|
||||
|
||||
#include <AudioUnit/AudioUnit.h>
|
||||
//#include <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
@brief DirectSound-specific PortAudio API extension header file.
|
||||
*/
|
||||
|
||||
|
||||
#include "portaudio.h"
|
||||
#include "pa_win_waveformat.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef PA_WIN_WMME_H
|
||||
#define PA_WIN_WMME_H
|
||||
/*
|
||||
* $Id: pa_win_wmme.h 1405 2009-03-08 08:10:55Z rossb $
|
||||
* $Id: pa_win_wmme.h 1592 2011-02-04 10:41:58Z rossb $
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* MME specific extensions
|
||||
*
|
||||
|
@ -43,7 +43,6 @@
|
|||
@brief WMME-specific PortAudio API extension header file.
|
||||
*/
|
||||
|
||||
|
||||
#include "portaudio.h"
|
||||
#include "pa_win_waveformat.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef PORTAUDIO_H
|
||||
#define PORTAUDIO_H
|
||||
/*
|
||||
* $Id: portaudio.h 1337 2008-02-15 07:32:09Z rossb $
|
||||
* $Id: portaudio.h 1594 2011-02-05 14:33:29Z rossb $
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* PortAudio API Header File
|
||||
* Latest version available at: http://www.portaudio.com/
|
||||
|
@ -95,10 +95,10 @@ typedef enum PaErrorCode
|
|||
paOutputUnderflowed,
|
||||
paHostApiNotFound,
|
||||
paInvalidHostApi,
|
||||
paCanNotReadFromACallbackStream, /**< @todo review error code name */
|
||||
paCanNotWriteToACallbackStream, /**< @todo review error code name */
|
||||
paCanNotReadFromAnOutputOnlyStream, /**< @todo review error code name */
|
||||
paCanNotWriteToAnInputOnlyStream, /**< @todo review error code name */
|
||||
paCanNotReadFromACallbackStream,
|
||||
paCanNotWriteToACallbackStream,
|
||||
paCanNotReadFromAnOutputOnlyStream,
|
||||
paCanNotWriteToAnInputOnlyStream,
|
||||
paIncompatibleStreamHostApi,
|
||||
paBadBufferPtr
|
||||
} PaErrorCode;
|
||||
|
@ -111,7 +111,7 @@ const char *Pa_GetErrorText( PaError errorCode );
|
|||
|
||||
|
||||
/** Library initialization function - call this before using PortAudio.
|
||||
This function initialises internal data structures and prepares underlying
|
||||
This function initializes internal data structures and prepares underlying
|
||||
host APIs for use. With the exception of Pa_GetVersion(), Pa_GetVersionText(),
|
||||
and Pa_GetErrorText(), this function MUST be called before using any other
|
||||
PortAudio API functions.
|
||||
|
@ -134,7 +134,7 @@ PaError Pa_Initialize( void );
|
|||
|
||||
/** Library termination function - call this when finished using PortAudio.
|
||||
This function deallocates all resources allocated by PortAudio since it was
|
||||
initializied by a call to Pa_Initialize(). In cases where Pa_Initialise() has
|
||||
initialized by a call to Pa_Initialize(). In cases where Pa_Initialise() has
|
||||
been called multiple times, each call must be matched with a corresponding call
|
||||
to Pa_Terminate(). The final matching call to Pa_Terminate() will automatically
|
||||
close any PortAudio streams that are still open.
|
||||
|
@ -344,13 +344,13 @@ typedef struct PaHostErrorInfo{
|
|||
|
||||
/** Return information about the last host error encountered. The error
|
||||
information returned by Pa_GetLastHostErrorInfo() will never be modified
|
||||
asyncronously by errors occurring in other PortAudio owned threads
|
||||
asynchronously by errors occurring in other PortAudio owned threads
|
||||
(such as the thread that manages the stream callback.)
|
||||
|
||||
This function is provided as a last resort, primarily to enhance debugging
|
||||
by providing clients with access to all available error information.
|
||||
|
||||
@return A pointer to an immutable structure constaining information about
|
||||
@return A pointer to an immutable structure constraining information about
|
||||
the host error. The values in this structure will only be valid if a
|
||||
PortAudio function has previously returned the paUnanticipatedHostError
|
||||
error code.
|
||||
|
@ -383,7 +383,7 @@ PaDeviceIndex Pa_GetDefaultInputDevice( void );
|
|||
/** Retrieve the index of the default output device. The result can be
|
||||
used in the outputDevice parameter to Pa_OpenStream().
|
||||
|
||||
@return The default output device index for the defualt host API, or paNoDevice
|
||||
@return The default output device index for the default host API, or paNoDevice
|
||||
if no default output device is available or an error was encountered.
|
||||
|
||||
@note
|
||||
|
@ -398,11 +398,13 @@ PaDeviceIndex Pa_GetDefaultInputDevice( void );
|
|||
PaDeviceIndex Pa_GetDefaultOutputDevice( void );
|
||||
|
||||
|
||||
/** The type used to represent monotonic time in seconds that can be used
|
||||
for syncronisation. The type is used for the outTime argument to the
|
||||
/** The type used to represent monotonic time in seconds. PaTime is
|
||||
used for the fields of the PaStreamCallbackTimeInfo argument to the
|
||||
PaStreamCallback and as the result of Pa_GetStreamTime().
|
||||
|
||||
@see PaStreamCallback, Pa_GetStreamTime
|
||||
PaTime values have unspecified origin.
|
||||
|
||||
@see PaStreamCallback, PaStreamCallbackTimeInfo, Pa_GetStreamTime
|
||||
*/
|
||||
typedef double PaTime;
|
||||
|
||||
|
@ -509,8 +511,8 @@ typedef struct PaStreamParameters
|
|||
configure their latency based on these parameters, otherwise they may
|
||||
choose the closest viable latency instead. Unless the suggested latency
|
||||
is greater than the absolute upper limit for the device implementations
|
||||
should round the suggestedLatency up to the next practial value - ie to
|
||||
provide an equal or higher latency than suggestedLatency wherever possibe.
|
||||
should round the suggestedLatency up to the next practical value - ie to
|
||||
provide an equal or higher latency than suggestedLatency wherever possible.
|
||||
Actual latency values for an open stream may be retrieved using the
|
||||
inputLatency and outputLatency fields of the PaStreamInfo structure
|
||||
returned by Pa_GetStreamInfo().
|
||||
|
@ -739,14 +741,14 @@ typedef enum PaStreamCallbackResult
|
|||
stream will finish as soon as possible. If paComplete is returned, the stream
|
||||
will continue until all buffers generated by the callback have been played.
|
||||
This may be useful in applications such as soundfile players where a specific
|
||||
duration of output is required. However, it is not necessary to utilise this
|
||||
duration of output is required. However, it is not necessary to utilize this
|
||||
mechanism as Pa_StopStream(), Pa_AbortStream() or Pa_CloseStream() can also
|
||||
be used to stop the stream. The callback must always fill the entire output
|
||||
buffer irrespective of its return value.
|
||||
|
||||
@see Pa_OpenStream, Pa_OpenDefaultStream
|
||||
|
||||
@note With the exception of Pa_GetStreamCpuLoad() it is not permissable to call
|
||||
@note With the exception of Pa_GetStreamCpuLoad() it is not permissible to call
|
||||
PortAudio API functions from within the stream callback.
|
||||
*/
|
||||
typedef int PaStreamCallback(
|
||||
|
@ -776,7 +778,7 @@ typedef int PaStreamCallback(
|
|||
@param framesPerBuffer The number of frames passed to the stream callback
|
||||
function, or the preferred block granularity for a blocking read/write stream.
|
||||
The special value paFramesPerBufferUnspecified (0) may be used to request that
|
||||
the stream callback will recieve an optimal (and possibly varying) number of
|
||||
the stream callback will receive an optimal (and possibly varying) number of
|
||||
frames based on host requirements and the requested latency settings.
|
||||
Note: With some host APIs, the use of non-zero framesPerBuffer for a callback
|
||||
stream may introduce an additional layer of buffering which could introduce
|
||||
|
@ -785,7 +787,7 @@ typedef int PaStreamCallback(
|
|||
that a non-zero framesPerBuffer value only be used when your algorithm
|
||||
requires a fixed number of frames per stream callback.
|
||||
|
||||
@param streamFlags Flags which modify the behaviour of the streaming process.
|
||||
@param streamFlags Flags which modify the behavior of the streaming process.
|
||||
This parameter may contain a combination of flags ORed together. Some flags may
|
||||
only be relevant to certain buffer formats.
|
||||
|
||||
|
@ -834,7 +836,7 @@ PaError Pa_OpenStream( PaStream** stream,
|
|||
|
||||
@param numOutputChannels The number of channels of sound to be delivered to the
|
||||
stream callback or passed to Pa_WriteStream. It can range from 1 to the value
|
||||
of maxOutputChannels in the PaDeviceInfo record for the default output dvice.
|
||||
of maxOutputChannels in the PaDeviceInfo record for the default output device.
|
||||
If 0 the stream is opened as an output-only stream.
|
||||
|
||||
@param sampleFormat The sample format of both the input and output buffers
|
||||
|
@ -1007,13 +1009,20 @@ typedef struct PaStreamInfo
|
|||
const PaStreamInfo* Pa_GetStreamInfo( PaStream *stream );
|
||||
|
||||
|
||||
/** Determine the current time for the stream according to the same clock used
|
||||
to generate buffer timestamps. This time may be used for syncronising other
|
||||
events to the audio stream, for example synchronizing audio to MIDI.
|
||||
/** Returns the current time in seconds for a stream according to the same clock used
|
||||
to generate callback PaStreamCallbackTimeInfo timestamps. The time values are
|
||||
monotonically increasing and have unspecified origin.
|
||||
|
||||
Pa_GetStreamTime returns valid time values for the entire life of the stream,
|
||||
from when the stream is opened until it is closed. Starting and stopping the stream
|
||||
does not affect the passage of time returned by Pa_GetStreamTime.
|
||||
|
||||
This time may be used for synchronizing other events to the audio stream, for
|
||||
example synchronizing audio to MIDI.
|
||||
|
||||
@return The stream's current time in seconds, or 0 if an error occurred.
|
||||
|
||||
@see PaTime, PaStreamCallback
|
||||
@see PaTime, PaStreamCallback, PaStreamCallbackTimeInfo
|
||||
*/
|
||||
PaTime Pa_GetStreamTime( PaStream *stream );
|
||||
|
||||
|
@ -1032,7 +1041,7 @@ PaTime Pa_GetStreamTime( PaStream *stream );
|
|||
to maintain real-time operation. A value of 0.5 would imply that PortAudio and
|
||||
the stream callback was consuming roughly 50% of the available CPU time. The
|
||||
return value may exceed 1.0. A value of 0.0 will always be returned for a
|
||||
blocking read/write stream, or if an error occurrs.
|
||||
blocking read/write stream, or if an error occurs.
|
||||
*/
|
||||
double Pa_GetStreamCpuLoad( PaStream* stream );
|
||||
|
||||
|
|
|
@ -1,251 +1,520 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
stripcmd=
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
-c) ;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
shift;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
if [ -d $dst ]
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
true
|
||||
fi
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
true
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,10 +1,10 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2005-06-08.21
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
|
||||
# 2008, 2009 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -18,9 +18,7 @@ scriptversion=2005-06-08.21
|
|||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
@ -33,6 +31,8 @@ if test $# -eq 0; then
|
|||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
|
@ -44,7 +44,7 @@ fi
|
|||
|
||||
msg="missing on your system"
|
||||
|
||||
case "$1" in
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
|
@ -77,6 +77,7 @@ Supported PROGRAM values:
|
|||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
|
@ -86,6 +87,9 @@ Supported PROGRAM values:
|
|||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
|
||||
\`g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
@ -103,15 +107,22 @@ Send bug reports to <bug-automake@gnu.org>."
|
|||
|
||||
esac
|
||||
|
||||
# normalize program name to check for.
|
||||
program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case "$1" in
|
||||
lex|yacc)
|
||||
# the program). This is about non-GNU programs, so use $1 not
|
||||
# $program.
|
||||
case $1 in
|
||||
lex*|yacc*)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
tar*)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
|
@ -135,7 +146,7 @@ esac
|
|||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
case $program in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
|
@ -145,7 +156,7 @@ WARNING: \`$1' is $msg. You should only need it if
|
|||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
autoconf*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
|
@ -154,7 +165,7 @@ WARNING: \`$1' is $msg. You should only need it if
|
|||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
autoheader*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
|
@ -164,7 +175,7 @@ WARNING: \`$1' is $msg. You should only need it if
|
|||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
|
@ -184,7 +195,7 @@ WARNING: \`$1' is $msg. You should only need it if
|
|||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
autom4te*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
|
@ -192,8 +203,8 @@ WARNING: \`$1' is needed, but is $msg.
|
|||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
|
@ -207,80 +218,78 @@ WARNING: \`$1' is needed, but is $msg.
|
|||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
bison*|yacc*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
lex*|flex*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
help2man*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
exit $?
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
makeinfo*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
|
@ -289,11 +298,17 @@ WARNING: \`$1' is $msg. You should only need it if
|
|||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
|
@ -303,7 +318,7 @@ WARNING: \`$1' is $msg. You should only need it if
|
|||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
tar*)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
|
@ -317,13 +332,13 @@ WARNING: \`$1' is $msg. You should only need it if
|
|||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
|
@ -356,5 +371,6 @@ exit 0
|
|||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
@ -161,7 +161,8 @@ env = conf.Finish()
|
|||
|
||||
# PA infrastructure
|
||||
CommonSources = [os.path.join("common", f) for f in "pa_allocation.c pa_converters.c pa_cpuload.c pa_dither.c pa_front.c \
|
||||
pa_process.c pa_skeleton.c pa_stream.c pa_trace.c pa_debugprint.c pa_ringbuffer.c".split()]
|
||||
pa_process.c pa_stream.c pa_trace.c pa_debugprint.c pa_ringbuffer.c".split()]
|
||||
CommonSources.append(os.path.join("hostapi", "skeleton", "pa_hostapi_skeleton.c"))
|
||||
|
||||
# Host APIs implementations
|
||||
ImplSources = []
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_converters.c 1495 2010-04-17 07:43:00Z dmitrykos $
|
||||
* $Id: pa_converters.c 1576 2011-02-01 12:58:26Z rossb $
|
||||
* Portable Audio I/O Library sample conversion mechanism
|
||||
*
|
||||
* Based on the Open Source API proposed by Ross Bencina
|
||||
|
@ -46,11 +46,15 @@
|
|||
@todo Consider whether functions which dither but don't clip should exist,
|
||||
V18 automatically enabled clipping whenever dithering was selected. Perhaps
|
||||
we should do the same.
|
||||
see: "require clipping for dithering sample conversion functions?"
|
||||
http://www.portaudio.com/trac/ticket/112
|
||||
|
||||
@todo implement the converters marked IMPLEMENT ME: Float32_To_UInt8_Dither,
|
||||
Float32_To_UInt8_Clip, Float32_To_UInt8_DitherClip, Int32_To_Int24_Dither,
|
||||
Int32_To_UInt8_Dither, Int24_To_Int16_Dither, Int24_To_Int8_Dither,
|
||||
Int24_To_UInt8_Dither, Int16_To_Int8_Dither, Int16_To_UInt8_Dither,
|
||||
Int24_To_UInt8_Dither, Int16_To_Int8_Dither, Int16_To_UInt8_Dither
|
||||
see: "some conversion functions are not implemented in pa_converters.c"
|
||||
http://www.portaudio.com/trac/ticket/35
|
||||
|
||||
@todo review the converters marked REVIEW: Float32_To_Int32,
|
||||
Float32_To_Int32_Dither, Float32_To_Int32_Clip, Float32_To_Int32_DitherClip,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_cpuload.c 1097 2006-08-26 08:27:53Z rossb $
|
||||
* $Id: pa_cpuload.c 1577 2011-02-01 13:03:45Z rossb $
|
||||
* Portable Audio I/O Library CPU Load measurement functions
|
||||
* Portable CPU load measurement facility.
|
||||
*
|
||||
|
@ -46,7 +46,7 @@
|
|||
@todo Dynamically calculate the coefficients used to smooth the CPU Load
|
||||
Measurements over time to provide a uniform characterisation of CPU Load
|
||||
independent of rate at which PaUtil_BeginCpuLoadMeasurement /
|
||||
PaUtil_EndCpuLoadMeasurement are called.
|
||||
PaUtil_EndCpuLoadMeasurement are called. see http://www.portaudio.com/trac/ticket/113
|
||||
*/
|
||||
|
||||
|
||||
|
@ -89,7 +89,7 @@ void PaUtil_EndCpuLoadMeasurement( PaUtilCpuLoadMeasurer* measurer, unsigned lon
|
|||
measuredLoad = (measurementEndTime - measurer->measurementStartTime) / secondsFor100Percent;
|
||||
|
||||
/* Low pass filter the calculated CPU load to reduce jitter using a simple IIR low pass filter. */
|
||||
/** FIXME @todo these coefficients shouldn't be hardwired */
|
||||
/** FIXME @todo these coefficients shouldn't be hardwired see: http://www.portaudio.com/trac/ticket/113 */
|
||||
#define LOWPASS_COEFFICIENT_0 (0.9)
|
||||
#define LOWPASS_COEFFICIENT_1 (0.99999 - LOWPASS_COEFFICIENT_0)
|
||||
|
||||
|
|
|
@ -48,9 +48,6 @@
|
|||
"byte code/abi portable". So the technique used here is to allocate a local
|
||||
a static array, write in it, then callback the user with a pointer to its
|
||||
start.
|
||||
|
||||
@todo Consider allocating strdump using dynamic allocation.
|
||||
@todo Consider reentrancy and possibly corrupted strdump buffer.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_front.c 1396 2008-11-03 19:31:30Z philburk $
|
||||
* $Id: pa_front.c 1584 2011-02-02 18:58:17Z rossb $
|
||||
* Portable Audio I/O Library Multi-Host API front end
|
||||
* Validate function parameters and manage multiple host APIs.
|
||||
*
|
||||
|
@ -59,18 +59,6 @@
|
|||
|
||||
All PortAudio API functions can be conditionally compiled with logging code.
|
||||
To compile with logging, define the PA_LOG_API_CALLS precompiler symbol.
|
||||
|
||||
@todo Consider adding host API specific error text in Pa_GetErrorText() for
|
||||
paUnanticipatedHostError
|
||||
|
||||
@todo Consider adding a new error code for when (inputParameters == NULL)
|
||||
&& (outputParameters == NULL)
|
||||
|
||||
@todo review whether Pa_CloseStream() should call the interface's
|
||||
CloseStream function if aborting the stream returns an error code.
|
||||
|
||||
@todo Create new error codes if a NULL buffer pointer, or a
|
||||
zero frame count is passed to Pa_ReadStream or Pa_WriteStream.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -381,7 +369,7 @@ const char *Pa_GetErrorText( PaError errorCode )
|
|||
{
|
||||
case paNoError: result = "Success"; break;
|
||||
case paNotInitialized: result = "PortAudio not initialized"; break;
|
||||
/** @todo could catenate the last host error text to result in the case of paUnanticipatedHostError */
|
||||
/** @todo could catenate the last host error text to result in the case of paUnanticipatedHostError. see: http://www.portaudio.com/trac/ticket/114 */
|
||||
case paUnanticipatedHostError: result = "Unanticipated host error"; break;
|
||||
case paInvalidChannelCount: result = "Invalid number of channels"; break;
|
||||
case paInvalidSampleRate: result = "Invalid sample rate"; break;
|
||||
|
@ -1343,7 +1331,7 @@ PaError Pa_CloseStream( PaStream* stream )
|
|||
else if( result == 0 )
|
||||
result = interface->Abort( stream );
|
||||
|
||||
if( result == paNoError ) /** @todo REVIEW: shouldn't we close anyway? */
|
||||
if( result == paNoError ) /** @todo REVIEW: shouldn't we close anyway? see: http://www.portaudio.com/trac/ticket/115 */
|
||||
result = interface->Close( stream );
|
||||
}
|
||||
|
||||
|
@ -1601,7 +1589,7 @@ PaError Pa_ReadStream( PaStream* stream,
|
|||
{
|
||||
if( frames == 0 )
|
||||
{
|
||||
/* XXX: Should we not allow the implementation to signal any overflow condition? */
|
||||
/* @todo Should we not allow the implementation to signal any overflow condition? see: http://www.portaudio.com/trac/ticket/116*/
|
||||
result = paNoError;
|
||||
}
|
||||
else if( buffer == 0 )
|
||||
|
@ -1641,7 +1629,7 @@ PaError Pa_WriteStream( PaStream* stream,
|
|||
{
|
||||
if( frames == 0 )
|
||||
{
|
||||
/* XXX: Should we not allow the implementation to signal any underflow condition? */
|
||||
/* @todo Should we not allow the implementation to signal any underflow condition? see: http://www.portaudio.com/trac/ticket/116*/
|
||||
result = paNoError;
|
||||
}
|
||||
else if( buffer == 0 )
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef PA_HOSTAPI_H
|
||||
#define PA_HOSTAPI_H
|
||||
/*
|
||||
* $Id: pa_hostapi.h 1339 2008-02-15 07:50:33Z rossb $
|
||||
* $Id: pa_hostapi.h 1634 2011-03-04 04:12:08Z rossb $
|
||||
* Portable Audio I/O Library
|
||||
* host api representation
|
||||
*
|
||||
|
@ -46,9 +46,66 @@
|
|||
to manage and communicate with host API implementations.
|
||||
*/
|
||||
|
||||
|
||||
#include "portaudio.h"
|
||||
|
||||
/**
|
||||
The PA_NO_* host API macros are now deprecated in favor of PA_USE_* macros.
|
||||
PA_USE_* indicates whether a particular host API will be initialized by PortAudio.
|
||||
An undefined or 0 value indicates that the host API will not be used. A value of 1
|
||||
indicates that the host API will be used. PA_USE_* macros should be left undefined
|
||||
or defined to either 0 or 1.
|
||||
|
||||
The code below ensures that PA_USE_* macros are always defined and have value
|
||||
0 or 1. Undefined symbols are defaulted to 0. Symbols that are neither 0 nor 1
|
||||
are defaulted to 1.
|
||||
*/
|
||||
|
||||
#ifndef PA_USE_SKELETON
|
||||
#define PA_USE_SKELETON 0
|
||||
#elif (PA_USE_SKELETON != 0) && (PA_USE_SKELETON != 1)
|
||||
#undef PA_USE_SKELETON
|
||||
#define PA_USE_SKELETON 1
|
||||
#endif
|
||||
|
||||
#if defined(PA_NO_ASIO) || defined(PA_NO_DS) || defined(PA_NO_WMME) || defined(PA_NO_WASAPI) || defined(PA_NO_WDMKS)
|
||||
#error "Portaudio: PA_NO_<APINAME> is no longer supported, please remove definition and use PA_USE_<APINAME> instead"
|
||||
#endif
|
||||
|
||||
#ifndef PA_USE_ASIO
|
||||
#define PA_USE_ASIO 0
|
||||
#elif (PA_USE_ASIO != 0) && (PA_USE_ASIO != 1)
|
||||
#undef PA_USE_ASIO
|
||||
#define PA_USE_ASIO 1
|
||||
#endif
|
||||
|
||||
#ifndef PA_USE_DS
|
||||
#define PA_USE_DS 0
|
||||
#elif (PA_USE_DS != 0) && (PA_USE_DS != 1)
|
||||
#undef PA_USE_DS
|
||||
#define PA_USE_DS 1
|
||||
#endif
|
||||
|
||||
#ifndef PA_USE_WMME
|
||||
#define PA_USE_WMME 0
|
||||
#elif (PA_USE_WMME != 0) && (PA_USE_WMME != 1)
|
||||
#undef PA_USE_WMME
|
||||
#define PA_USE_WMME 1
|
||||
#endif
|
||||
|
||||
#ifndef PA_USE_WASAPI
|
||||
#define PA_USE_WASAPI 0
|
||||
#elif (PA_USE_WASAPI != 0) && (PA_USE_WASAPI != 1)
|
||||
#undef PA_USE_WASAPI
|
||||
#define PA_USE_WASAPI 1
|
||||
#endif
|
||||
|
||||
#ifndef PA_USE_WDMKS
|
||||
#define PA_USE_WDMKS 0
|
||||
#elif (PA_USE_WDMKS != 0) && (PA_USE_WDMKS != 1)
|
||||
#undef PA_USE_WDMKS
|
||||
#define PA_USE_WDMKS 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_process.c 1523 2010-07-10 17:41:25Z dmitrykos $
|
||||
* $Id: pa_process.c 1584 2011-02-02 18:58:17Z rossb $
|
||||
* Portable Audio I/O Library
|
||||
* streamCallback <-> host buffer processing adapter
|
||||
*
|
||||
|
@ -41,41 +41,6 @@
|
|||
@ingroup common_src
|
||||
|
||||
@brief Buffer Processor implementation.
|
||||
|
||||
The code in this file is not optimised yet - although it's not clear that
|
||||
it needs to be. there may appear to be redundancies
|
||||
that could be factored into common functions, but the redundanceis are left
|
||||
intentionally as each appearance may have different optimisation possibilities.
|
||||
|
||||
The optimisations which are planned involve only converting data in-place
|
||||
where possible, rather than copying to the temp buffer(s).
|
||||
|
||||
Note that in the extreme case of being able to convert in-place, and there
|
||||
being no conversion necessary there should be some code which short-circuits
|
||||
the operation.
|
||||
|
||||
@todo Consider cache tilings for intereave<->deinterleave.
|
||||
|
||||
@todo specify and implement some kind of logical policy for handling the
|
||||
underflow and overflow stream flags when the underflow/overflow overlaps
|
||||
multiple user buffers/callbacks.
|
||||
|
||||
@todo provide support for priming the buffers with data from the callback.
|
||||
The client interface is now implemented through PaUtil_SetNoInput()
|
||||
which sets bp->hostInputChannels[0][0].data to zero. However this is
|
||||
currently only implemented in NonAdaptingProcess(). It shouldn't be
|
||||
needed for AdaptingInputOnlyProcess() (no priming should ever be
|
||||
requested for AdaptingInputOnlyProcess()).
|
||||
Not sure if additional work should be required to make it work with
|
||||
AdaptingOutputOnlyProcess, but it definitely is required for
|
||||
AdaptingProcess.
|
||||
|
||||
@todo implement PaUtil_SetNoOutput for AdaptingProcess
|
||||
|
||||
@todo don't allocate temp buffers for blocking streams unless they are
|
||||
needed. At the moment they are needed, but perhaps for host APIs
|
||||
where the implementation passes a buffer to the host they could be
|
||||
used.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -603,6 +568,8 @@ void PaUtil_SetNoOutput( PaUtilBufferProcessor* bp )
|
|||
assert( bp->outputChannelCount > 0 );
|
||||
|
||||
bp->hostOutputChannels[0][0].data = 0;
|
||||
|
||||
/* note that only NonAdaptingProcess is able to deal with no output at this stage. not implemented for AdaptingProcess */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_ringbuffer.c 1421 2009-11-18 16:09:05Z bjornroche $
|
||||
* $Id: pa_ringbuffer.c 1574 2011-02-01 11:18:16Z rossb $
|
||||
* Portable Audio I/O Library
|
||||
* Ring Buffer utility.
|
||||
*
|
||||
|
@ -145,7 +145,7 @@ ring_buffer_size_t PaUtil_AdvanceRingBufferWriteIndex( PaUtilRingBuffer *rbuf, r
|
|||
** Get address of region(s) from which we can read data.
|
||||
** If the region is contiguous, size2 will be zero.
|
||||
** If non-contiguous, size2 will be the size of second region.
|
||||
** Returns room available to be written or elementCount, whichever is smaller.
|
||||
** Returns room available to be read or elementCount, whichever is smaller.
|
||||
*/
|
||||
ring_buffer_size_t PaUtil_GetRingBufferReadRegions( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementCount,
|
||||
void **dataPtr1, ring_buffer_size_t *sizePtr1,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef PA_RINGBUFFER_H
|
||||
#define PA_RINGBUFFER_H
|
||||
/*
|
||||
* $Id: pa_ringbuffer.h 1421 2009-11-18 16:09:05Z bjornroche $
|
||||
* $Id: pa_ringbuffer.h 1549 2010-10-24 10:21:35Z rossb $
|
||||
* Portable Audio I/O Library
|
||||
* Ring Buffer utility.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef PA_UTIL_H
|
||||
#define PA_UTIL_H
|
||||
/*
|
||||
* $Id: pa_util.h 1339 2008-02-15 07:50:33Z rossb $
|
||||
* $Id: pa_util.h 1584 2011-02-02 18:58:17Z rossb $
|
||||
* Portable Audio I/O Library implementation utilities header
|
||||
* common implementation utilities and interfaces
|
||||
*
|
||||
|
@ -46,9 +46,6 @@
|
|||
|
||||
Some functions declared here are defined in pa_front.c while others
|
||||
are implemented separately for each platform.
|
||||
|
||||
@todo Document and adhere to the alignment guarantees provided by
|
||||
PaUtil_AllocateMemory().
|
||||
*/
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1826,8 +1826,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
PaTime bufferDuration = ( stream->input->hostBufferSize + stream->input->hardwareBufferSize )
|
||||
/ sampleRate / stream->input->bytesPerFrame;
|
||||
stream->baseStreamRep.streamInfo.inputLatency =
|
||||
PaUtil_GetBufferProcessorInputLatency( &stream->bufferProcessor ) +
|
||||
bufferDuration - stream->maxFramesPerHostBuffer / sampleRate;
|
||||
bufferDuration +
|
||||
((PaTime)PaUtil_GetBufferProcessorInputLatency( &stream->bufferProcessor ) -
|
||||
stream->maxFramesPerHostBuffer) / sampleRate;
|
||||
assert( stream->baseStreamRep.streamInfo.inputLatency > 0.0 );
|
||||
}
|
||||
/* Determine output latency from buffer processor and buffer sizes */
|
||||
|
@ -1842,8 +1843,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
stream->output->outputBufferCap / sampleRate / stream->output->bytesPerFrame );
|
||||
}
|
||||
stream->baseStreamRep.streamInfo.outputLatency =
|
||||
PaUtil_GetBufferProcessorOutputLatency( &stream->bufferProcessor ) +
|
||||
bufferDuration - stream->maxFramesPerHostBuffer / sampleRate;
|
||||
bufferDuration +
|
||||
((PaTime)PaUtil_GetBufferProcessorOutputLatency( &stream->bufferProcessor ) -
|
||||
stream->maxFramesPerHostBuffer) / sampleRate;
|
||||
assert( stream->baseStreamRep.streamInfo.outputLatency > 0.0 );
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_asio.cpp 1525 2010-07-14 06:45:25Z rossb $
|
||||
* $Id: pa_asio.cpp 1631 2011-03-04 01:45:06Z rossb $
|
||||
* Portable Audio I/O Library for ASIO Drivers
|
||||
*
|
||||
* Author: Stephane Letz
|
||||
|
@ -78,46 +78,9 @@
|
|||
Note that specific support for paInputUnderflow, paOutputOverflow and
|
||||
paNeverDropInput is not necessary or possible with this driver due to the
|
||||
synchronous full duplex double-buffered architecture of ASIO.
|
||||
|
||||
@todo implement host api specific extension to set i/o buffer sizes in frames
|
||||
|
||||
@todo review ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable
|
||||
|
||||
@todo review Blocking i/o latency computations in OpenStream(), changing ring
|
||||
buffer to a non-power-of-two structure could reduce blocking i/o latency.
|
||||
|
||||
@todo implement IsFormatSupported
|
||||
|
||||
@todo work out how to implement stream stoppage from callback and
|
||||
implement IsStreamActive properly. Stream stoppage could be implemented
|
||||
using a high-priority thread blocked on an Event which is signalled
|
||||
by the callback. Or, we could just call ASIO stop from the callback
|
||||
and see what happens.
|
||||
|
||||
@todo rigorously check asio return codes and convert to pa error codes
|
||||
|
||||
@todo Different channels of a multichannel stream can have different sample
|
||||
formats, but we assume that all are the same as the first channel for now.
|
||||
Fixing this will require the block processor to maintain per-channel
|
||||
conversion functions - could get nasty.
|
||||
|
||||
@todo investigate whether the asio processNow flag needs to be honoured
|
||||
|
||||
@todo handle asioMessages() callbacks in a useful way, or at least document
|
||||
what cases we don't handle.
|
||||
|
||||
@todo miscellaneous other FIXMEs
|
||||
|
||||
@todo provide an asio-specific method for setting the systems specific
|
||||
value (aka main window handle) - check that this matches the value
|
||||
passed to PaAsio_ShowControlPanel, or remove it entirely from
|
||||
PaAsio_ShowControlPanel. - this would allow PaAsio_ShowControlPanel
|
||||
to be called for the currently open stream (at present all streams
|
||||
must be closed).
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
@ -1170,7 +1133,7 @@ PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex
|
|||
goto error;
|
||||
}
|
||||
|
||||
IsDebuggerPresent_ = (IsDebuggerPresentPtr)GetProcAddress( LoadLibrary( "Kernel32.dll" ), "IsDebuggerPresent" );
|
||||
IsDebuggerPresent_ = (IsDebuggerPresentPtr)GetProcAddress( LoadLibraryA( "Kernel32.dll" ), "IsDebuggerPresent" );
|
||||
|
||||
for( i=0; i < driverCount; ++i )
|
||||
{
|
||||
|
@ -1606,7 +1569,7 @@ typedef struct PaAsioStream
|
|||
|
||||
ASIOBufferInfo *asioBufferInfos;
|
||||
ASIOChannelInfo *asioChannelInfos;
|
||||
long inputLatency, outputLatency; // actual latencies returned by asio
|
||||
long asioInputLatencyFrames, asioOutputLatencyFrames; // actual latencies returned by asio
|
||||
|
||||
long inputChannelCount, outputChannelCount;
|
||||
bool postOutput;
|
||||
|
@ -2241,7 +2204,11 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
|
||||
if( inputChannelCount > 0 )
|
||||
{
|
||||
/* FIXME: assume all channels use the same type for now */
|
||||
/* FIXME: assume all channels use the same type for now
|
||||
|
||||
see: "ASIO devices with multiple sample formats are unsupported"
|
||||
http://www.portaudio.com/trac/ticket/106
|
||||
*/
|
||||
ASIOSampleType inputType = stream->asioChannelInfos[0].type;
|
||||
|
||||
PA_DEBUG(("ASIO Input type:%d",inputType));
|
||||
|
@ -2258,7 +2225,11 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
|
||||
if( outputChannelCount > 0 )
|
||||
{
|
||||
/* FIXME: assume all channels use the same type for now */
|
||||
/* FIXME: assume all channels use the same type for now
|
||||
|
||||
see: "ASIO devices with multiple sample formats are unsupported"
|
||||
http://www.portaudio.com/trac/ticket/106
|
||||
*/
|
||||
ASIOSampleType outputType = stream->asioChannelInfos[inputChannelCount].type;
|
||||
|
||||
PA_DEBUG(("ASIO Output type:%d",outputType));
|
||||
|
@ -2274,7 +2245,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
}
|
||||
|
||||
|
||||
ASIOGetLatencies( &stream->inputLatency, &stream->outputLatency );
|
||||
ASIOGetLatencies( &stream->asioInputLatencyFrames, &stream->asioOutputLatencyFrames );
|
||||
|
||||
|
||||
/* Using blocking i/o interface... */
|
||||
|
@ -2386,7 +2357,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
to samples frames.
|
||||
5) Get the next larger (or equal) power-of-two buffer size.
|
||||
*/
|
||||
lBlockingBufferSize = suggestedInputLatencyFrames - stream->inputLatency;
|
||||
lBlockingBufferSize = suggestedInputLatencyFrames - stream->asioInputLatencyFrames;
|
||||
lBlockingBufferSize = (lBlockingBufferSize > 0) ? lBlockingBufferSize : 1;
|
||||
lBlockingBufferSize = (lBlockingBufferSize + framesPerBuffer - 1) / framesPerBuffer;
|
||||
lBlockingBufferSize = (lBlockingBufferSize + 1) * framesPerBuffer;
|
||||
|
@ -2401,7 +2372,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
(double)( PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor )
|
||||
+ PaUtil_GetBufferProcessorInputLatency(&stream->blockingState->bufferProcessor)
|
||||
+ (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer
|
||||
+ stream->inputLatency )
|
||||
+ stream->asioInputLatencyFrames )
|
||||
/ sampleRate;
|
||||
|
||||
/* The code below prints the ASIO latency which doesn't include
|
||||
|
@ -2409,8 +2380,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
reports the added latency separately.
|
||||
*/
|
||||
PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms),\n added buffProc:%ld (%ld ms),\n added blocking:%ld (%ld ms)\n",
|
||||
stream->inputLatency,
|
||||
(long)( stream->inputLatency * (1000.0 / sampleRate) ),
|
||||
stream->asioInputLatencyFrames,
|
||||
(long)( stream->asioInputLatencyFrames * (1000.0 / sampleRate) ),
|
||||
PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor),
|
||||
(long)( PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) * (1000.0 / sampleRate) ),
|
||||
PaUtil_GetBufferProcessorInputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
|
||||
|
@ -2472,7 +2443,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
to samples frames.
|
||||
5) Get the next larger (or equal) power-of-two buffer size.
|
||||
*/
|
||||
lBlockingBufferSize = suggestedOutputLatencyFrames - stream->outputLatency;
|
||||
lBlockingBufferSize = suggestedOutputLatencyFrames - stream->asioOutputLatencyFrames;
|
||||
lBlockingBufferSize = (lBlockingBufferSize > 0) ? lBlockingBufferSize : 1;
|
||||
lBlockingBufferSize = (lBlockingBufferSize + framesPerBuffer - 1) / framesPerBuffer;
|
||||
lBlockingBufferSize = (lBlockingBufferSize + 1) * framesPerBuffer;
|
||||
|
@ -2492,7 +2463,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
(double)( PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor )
|
||||
+ PaUtil_GetBufferProcessorOutputLatency(&stream->blockingState->bufferProcessor)
|
||||
+ (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer
|
||||
+ stream->outputLatency )
|
||||
+ stream->asioOutputLatencyFrames )
|
||||
/ sampleRate;
|
||||
|
||||
/* The code below prints the ASIO latency which doesn't include
|
||||
|
@ -2500,8 +2471,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
reports the added latency separately.
|
||||
*/
|
||||
PA_DEBUG(("PaAsio : ASIO OutputLatency = %ld (%ld ms),\n added buffProc:%ld (%ld ms),\n added blocking:%ld (%ld ms)\n",
|
||||
stream->outputLatency,
|
||||
(long)( stream->inputLatency * (1000.0 / sampleRate) ),
|
||||
stream->asioOutputLatencyFrames,
|
||||
(long)( stream->asioOutputLatencyFrames * (1000.0 / sampleRate) ),
|
||||
PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor),
|
||||
(long)( PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) * (1000.0 / sampleRate) ),
|
||||
PaUtil_GetBufferProcessorOutputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
|
||||
|
@ -2547,24 +2518,24 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
|
||||
stream->streamRepresentation.streamInfo.inputLatency =
|
||||
(double)( PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)
|
||||
+ stream->inputLatency) / sampleRate; // seconds
|
||||
+ stream->asioInputLatencyFrames) / sampleRate; // seconds
|
||||
stream->streamRepresentation.streamInfo.outputLatency =
|
||||
(double)( PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)
|
||||
+ stream->outputLatency) / sampleRate; // seconds
|
||||
+ stream->asioOutputLatencyFrames) / sampleRate; // seconds
|
||||
stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
|
||||
|
||||
// the code below prints the ASIO latency which doesn't include the
|
||||
// buffer processor latency. it reports the added latency separately
|
||||
PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
|
||||
stream->inputLatency,
|
||||
(long)((stream->inputLatency*1000)/ sampleRate),
|
||||
stream->asioInputLatencyFrames,
|
||||
(long)((stream->asioInputLatencyFrames*1000)/ sampleRate),
|
||||
PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor),
|
||||
(long)((PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)*1000)/ sampleRate)
|
||||
));
|
||||
|
||||
PA_DEBUG(("PaAsio : ASIO OuputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
|
||||
stream->outputLatency,
|
||||
(long)((stream->outputLatency*1000)/ sampleRate),
|
||||
stream->asioOutputLatencyFrames,
|
||||
(long)((stream->asioOutputLatencyFrames*1000)/ sampleRate),
|
||||
PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor),
|
||||
(long)((PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)*1000)/ sampleRate)
|
||||
));
|
||||
|
@ -2791,10 +2762,6 @@ static ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool
|
|||
if( !theAsioStream )
|
||||
return 0L;
|
||||
|
||||
// Keep sample position
|
||||
// FIXME: asioDriverInfo.pahsc_NumFramesDone = timeInfo->timeInfo.samplePosition.lo;
|
||||
|
||||
|
||||
// protect against reentrancy
|
||||
if( PaAsio_AtomicIncrement(&theAsioStream->reenterCount) )
|
||||
{
|
||||
|
@ -2849,6 +2816,11 @@ static ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool
|
|||
{
|
||||
|
||||
#if 0
|
||||
/*
|
||||
see: "ASIO callback underflow/overflow buffer slip detection doesn't work"
|
||||
http://www.portaudio.com/trac/ticket/110
|
||||
*/
|
||||
|
||||
// test code to try to detect slip conditions... these may work on some systems
|
||||
// but neither of them work on the RME Digi96
|
||||
|
||||
|
@ -2899,10 +2871,10 @@ previousIndex = index;
|
|||
|
||||
/* patch from Paul Boege */
|
||||
paTimeInfo.inputBufferAdcTime = paTimeInfo.currentTime -
|
||||
((double)theAsioStream->inputLatency/theAsioStream->streamRepresentation.streamInfo.sampleRate);
|
||||
((double)theAsioStream->asioInputLatencyFrames/theAsioStream->streamRepresentation.streamInfo.sampleRate);
|
||||
|
||||
paTimeInfo.outputBufferDacTime = paTimeInfo.currentTime +
|
||||
((double)theAsioStream->outputLatency/theAsioStream->streamRepresentation.streamInfo.sampleRate);
|
||||
((double)theAsioStream->asioOutputLatencyFrames/theAsioStream->streamRepresentation.streamInfo.sampleRate);
|
||||
|
||||
/* old version is buggy because the buffer processor also adds in its latency to the time parameters
|
||||
paTimeInfo.inputBufferAdcTime = paTimeInfo.currentTime - theAsioStream->streamRepresentation.streamInfo.inputLatency;
|
||||
|
@ -3061,7 +3033,11 @@ static long asioMessages(long selector, long value, void* message, double* opt)
|
|||
// Reset the driver is done by completely destruct is. I.e. ASIOStop(), ASIODisposeBuffers(), Destruction
|
||||
// Afterwards you initialize the driver again.
|
||||
|
||||
/*FIXME: commented the next line out */
|
||||
/*FIXME: commented the next line out
|
||||
|
||||
see: "PA/ASIO ignores some driver notifications it probably shouldn't"
|
||||
http://www.portaudio.com/trac/ticket/108
|
||||
*/
|
||||
//asioDriverInfo.stopped; // In this sample the processing will just stop
|
||||
ret = 1L;
|
||||
break;
|
||||
|
|
|
@ -1347,6 +1347,12 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
inputChannelCount = inputParameters->channelCount;
|
||||
inputSampleFormat = inputParameters->sampleFormat;
|
||||
|
||||
/* @todo Blocking read/write on Mac is not yet supported. */
|
||||
if( inputSampleFormat & paNonInterleaved )
|
||||
{
|
||||
return paSampleFormatNotSupported;
|
||||
}
|
||||
|
||||
/* unless alternate device specification is supported, reject the use of
|
||||
paUseHostApiSpecificDeviceSpecification */
|
||||
|
||||
|
@ -1371,6 +1377,12 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
outputChannelCount = outputParameters->channelCount;
|
||||
outputSampleFormat = outputParameters->sampleFormat;
|
||||
|
||||
/* @todo Blocking read/write on Mac is not yet supported. */
|
||||
if( outputSampleFormat & paNonInterleaved )
|
||||
{
|
||||
return paSampleFormatNotSupported;
|
||||
}
|
||||
|
||||
/* unless alternate device specification is supported, reject the use of
|
||||
paUseHostApiSpecificDeviceSpecification */
|
||||
|
||||
|
|
|
@ -71,12 +71,12 @@
|
|||
#endif
|
||||
|
||||
/*
|
||||
* This fnuction determines the size of a particular sample format.
|
||||
* This function determines the size of a particular sample format.
|
||||
* if the format is not recognized, this returns zero.
|
||||
*/
|
||||
static size_t computeSampleSizeFromFormat( PaSampleFormat format )
|
||||
{
|
||||
switch( format ) {
|
||||
switch( format & (~paNonInterleaved) ) {
|
||||
case paFloat32: return 4;
|
||||
case paInt32: return 4;
|
||||
case paInt24: return 3;
|
||||
|
@ -91,7 +91,7 @@ static size_t computeSampleSizeFromFormat( PaSampleFormat format )
|
|||
*/
|
||||
static size_t computeSampleSizeFromFormatPow2( PaSampleFormat format )
|
||||
{
|
||||
switch( format ) {
|
||||
switch( format & (~paNonInterleaved) ) {
|
||||
case paFloat32: return 4;
|
||||
case paInt32: return 4;
|
||||
case paInt24: return 4;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_win_ds.c 1534 2010-08-03 21:02:52Z dmitrykos $
|
||||
* $Id: pa_win_ds.c 1606 2011-02-17 15:56:04Z rob_bielik $
|
||||
* Portable Audio I/O Library DirectSound implementation
|
||||
*
|
||||
* Authors: Phil Burk, Robert Marsanyi & Ross Bencina
|
||||
|
@ -39,37 +39,8 @@
|
|||
|
||||
/** @file
|
||||
@ingroup hostapi_src
|
||||
|
||||
@todo implement paInputOverflow callback status flag
|
||||
|
||||
@todo implement paNeverDropInput.
|
||||
|
||||
@todo implement host api specific extension to set i/o buffer sizes in frames
|
||||
|
||||
@todo implement initialisation of PaDeviceInfo default*Latency fields (currently set to 0.)
|
||||
|
||||
@todo implement ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable
|
||||
|
||||
@todo audit handling of DirectSound result codes - in many cases we could convert a HRESULT into
|
||||
a native portaudio error code. Standard DirectSound result codes are documented at msdn.
|
||||
|
||||
@todo implement IsFormatSupported
|
||||
|
||||
@todo call PaUtil_SetLastHostErrorInfo with a specific error string (currently just "DSound error").
|
||||
|
||||
@todo make sure all buffers have been played before stopping the stream
|
||||
when the stream callback returns paComplete
|
||||
|
||||
@todo retrieve default devices using the DRVM_MAPPER_PREFERRED_GET functions used in the wmme api
|
||||
these wave device ids can be aligned with the directsound devices either by retrieving
|
||||
the system interface device name using DRV_QUERYDEVICEINTERFACE or by using the wave device
|
||||
id retrieved in KsPropertySetEnumerateCallback.
|
||||
|
||||
old TODOs from phil, need to work out if these have been done:
|
||||
O- fix "patest_stop.c"
|
||||
*/
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h> /* strlen() */
|
||||
|
@ -104,6 +75,9 @@
|
|||
#include "pa_win_waveformat.h"
|
||||
#include "pa_win_wdmks_utils.h"
|
||||
|
||||
#ifndef PA_USE_WMME
|
||||
#error "Portaudio internal error: PA_USE_WMME=0/1 not defined. pa_hostapi.h should ensure that it is."
|
||||
#endif
|
||||
|
||||
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
|
||||
#pragma comment( lib, "dsound.lib" )
|
||||
|
@ -706,7 +680,7 @@ static PaError AddOutputDeviceInfoFromDirectSound(
|
|||
else
|
||||
{
|
||||
|
||||
#ifndef PA_NO_WMME
|
||||
#if PA_USE_WMME
|
||||
if( caps.dwFlags & DSCAPS_EMULDRIVER )
|
||||
{
|
||||
/* If WMME supported, then reject Emulated drivers because they are lousy. */
|
||||
|
@ -922,7 +896,7 @@ static PaError AddInputDeviceInfoFromDirectSoundCapture(
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifndef PA_NO_WMME
|
||||
#if PA_USE_WMME
|
||||
if( caps.dwFlags & DSCAPS_EMULDRIVER )
|
||||
{
|
||||
/* If WMME supported, then reject Emulated drivers because they are lousy. */
|
||||
|
@ -1873,9 +1847,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
bufferProcessorIsInitialized = 1;
|
||||
|
||||
stream->streamRepresentation.streamInfo.inputLatency =
|
||||
PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor); /* FIXME: not initialised anywhere else */
|
||||
(PaTime)PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) / sampleRate; /* FIXME: only includes buffer processor latency */
|
||||
stream->streamRepresentation.streamInfo.outputLatency =
|
||||
PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor); /* FIXME: not initialised anywhere else */
|
||||
(PaTime)PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) / sampleRate; /* FIXME: only includes buffer processor latency */
|
||||
stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
|
||||
|
||||
|
||||
|
@ -2860,5 +2834,3 @@ static signed long GetStreamWriteAvailable( PaStream* s )
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_unix_oss.c 1509 2010-06-06 17:36:33Z dmitrykos $
|
||||
* $Id: pa_unix_oss.c 1602 2011-02-12 09:26:30Z rossb $
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* Latest Version at: http://www.portaudio.com
|
||||
* OSS implementation by:
|
||||
|
@ -1121,7 +1121,7 @@ static PaError PaOssStream_Configure( PaOssStream *stream, double sampleRate, un
|
|||
assert( component->hostChannelCount > 0 );
|
||||
assert( component->hostFrames > 0 );
|
||||
|
||||
*inputLatency = component->hostFrames * (component->numBufs - 1) / sampleRate;
|
||||
*inputLatency = (component->hostFrames * (component->numBufs - 1)) / sampleRate;
|
||||
}
|
||||
if( stream->playback )
|
||||
{
|
||||
|
@ -1132,7 +1132,7 @@ static PaError PaOssStream_Configure( PaOssStream *stream, double sampleRate, un
|
|||
assert( component->hostChannelCount > 0 );
|
||||
assert( component->hostFrames > 0 );
|
||||
|
||||
*outputLatency = component->hostFrames * (component->numBufs - 1) / sampleRate;
|
||||
*outputLatency = (component->hostFrames * (component->numBufs - 1)) / sampleRate;
|
||||
}
|
||||
|
||||
if( duplex )
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
pa_hostapi_skeleton.c provides a starting point for implementing support for a new host API with PortAudio. The idea is that you copy it to a new directory inside /hostapi and start editing.
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_skeleton.c 1339 2008-02-15 07:50:33Z rossb $
|
||||
* $Id: pa_hostapi_skeleton.c 1603 2011-02-12 10:22:00Z rossb $
|
||||
* Portable Audio I/O Library skeleton implementation
|
||||
* demonstrates how to use the common functions to implement support
|
||||
* for a host API
|
||||
|
@ -518,9 +518,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
values.
|
||||
*/
|
||||
stream->streamRepresentation.streamInfo.inputLatency =
|
||||
PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor);
|
||||
(PaTime)PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) / sampleRate; /* inputLatency is specified in _seconds_ */
|
||||
stream->streamRepresentation.streamInfo.outputLatency =
|
||||
PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor);
|
||||
(PaTime)PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) / sampleRate; /* outputLatency is specified in _seconds_ */
|
||||
stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_win_wdmks.c 1411 2009-05-14 14:37:37Z rossb $
|
||||
* $Id: pa_win_wdmks.c 1606 2011-02-17 15:56:04Z rob_bielik $
|
||||
* PortAudio Windows WDM-KS interface
|
||||
*
|
||||
* Author: Andrew Baldwin
|
||||
|
@ -106,6 +106,10 @@
|
|||
#define DYNAMIC_GUID(data) DYNAMIC_GUID_THUNK(data)
|
||||
#endif
|
||||
|
||||
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
|
||||
#pragma comment( lib, "setupapi.lib" )
|
||||
#endif
|
||||
|
||||
/* use CreateThread for CYGWIN, _beginthreadex for all others */
|
||||
#ifndef __CYGWIN__
|
||||
#define CREATE_THREAD (HANDLE)_beginthreadex( 0, 0, ProcessingThreadProc, stream, 0, &stream->processingThreadId )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_win_wmme.c 1432 2009-12-09 01:31:44Z rossb $
|
||||
* $Id: pa_win_wmme.c 1584 2011-02-02 18:58:17Z rossb $
|
||||
* pa_win_wmme.c
|
||||
* Implementation of PortAudio for Windows MultiMedia Extensions (WMME)
|
||||
*
|
||||
|
@ -65,35 +65,6 @@
|
|||
@ingroup hostapi_src
|
||||
|
||||
@brief Win32 host API implementation for the Windows MultiMedia Extensions (WMME) audio API.
|
||||
|
||||
@todo Fix buffer catch up code, can sometimes get stuck (perhaps fixed now,
|
||||
needs to be reviewed and tested.)
|
||||
|
||||
@todo implement paInputUnderflow, paOutputOverflow streamCallback statusFlags, paNeverDropInput.
|
||||
|
||||
@todo BUG: PA_MME_SET_LAST_WAVEIN/OUT_ERROR is used in functions which may
|
||||
be called asynchronously from the callback thread. this is bad.
|
||||
|
||||
@todo implement inputBufferAdcTime in callback thread
|
||||
|
||||
@todo review/fix error recovery and cleanup in marked functions
|
||||
|
||||
@todo implement timeInfo for stream priming
|
||||
|
||||
@todo handle the case where the callback returns paAbort or paComplete during stream priming.
|
||||
|
||||
@todo review input overflow and output underflow handling in ReadStream and WriteStream
|
||||
|
||||
Non-critical stuff for the future:
|
||||
|
||||
@todo Investigate supporting host buffer formats > 16 bits
|
||||
|
||||
@todo define UNICODE and _UNICODE in the project settings and see what breaks
|
||||
|
||||
@todo refactor conversion of MMSYSTEM errors into PA arrors into a single function.
|
||||
|
||||
@todo cleanup WAVEFORMATEXTENSIBLE retry in InitializeWaveHandles to not use a for loop
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -102,7 +73,7 @@ Non-critical stuff for the future:
|
|||
For both callback and blocking read/write streams we open the MME devices
|
||||
in CALLBACK_EVENT mode. In this mode, MME signals an Event object whenever
|
||||
it has finished with a buffer (either filled it for input, or played it
|
||||
for output). Where necessary we block waiting for Event objects using
|
||||
for output). Where necessary, we block waiting for Event objects using
|
||||
WaitMultipleObjects().
|
||||
|
||||
When implementing a PA callback stream, we set up a high priority thread
|
||||
|
@ -1832,21 +1803,21 @@ static PaError InitializeWaveHandles( PaWinMmeHostApiRepresentation *winMmeHostA
|
|||
|
||||
for( j = 0; j < 2; ++j )
|
||||
{
|
||||
if( j == 0 )
|
||||
{
|
||||
switch(j){
|
||||
case 0:
|
||||
/* first, attempt to open the device using WAVEFORMATEXTENSIBLE,
|
||||
if this fails we fall back to WAVEFORMATEX */
|
||||
|
||||
PaWin_InitializeWaveFormatExtensible( &waveFormat, devices[i].channelCount,
|
||||
sampleFormat, waveFormatTag, sampleRate, channelMask );
|
||||
break;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
case 1:
|
||||
/* retry with WAVEFORMATEX */
|
||||
|
||||
PaWin_InitializeWaveFormatEx( &waveFormat, devices[i].channelCount,
|
||||
sampleFormat, waveFormatTag, sampleRate );
|
||||
break;
|
||||
}
|
||||
|
||||
/* REVIEW: consider not firing an event for input when a full duplex
|
||||
|
@ -2839,7 +2810,7 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
|||
if( waitResult == WAIT_FAILED )
|
||||
{
|
||||
result = paUnanticipatedHostError;
|
||||
/** @todo FIXME/REVIEW: can't return host error info from an asyncronous thread */
|
||||
/** @todo FIXME/REVIEW: can't return host error info from an asyncronous thread. see http://www.portaudio.com/trac/ticket/143 */
|
||||
done = 1;
|
||||
}
|
||||
else if( waitResult == WAIT_TIMEOUT )
|
||||
|
@ -2892,7 +2863,7 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
|||
we discard all but the most recent. This is an
|
||||
input buffer overflow. FIXME: these buffers should
|
||||
be passed to the callback in a paNeverDropInput
|
||||
stream.
|
||||
stream. http://www.portaudio.com/trac/ticket/142
|
||||
|
||||
note that it is also possible for an input overflow
|
||||
to happen while the callback is processing a buffer.
|
||||
|
@ -3051,7 +3022,9 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
|||
{
|
||||
stream->abortProcessing = 1;
|
||||
done = 1;
|
||||
/** @todo FIXME: should probably reset the output device immediately once the callback returns paAbort */
|
||||
/** @todo FIXME: should probably reset the output device immediately once the callback returns paAbort
|
||||
see: http://www.portaudio.com/trac/ticket/141
|
||||
*/
|
||||
result = paNoError;
|
||||
}
|
||||
else
|
||||
|
@ -3719,7 +3692,9 @@ static PaError ReadStream( PaStream* s,
|
|||
{
|
||||
/** @todo REVIEW: consider what to do if the input overflows.
|
||||
do we requeue all of the buffers? should we be running
|
||||
a thread to make sure they are always queued? */
|
||||
a thread to make sure they are always queued?
|
||||
see: http://www.portaudio.com/trac/ticket/117
|
||||
*/
|
||||
|
||||
result = paInputOverflowed;
|
||||
}
|
||||
|
@ -3824,7 +3799,9 @@ static PaError WriteStream( PaStream* s,
|
|||
/** @todo REVIEW: consider what to do if the output
|
||||
underflows. do we requeue all the existing buffers with
|
||||
zeros? should we run a separate thread to keep the buffers
|
||||
enqueued at all times? */
|
||||
enqueued at all times?
|
||||
see: http://www.portaudio.com/trac/ticket/117
|
||||
*/
|
||||
|
||||
result = paOutputUnderflowed;
|
||||
}
|
||||
|
@ -4000,8 +3977,3 @@ HWAVEOUT PaWinMME_GetStreamOutputHandle( PaStream* s, int handleIndex )
|
|||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_win_hostapis.c 1453 2010-02-16 09:46:08Z dmitrykos $
|
||||
* $Id: pa_win_hostapis.c 1635 2011-03-04 04:18:44Z rossb $
|
||||
* Portable Audio I/O Library Windows initialization table
|
||||
*
|
||||
* Based on the Open Source API proposed by Ross Bencina
|
||||
|
@ -40,12 +40,8 @@
|
|||
@ingroup win_src
|
||||
|
||||
@brief Win32 host API initialization function table.
|
||||
|
||||
@todo Consider using PA_USE_WMME etc instead of PA_NO_WMME. This is what
|
||||
the Unix version does, we should consider being consistent.
|
||||
*/
|
||||
|
||||
|
||||
#include "pa_hostapi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -68,29 +64,29 @@ PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiInd
|
|||
PaUtilHostApiInitializer *paHostApiInitializers[] =
|
||||
{
|
||||
|
||||
#ifndef PA_NO_WMME
|
||||
#if PA_USE_WMME
|
||||
PaWinMme_Initialize,
|
||||
#endif
|
||||
|
||||
#ifndef PA_NO_DS
|
||||
#if PA_USE_DS
|
||||
PaWinDs_Initialize,
|
||||
#endif
|
||||
|
||||
#ifndef PA_NO_ASIO
|
||||
#if PA_USE_ASIO
|
||||
PaAsio_Initialize,
|
||||
#endif
|
||||
|
||||
#ifndef PA_NO_WASAPI
|
||||
#if PA_USE_WASAPI
|
||||
PaWasapi_Initialize,
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifndef PA_NO_WDMKS
|
||||
#if PA_USE_WDMKS
|
||||
PaWinWdm_Initialize,
|
||||
#endif
|
||||
*/
|
||||
|
||||
//PaSkeleton_Initialize, /* just for testing */
|
||||
#if PA_USE_SKELETON
|
||||
PaSkeleton_Initialize, /* just for testing. last in list so it isn't marked as default. */
|
||||
#endif
|
||||
|
||||
0 /* NULL terminated array */
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_win_util.c 1437 2009-12-10 08:10:08Z rossb $
|
||||
* $Id: pa_win_util.c 1584 2011-02-02 18:58:17Z rossb $
|
||||
* Portable Audio I/O Library
|
||||
* Win32 platform-specific support functions
|
||||
*
|
||||
|
@ -41,9 +41,6 @@
|
|||
@ingroup win_src
|
||||
|
||||
@brief Win32 implementation of platform-specific PaUtil support functions.
|
||||
|
||||
@todo Implement workaround for QueryPerformanceCounter() skipping forward
|
||||
bug. (see msdn kb Q274323).
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
|
@ -129,13 +126,18 @@ double PaUtil_GetTime( void )
|
|||
|
||||
if( usePerformanceCounter_ )
|
||||
{
|
||||
/* FIXME:
|
||||
according to this knowledge-base article, QueryPerformanceCounter
|
||||
can skip forward by seconds!
|
||||
/*
|
||||
Note: QueryPerformanceCounter has a known issue where it can skip forward
|
||||
by a few seconds (!) due to a hardware bug on some PCI-ISA bridge hardware.
|
||||
This is documented here:
|
||||
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q274323&
|
||||
|
||||
it may be better to use the rtdsc instruction using inline asm,
|
||||
however then a method is needed to calculate a ticks/seconds ratio.
|
||||
The work-arounds are not very paletable and involve querying GetTickCount
|
||||
at every time step.
|
||||
|
||||
Using rdtsc is not a good option on multi-core systems.
|
||||
|
||||
For now we just use QueryPerformanceCounter(). It's good, most of the time.
|
||||
*/
|
||||
QueryPerformanceCounter( &time );
|
||||
return time.QuadPart * secondsPerTick_;
|
||||
|
|
|
@ -47,7 +47,7 @@ extern "C"
|
|||
|
||||
|
||||
/**
|
||||
@brief Install optimised converter functions suitable for all IA32 processors
|
||||
@brief Install optimized converter functions suitable for all IA32 processors
|
||||
|
||||
It is recommended to call PaUtil_InitializeX86PlainConverters prior to calling Pa_Initialize
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue