mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 09:06:33 +01:00
update wavesaudio backend, now supports Windows (ASIO) as well as OS X (CoreAudio)
This commit is contained in:
parent
152935e736
commit
f374ce69a6
82 changed files with 11259 additions and 7632 deletions
129
libs/backends/wavesaudio/portmidi/src/pm_mac/Makefile.osx
Normal file
129
libs/backends/wavesaudio/portmidi/src/pm_mac/Makefile.osx
Normal file
|
|
@ -0,0 +1,129 @@
|
||||||
|
# MAKEFILE FOR PORTMIDI
|
||||||
|
|
||||||
|
# Roger B. Dannenberg
|
||||||
|
# Sep 2009
|
||||||
|
|
||||||
|
# NOTE: you can use
|
||||||
|
# make -f pm_osx/Makefile.osx configuration=Release
|
||||||
|
# to override the default Debug configuration
|
||||||
|
configuration=Release
|
||||||
|
|
||||||
|
PF=/usr/local
|
||||||
|
|
||||||
|
# For debugging, define PM_CHECK_ERRORS
|
||||||
|
ifeq ($(configuration),Release)
|
||||||
|
CONFIG = Release
|
||||||
|
else
|
||||||
|
CONFIG = Debug
|
||||||
|
endif
|
||||||
|
|
||||||
|
current: all
|
||||||
|
|
||||||
|
all: $(CONFIG)/CMakeCache.txt
|
||||||
|
cd $(CONFIG); make
|
||||||
|
|
||||||
|
$(CONFIG)/CMakeCache.txt:
|
||||||
|
rm -f CMakeCache.txt
|
||||||
|
mkdir -p $(CONFIG)
|
||||||
|
cd $(CONFIG); cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=$(CONFIG)
|
||||||
|
|
||||||
|
|
||||||
|
**** For instructions: make -f pm_mac\Makefile.osx help ****\n'
|
||||||
|
|
||||||
|
help:
|
||||||
|
echo $$'\n\n\
|
||||||
|
This is help for portmidi/pm_mac/Makefile.osx\n\n\
|
||||||
|
Installation path for dylib is $(PF)\n\
|
||||||
|
To build Release version libraries and test applications,\n \
|
||||||
|
make -f pm_mac/Makefile.osx\n\
|
||||||
|
To build Debug version libraries and test applications,\n \
|
||||||
|
make -f pm_mac/Makefile.osx configuration=Debug\n\
|
||||||
|
To install universal dynamic library,\n \
|
||||||
|
sudo make -f pm_mac/Makefile.osx install\n\
|
||||||
|
To install universal dynamic library with xcode,\n \
|
||||||
|
make -f pm_mac/Makefile.osx install-with-xcode\n\
|
||||||
|
To make PmDefaults Java application,\n \
|
||||||
|
make -f pm_mac/Makefile.osx pmdefaults\n\n \
|
||||||
|
configuration = $(configuration)\n'
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o *~ core* */*.o */*/*.o */*~ */core* pm_test/*/pm_dll.dll
|
||||||
|
rm -f *.opt *.ncb *.plg pm_win/Debug/pm_dll.lib pm_win/Release/pm_dll.lib
|
||||||
|
rm -f pm_test/*.opt pm_test/*.ncb
|
||||||
|
rm -f pm_java/pmjni/*.o pm_java/pmjni/*~ pm_java/*.h
|
||||||
|
rm -rf Release/CMakeFiles Debug/CMakeFiles
|
||||||
|
rm -rf pm_mac/pmdefaults/lib pm_mac/pmdefaults/src
|
||||||
|
|
||||||
|
cleaner: clean
|
||||||
|
rm -rf pm_mac/build
|
||||||
|
rm -rf pm_mac/Debug pm_mac/Release pm_test/Debug pm_test/Release
|
||||||
|
rm -f Debug/*.dylib Release/*.dylib
|
||||||
|
rm -f pm_java/pmjni/Debug/*.jnilib
|
||||||
|
rm -f pm_java/pmjni/Release/*.jnilib
|
||||||
|
|
||||||
|
cleanest: cleaner
|
||||||
|
rm -f Debug/libportmidi_s.a Release/libportmidi_s.a
|
||||||
|
rm -f pm_test/Debug/test pm_test/Debug/sysex pm_test/Debug/midithread
|
||||||
|
rm -f pm_test/Debug/latency pm_test/Debug/midithru
|
||||||
|
rm -f pm_test/Debug/qtest pm_test/Debug/mm
|
||||||
|
rm -f pm_test/Release/test pm_test/Release/sysex pm_test/Release/midithread
|
||||||
|
rm -f pm_test/Release/latency pm_test/Release/midithru
|
||||||
|
rm -f pm_test/Release/qtest pm_test/Release/mm
|
||||||
|
rm -f pm_java/*/*.class
|
||||||
|
rm -f pm_java/pmjni/jportmidi_JPortMidiApi_PortMidiStream.h
|
||||||
|
|
||||||
|
backup: cleanest
|
||||||
|
cd ..; zip -r portmidi.zip portmidi
|
||||||
|
|
||||||
|
install: porttime/porttime.h pm_common/portmidi.h \
|
||||||
|
$(CONFIG)/libportmidi.dylib
|
||||||
|
install porttime/porttime.h $(PF)/include/
|
||||||
|
install pm_common/portmidi.h $(PF)/include
|
||||||
|
install $(CONFIG)/libportmidi.dylib $(PF)/lib/
|
||||||
|
|
||||||
|
# note - this uses xcode to build and install portmidi universal binaries
|
||||||
|
install-with-xcode:
|
||||||
|
sudo xcodebuild -project pm_mac/pm_mac.xcodeproj \
|
||||||
|
-configuration Release install DSTROOT=/
|
||||||
|
|
||||||
|
##### build pmdefault ######
|
||||||
|
|
||||||
|
pm_java/pmjni/jportmidi_JPortMidiApi.h: pm_java/jportmidi/JPortMidiApi.class
|
||||||
|
cd pm_java; javah jportmidi.JPortMidiApi
|
||||||
|
mv pm_java/jportmidi_JportMidiApi.h pm_java/pmjni
|
||||||
|
|
||||||
|
JAVASRC = pmdefaults/PmDefaultsFrame.java \
|
||||||
|
pmdefaults/PmDefaults.java \
|
||||||
|
jportmidi/JPortMidiApi.java jportmidi/JPortMidi.java \
|
||||||
|
jportmidi/JPortMidiException.java
|
||||||
|
|
||||||
|
# this compiles ALL of the java code
|
||||||
|
pm_java/jportmidi/JPortMidiApi.class: $(JAVASRC:%=pm_java/%)
|
||||||
|
cd pm_java; javac $(JAVASRC)
|
||||||
|
|
||||||
|
$(CONFIG)/libpmjni.dylib:
|
||||||
|
mkdir -p $(CONFIG)
|
||||||
|
cd $(CONFIG); make -f ../pm_mac/$(MAKEFILE)
|
||||||
|
|
||||||
|
pmdefaults: $(CONFIG)/libpmjni.dylib pm_java/jportmidi/JPortMidiApi.class
|
||||||
|
ifeq ($(CONFIG),Debug)
|
||||||
|
echo "Error: you cannot build pmdefaults in a Debug configuration \n\
|
||||||
|
You should use configuration=Release in the Makefile command line. "
|
||||||
|
@exit 2
|
||||||
|
endif
|
||||||
|
xcodebuild -project pm_mac/pm_mac.xcodeproj \
|
||||||
|
-configuration Release -target PmDefaults
|
||||||
|
echo "pmdefaults java application is made"
|
||||||
|
|
||||||
|
###### test plist reader #######
|
||||||
|
PLHDR = pm_mac/readbinaryplist.h
|
||||||
|
PLSRC = pm_mac/plisttest.c pm_mac/readbinaryplist.c
|
||||||
|
pm_mac/plisttest: $(PLHDR) $(PLSRC)
|
||||||
|
cc $(VFLAGS) -Ipm_mac \
|
||||||
|
-I/Developer/Headers/FlatCarbon \
|
||||||
|
-I/System/Library/Frameworks/CoreFoundation.framework/Headers \
|
||||||
|
-I/System/Library/Frameworks/CoreServices.framework/Headers \
|
||||||
|
$(PLSRC) -o pm_mac/$(CONFIG)/plisttest \
|
||||||
|
-framework CoreFoundation -framework CoreServices
|
||||||
|
|
||||||
163
libs/backends/wavesaudio/portmidi/src/pm_mac/README_MAC.txt
Normal file
163
libs/backends/wavesaudio/portmidi/src/pm_mac/README_MAC.txt
Normal file
|
|
@ -0,0 +1,163 @@
|
||||||
|
README_MAC.txt for PortMidi
|
||||||
|
Roger Dannenberg
|
||||||
|
20 nov 2009
|
||||||
|
revised 20 Sep 2010 for Xcode 3.2.4 and CMake 8.2-2
|
||||||
|
|
||||||
|
To build PortMidi for Mac OS X, you must install Xcode and
|
||||||
|
CMake.
|
||||||
|
|
||||||
|
CMake can build either command-line Makefiles or Xcode projects.
|
||||||
|
These approaches are described in separate sections below.
|
||||||
|
|
||||||
|
==== CLEANING UP ====
|
||||||
|
(Skip this for now, but later you might want start from a clean
|
||||||
|
slate.)
|
||||||
|
|
||||||
|
Start in the portmedia/portmidi directory.
|
||||||
|
|
||||||
|
make -f pm_mac/Makefile.osx clean
|
||||||
|
|
||||||
|
will remove .o, CMakeFiles, and other intermediate files.
|
||||||
|
|
||||||
|
Using "cleaner" instead of "clean" will also remove jni-related
|
||||||
|
intermediate files.
|
||||||
|
|
||||||
|
Using "cleanest" instead of "clean" or "cleaner" will also remove
|
||||||
|
application binaries and the portmidi libraries. (It will not
|
||||||
|
uninstall anything, however.)
|
||||||
|
|
||||||
|
==== USING CMAKE (AND COMMAND LINE TOOLS) ====
|
||||||
|
|
||||||
|
Start in the portmedia/portmidi directory.
|
||||||
|
|
||||||
|
make -f pm_mac/Makefile.osx
|
||||||
|
|
||||||
|
(Begin note: make will invoke cmake to build a Makefile and then make to
|
||||||
|
build portmidi. This extra level allows you to correctly build
|
||||||
|
both Release and Debug versions. Release is the default, so to get
|
||||||
|
the Debug version, use:
|
||||||
|
|
||||||
|
make -f pm_mac/Makefile.osx configuration=Debug
|
||||||
|
)
|
||||||
|
|
||||||
|
Release version executables and libraries are now in
|
||||||
|
portmedia/portmidi/Release
|
||||||
|
|
||||||
|
Debug version executables and libraries are created in
|
||||||
|
portmedia/portmidi/Debug
|
||||||
|
The Debug versions are compiled with PM_CHECK_ERRORS which
|
||||||
|
prints an error message and aborts when an error code is returned
|
||||||
|
by PortMidi functions. This is useful for small command line
|
||||||
|
applications. Otherwise, you should check and handle error returns
|
||||||
|
in your program.
|
||||||
|
|
||||||
|
You can install portmidi as follows:
|
||||||
|
|
||||||
|
cd Release; sudo make install
|
||||||
|
|
||||||
|
This will install /usr/local/include/{portmidi.h, porttime.h}
|
||||||
|
and /usr/local/lib/{libportmidi.dylib, libportmidi_s.a, libpmjni.dylib}
|
||||||
|
|
||||||
|
You should now make the pmdefaults.app:
|
||||||
|
|
||||||
|
make -f pm_mac/Makefile.osx pmdefaults
|
||||||
|
|
||||||
|
NOTE: pmdefaults.app will be in pm_mac/Release/.
|
||||||
|
|
||||||
|
Please copy pmdefaults.app to your Applications folder or wherever
|
||||||
|
you would normally expect to find it.
|
||||||
|
|
||||||
|
==== USING CMAKE TO BUILD Xcode PROJECT ====
|
||||||
|
|
||||||
|
Before you can use Xcode, you need a portmidi.xcodeproj file.
|
||||||
|
CMake builds a location-dependent Xcode project, so unfortunately
|
||||||
|
it is not easy to provide an Xcode project that is ready to use.
|
||||||
|
Therefore, you should make your own. Once you have it, you can
|
||||||
|
use it almost like any other Xcode project, and you will not have
|
||||||
|
to go back to CMake.
|
||||||
|
|
||||||
|
(1) Install CMake if you do not have it already.
|
||||||
|
|
||||||
|
(2) Open portmedia/portmidi/CMakeLists.txt with CMake
|
||||||
|
|
||||||
|
(3) Use Configure and Generate buttons
|
||||||
|
|
||||||
|
(4) This creates portmedia/portmidi/portmidi.xcodeproj.
|
||||||
|
|
||||||
|
Note: You will also use pm_mac/pm_mac.xcodeproj, which
|
||||||
|
is not generated by CMake.
|
||||||
|
|
||||||
|
(5) Open portmidi/portmidi.xcodeproj with Xcode and
|
||||||
|
build what you need. The simplest thing is to build the
|
||||||
|
ALL_BUILD target. The default will be to build the Debug
|
||||||
|
version, but you may want to change this to Release.
|
||||||
|
|
||||||
|
NOTE: ALL_BUILD may report errors. Try simply building again
|
||||||
|
or rebuilding specific targets that fail until they build
|
||||||
|
without errors. There appears to be a race condition or
|
||||||
|
missing dependencies in the build system.
|
||||||
|
|
||||||
|
The Debug version is compiled with PM_CHECK_ERRORS, and the
|
||||||
|
Release version is not. PM_CHECK_ERRORS will print an error
|
||||||
|
message and exit your program if any error is returned from
|
||||||
|
a call into PortMidi.
|
||||||
|
|
||||||
|
CMake (currently) also creates MinSizRel and RelWithDebInfo
|
||||||
|
versions, but only because I cannot figure out how to disable
|
||||||
|
them.
|
||||||
|
|
||||||
|
You will probably want the application PmDefaults, which sets
|
||||||
|
default MIDI In and Out devices for PortMidi. You may also
|
||||||
|
want to build a Java application using PortMidi. Since I have
|
||||||
|
not figured out how to use CMake to make an OS X Java application,
|
||||||
|
use pm_mac/pm_mac.xcodeproj as follows:
|
||||||
|
|
||||||
|
(6) open pm_mac/pm_mac.xcodeproj
|
||||||
|
|
||||||
|
(7) pm_java/pmjni/portmidi_JportmidiApi.h is needed
|
||||||
|
by libpmjni.jnilib, the Java native interface library. Since
|
||||||
|
portmidi_JportmidiApi.h is included with PortMidi, you can skip
|
||||||
|
to step 8, but if you really want to rebuild everything from
|
||||||
|
scratch, build the JPortMidiHeaders project first, and continue
|
||||||
|
with step 8:
|
||||||
|
|
||||||
|
(8) If you did not build libpmjni.dylib using portmidi.xcodeproj,
|
||||||
|
do it now. (It depends on portmidi_JportmidiApi.h, and the
|
||||||
|
PmDefaults project depends on libpmjni.dylib.)
|
||||||
|
|
||||||
|
(9) Returning to pm_mac.xcodeproj, build the PmDefaults program.
|
||||||
|
|
||||||
|
(10) If you wish, copy pm_mac/build/Deployment/PmDefaults.app to
|
||||||
|
your applications folder.
|
||||||
|
|
||||||
|
(11) If you want to install libportmidi.dylib, first make it with
|
||||||
|
Xcode, then
|
||||||
|
sudo make -f pm_mac/Makefile.osx install
|
||||||
|
This command will install /usr/local/include/{porttime.h, portmidi.h}
|
||||||
|
and /usr/local/lib/libportmidi.dylib
|
||||||
|
Note that the "install" function of xcode creates portmidi/Release
|
||||||
|
and does not install the library to /usr/local/lib, so please use
|
||||||
|
the command line installer.
|
||||||
|
|
||||||
|
|
||||||
|
CHANGELOG
|
||||||
|
|
||||||
|
20-Sep-2010 Roger B. Dannenberg
|
||||||
|
Adapted to Xcode 3.2.4
|
||||||
|
20-Nov-2009 Roger B. Dannenberg
|
||||||
|
Added some install instructions
|
||||||
|
26-Sep-2009 Roger B. Dannenberg
|
||||||
|
More changes for using CMake, Makefiles, XCode
|
||||||
|
20-Sep-2009 Roger B. Dannenberg
|
||||||
|
Modifications for using CMake
|
||||||
|
14-Sep-2009 Roger B. Dannenberg
|
||||||
|
Modifications for using CMake
|
||||||
|
17-Jan-2007 Roger B. Dannenberg
|
||||||
|
Explicit instructions for Xcode
|
||||||
|
15-Jan-2007 Roger B. Dannenberg
|
||||||
|
Changed instructions because of changes to Makefile.osx
|
||||||
|
07-Oct-2006 Roger B. Dannenberg
|
||||||
|
Added directions for xcodebuild
|
||||||
|
29-aug-2006 Roger B. Dannenberg
|
||||||
|
Updated this documentation.
|
||||||
|
|
||||||
|
|
@ -0,0 +1,594 @@
|
||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 44;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXAggregateTarget section */
|
||||||
|
3D634CAB1247805C0020F829 /* JPortMidiHeaders */ = {
|
||||||
|
isa = PBXAggregateTarget;
|
||||||
|
buildConfigurationList = 3D634CAE1247807A0020F829 /* Build configuration list for PBXAggregateTarget "JPortMidiHeaders" */;
|
||||||
|
buildPhases = (
|
||||||
|
3D634CAA1247805C0020F829 /* ShellScript */,
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
3D634CB0124781580020F829 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = JPortMidiHeaders;
|
||||||
|
productName = JPortMidiHeaders;
|
||||||
|
};
|
||||||
|
3DE2142D124662AA0033C839 /* CopyJavaSources */ = {
|
||||||
|
isa = PBXAggregateTarget;
|
||||||
|
buildConfigurationList = 3DE21434124662FF0033C839 /* Build configuration list for PBXAggregateTarget "CopyJavaSources" */;
|
||||||
|
buildPhases = (
|
||||||
|
3DE2142C124662AA0033C839 /* CopyFiles */,
|
||||||
|
);
|
||||||
|
comments = "The reason for copying files here is that the Compile Java target looks in a particular place for sources. It would be much better to simply have Compile Java look in the original location for all sources, but I don't know how to do that. -RBD\n";
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = CopyJavaSources;
|
||||||
|
productName = CopyJavaSources;
|
||||||
|
};
|
||||||
|
89D0F1C90F3B704E007831A7 /* PmDefaults */ = {
|
||||||
|
isa = PBXAggregateTarget;
|
||||||
|
buildConfigurationList = 89D0F1D20F3B7080007831A7 /* Build configuration list for PBXAggregateTarget "PmDefaults" */;
|
||||||
|
buildPhases = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
89D0F1D10F3B7062007831A7 /* PBXTargetDependency */,
|
||||||
|
89D0F1CD0F3B7062007831A7 /* PBXTargetDependency */,
|
||||||
|
3DE21431124662C50033C839 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = PmDefaults;
|
||||||
|
productName = pmdefaults;
|
||||||
|
};
|
||||||
|
/* End PBXAggregateTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
3DE2137F124653FB0033C839 /* portmusic_logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE2137E124653FB0033C839 /* portmusic_logo.png */; };
|
||||||
|
3DE21435124663860033C839 /* PmDefaultsFrame.java in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3DE2137D124653CB0033C839 /* PmDefaultsFrame.java */; };
|
||||||
|
3DE214361246638A0033C839 /* PmDefaults.java in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3DE2137B1246538B0033C839 /* PmDefaults.java */; };
|
||||||
|
3DE214371246638F0033C839 /* JPortMidiException.java in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3DE21382124654DE0033C839 /* JPortMidiException.java */; };
|
||||||
|
3DE214381246638F0033C839 /* JPortMidiApi.java in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3DE21381124654CF0033C839 /* JPortMidiApi.java */; };
|
||||||
|
3DE214391246638F0033C839 /* JPortMidi.java in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3DE21380124654BC0033C839 /* JPortMidi.java */; };
|
||||||
|
3DE216131246AC0E0033C839 /* libpmjni.dylib in Copy Java Resources */ = {isa = PBXBuildFile; fileRef = 3DE216101246ABE30033C839 /* libpmjni.dylib */; };
|
||||||
|
3DE216951246D57A0033C839 /* pmdefaults.icns in Resources */ = {isa = PBXBuildFile; fileRef = 3DE216901246C6410033C839 /* pmdefaults.icns */; };
|
||||||
|
89C3F2920F5250A300B0048E /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 89C3F2900F5250A300B0048E /* Credits.rtf */; };
|
||||||
|
89D0F0240F392F20007831A7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 89D0F0210F392F20007831A7 /* InfoPlist.strings */; };
|
||||||
|
89D0F0410F39306C007831A7 /* JavaApplicationStub in Copy Executable */ = {isa = PBXBuildFile; fileRef = 89D0F03E0F39304A007831A7 /* JavaApplicationStub */; };
|
||||||
|
89D0F16A0F3A124E007831A7 /* pmdefaults.jar in Copy Java Resources */ = {isa = PBXBuildFile; fileRef = 89D0F15D0F3A0FF7007831A7 /* pmdefaults.jar */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
3D634CAF124781580020F829 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 89D0F1C90F3B704E007831A7;
|
||||||
|
remoteInfo = PmDefaults;
|
||||||
|
};
|
||||||
|
3DE21430124662C50033C839 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 3DE2142D124662AA0033C839;
|
||||||
|
remoteInfo = CopyJavaSources;
|
||||||
|
};
|
||||||
|
3DE2145D124666900033C839 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 3DE2142D124662AA0033C839;
|
||||||
|
remoteInfo = CopyJavaSources;
|
||||||
|
};
|
||||||
|
89D0F1CC0F3B7062007831A7 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 8D1107260486CEB800E47090;
|
||||||
|
remoteInfo = "Assemble Application";
|
||||||
|
};
|
||||||
|
89D0F1D00F3B7062007831A7 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 89D0F0480F393A6F007831A7;
|
||||||
|
remoteInfo = "Compile Java";
|
||||||
|
};
|
||||||
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
3DE2142C124662AA0033C839 /* CopyFiles */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "${PROJECT_DIR}/pmdefaults/src/java";
|
||||||
|
dstSubfolderSpec = 0;
|
||||||
|
files = (
|
||||||
|
3DE21435124663860033C839 /* PmDefaultsFrame.java in CopyFiles */,
|
||||||
|
3DE214361246638A0033C839 /* PmDefaults.java in CopyFiles */,
|
||||||
|
3DE214371246638F0033C839 /* JPortMidiException.java in CopyFiles */,
|
||||||
|
3DE214381246638F0033C839 /* JPortMidiApi.java in CopyFiles */,
|
||||||
|
3DE214391246638F0033C839 /* JPortMidi.java in CopyFiles */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
89D0F0440F393070007831A7 /* Copy Executable */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "";
|
||||||
|
dstSubfolderSpec = 6;
|
||||||
|
files = (
|
||||||
|
89D0F0410F39306C007831A7 /* JavaApplicationStub in Copy Executable */,
|
||||||
|
);
|
||||||
|
name = "Copy Executable";
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
89D0F11F0F394189007831A7 /* Copy Java Resources */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "";
|
||||||
|
dstSubfolderSpec = 15;
|
||||||
|
files = (
|
||||||
|
89D0F16A0F3A124E007831A7 /* pmdefaults.jar in Copy Java Resources */,
|
||||||
|
3DE216131246AC0E0033C839 /* libpmjni.dylib in Copy Java Resources */,
|
||||||
|
);
|
||||||
|
name = "Copy Java Resources";
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
3DE2137B1246538B0033C839 /* PmDefaults.java */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.java; name = PmDefaults.java; path = ../pm_java/pmdefaults/PmDefaults.java; sourceTree = SOURCE_ROOT; };
|
||||||
|
3DE2137D124653CB0033C839 /* PmDefaultsFrame.java */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.java; name = PmDefaultsFrame.java; path = ../pm_java/pmdefaults/PmDefaultsFrame.java; sourceTree = SOURCE_ROOT; };
|
||||||
|
3DE2137E124653FB0033C839 /* portmusic_logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = portmusic_logo.png; path = ../pm_java/pmdefaults/portmusic_logo.png; sourceTree = SOURCE_ROOT; };
|
||||||
|
3DE21380124654BC0033C839 /* JPortMidi.java */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.java; name = JPortMidi.java; path = ../pm_java/jportmidi/JPortMidi.java; sourceTree = SOURCE_ROOT; };
|
||||||
|
3DE21381124654CF0033C839 /* JPortMidiApi.java */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.java; name = JPortMidiApi.java; path = ../pm_java/jportmidi/JPortMidiApi.java; sourceTree = SOURCE_ROOT; };
|
||||||
|
3DE21382124654DE0033C839 /* JPortMidiException.java */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.java; name = JPortMidiException.java; path = ../pm_java/jportmidi/JPortMidiException.java; sourceTree = SOURCE_ROOT; };
|
||||||
|
3DE213841246555A0033C839 /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = /System/Library/Frameworks/CoreMIDI.framework; sourceTree = "<absolute>"; };
|
||||||
|
3DE21390124655760033C839 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
|
||||||
|
3DE213BE1246557F0033C839 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
|
||||||
|
3DE216101246ABE30033C839 /* libpmjni.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpmjni.dylib; path = ../Release/libpmjni.dylib; sourceTree = SOURCE_ROOT; };
|
||||||
|
3DE216901246C6410033C839 /* pmdefaults.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = pmdefaults.icns; path = ../pm_java/pmdefaults/pmdefaults.icns; sourceTree = SOURCE_ROOT; };
|
||||||
|
89C3F2910F5250A300B0048E /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; };
|
||||||
|
89D0F0220F392F20007831A7 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
89D0F0230F392F20007831A7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
89D0F03E0F39304A007831A7 /* JavaApplicationStub */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = JavaApplicationStub; path = /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub; sourceTree = "<absolute>"; };
|
||||||
|
89D0F0840F394066007831A7 /* JavaNativeFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaNativeFoundation.framework; path = /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework; sourceTree = "<absolute>"; };
|
||||||
|
89D0F1390F3948A9007831A7 /* pmdefaults/make */ = {isa = PBXFileReference; lastKnownFileType = folder; path = pmdefaults/make; sourceTree = "<group>"; };
|
||||||
|
89D0F15D0F3A0FF7007831A7 /* pmdefaults.jar */ = {isa = PBXFileReference; lastKnownFileType = archive.jar; name = pmdefaults.jar; path = build/Release/pmdefaults.jar; sourceTree = SOURCE_ROOT; };
|
||||||
|
89D0F1860F3A2442007831A7 /* JavaVM.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaVM.framework; path = /System/Library/Frameworks/JavaVM.framework; sourceTree = "<absolute>"; };
|
||||||
|
8D1107320486CEB800E47090 /* PmDefaults.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PmDefaults.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
3DE213841246555A0033C839 /* CoreMIDI.framework */,
|
||||||
|
3DE21390124655760033C839 /* CoreFoundation.framework */,
|
||||||
|
3DE213BE1246557F0033C839 /* CoreAudio.framework */,
|
||||||
|
89D0F1860F3A2442007831A7 /* JavaVM.framework */,
|
||||||
|
89D0F0840F394066007831A7 /* JavaNativeFoundation.framework */,
|
||||||
|
);
|
||||||
|
name = "Linked Frameworks";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
);
|
||||||
|
name = "Other Frameworks";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
89D0F15D0F3A0FF7007831A7 /* pmdefaults.jar */,
|
||||||
|
8D1107320486CEB800E47090 /* PmDefaults.app */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
29B97314FDCFA39411CA2CEA /* pmdefaults */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
3DE216101246ABE30033C839 /* libpmjni.dylib */,
|
||||||
|
89D0F0260F392F48007831A7 /* Source */,
|
||||||
|
89D0F0200F392F20007831A7 /* Resources */,
|
||||||
|
89D0F1390F3948A9007831A7 /* pmdefaults/make */,
|
||||||
|
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||||
|
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||||
|
);
|
||||||
|
name = pmdefaults;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
||||||
|
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
3DE2136A124652E20033C839 /* pm_java */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
3DE21379124653150033C839 /* pmdefaults */,
|
||||||
|
3DE2137A1246531D0033C839 /* jportmidi */,
|
||||||
|
);
|
||||||
|
name = pm_java;
|
||||||
|
path = ..;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
3DE21379124653150033C839 /* pmdefaults */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
3DE2137D124653CB0033C839 /* PmDefaultsFrame.java */,
|
||||||
|
3DE2137B1246538B0033C839 /* PmDefaults.java */,
|
||||||
|
);
|
||||||
|
name = pmdefaults;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
3DE2137A1246531D0033C839 /* jportmidi */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
3DE21382124654DE0033C839 /* JPortMidiException.java */,
|
||||||
|
3DE21381124654CF0033C839 /* JPortMidiApi.java */,
|
||||||
|
3DE21380124654BC0033C839 /* JPortMidi.java */,
|
||||||
|
);
|
||||||
|
name = jportmidi;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
89D0F0200F392F20007831A7 /* Resources */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
3DE216901246C6410033C839 /* pmdefaults.icns */,
|
||||||
|
3DE2137E124653FB0033C839 /* portmusic_logo.png */,
|
||||||
|
89C3F2900F5250A300B0048E /* Credits.rtf */,
|
||||||
|
89D0F0230F392F20007831A7 /* Info.plist */,
|
||||||
|
89D0F0210F392F20007831A7 /* InfoPlist.strings */,
|
||||||
|
89D0F03E0F39304A007831A7 /* JavaApplicationStub */,
|
||||||
|
);
|
||||||
|
name = Resources;
|
||||||
|
path = pmdefaults/resources;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
89D0F0260F392F48007831A7 /* Source */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
3DE2136A124652E20033C839 /* pm_java */,
|
||||||
|
);
|
||||||
|
name = Source;
|
||||||
|
path = pmdefaults/src;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXLegacyTarget section */
|
||||||
|
89D0F0480F393A6F007831A7 /* Compile Java */ = {
|
||||||
|
isa = PBXLegacyTarget;
|
||||||
|
buildArgumentsString = "-e -f \"${SRCROOT}/make/build.xml\" -debug \"$ACTION\"";
|
||||||
|
buildConfigurationList = 89D0F04B0F393AB7007831A7 /* Build configuration list for PBXLegacyTarget "Compile Java" */;
|
||||||
|
buildPhases = (
|
||||||
|
);
|
||||||
|
buildToolPath = /usr/bin/ant;
|
||||||
|
buildWorkingDirectory = "";
|
||||||
|
dependencies = (
|
||||||
|
3DE2145E124666900033C839 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = "Compile Java";
|
||||||
|
passBuildSettingsInEnvironment = 1;
|
||||||
|
productName = "Compile Java";
|
||||||
|
};
|
||||||
|
/* End PBXLegacyTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
8D1107260486CEB800E47090 /* Assemble Application */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Assemble Application" */;
|
||||||
|
buildPhases = (
|
||||||
|
89D0F0440F393070007831A7 /* Copy Executable */,
|
||||||
|
89D0F11F0F394189007831A7 /* Copy Java Resources */,
|
||||||
|
8D1107290486CEB800E47090 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = "Assemble Application";
|
||||||
|
productInstallPath = "$(HOME)/Applications";
|
||||||
|
productName = pmdefaults;
|
||||||
|
productReference = 8D1107320486CEB800E47090 /* PmDefaults.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "pm_mac" */;
|
||||||
|
compatibilityVersion = "Xcode 3.0";
|
||||||
|
developmentRegion = English;
|
||||||
|
hasScannedForEncodings = 1;
|
||||||
|
knownRegions = (
|
||||||
|
English,
|
||||||
|
Japanese,
|
||||||
|
French,
|
||||||
|
German,
|
||||||
|
);
|
||||||
|
mainGroup = 29B97314FDCFA39411CA2CEA /* pmdefaults */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
3D634CAB1247805C0020F829 /* JPortMidiHeaders */,
|
||||||
|
89D0F1C90F3B704E007831A7 /* PmDefaults */,
|
||||||
|
3DE2142D124662AA0033C839 /* CopyJavaSources */,
|
||||||
|
89D0F0480F393A6F007831A7 /* Compile Java */,
|
||||||
|
8D1107260486CEB800E47090 /* Assemble Application */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
8D1107290486CEB800E47090 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
3DE216951246D57A0033C839 /* pmdefaults.icns in Resources */,
|
||||||
|
89D0F0240F392F20007831A7 /* InfoPlist.strings in Resources */,
|
||||||
|
89C3F2920F5250A300B0048E /* Credits.rtf in Resources */,
|
||||||
|
3DE2137F124653FB0033C839 /* portmusic_logo.png in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
3D634CAA1247805C0020F829 /* ShellScript */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "echo BUILT_PRODUCTS_DIR is ${BUILT_PRODUCTS_DIR}\njavah -classpath \"${BUILT_PRODUCTS_DIR}/pmdefaults.jar\" -force -o \"${BUILT_PRODUCTS_DIR}/jportmidi_JportMidiApi.h\" \"jportmidi.JPortMidiApi\"\nmv \"${BUILT_PRODUCTS_DIR}/jportmidi_JportMidiApi.h\" ../pm_java/pmjni/\necho \"Created ../pm_java/pmjni/jportmidi_JportMidiApi.h\"\n";
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXTargetDependency section */
|
||||||
|
3D634CB0124781580020F829 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 89D0F1C90F3B704E007831A7 /* PmDefaults */;
|
||||||
|
targetProxy = 3D634CAF124781580020F829 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
3DE21431124662C50033C839 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 3DE2142D124662AA0033C839 /* CopyJavaSources */;
|
||||||
|
targetProxy = 3DE21430124662C50033C839 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
3DE2145E124666900033C839 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 3DE2142D124662AA0033C839 /* CopyJavaSources */;
|
||||||
|
targetProxy = 3DE2145D124666900033C839 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
89D0F1CD0F3B7062007831A7 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 8D1107260486CEB800E47090 /* Assemble Application */;
|
||||||
|
targetProxy = 89D0F1CC0F3B7062007831A7 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
89D0F1D10F3B7062007831A7 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 89D0F0480F393A6F007831A7 /* Compile Java */;
|
||||||
|
targetProxy = 89D0F1D00F3B7062007831A7 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
89C3F2900F5250A300B0048E /* Credits.rtf */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
89C3F2910F5250A300B0048E /* English */,
|
||||||
|
);
|
||||||
|
name = Credits.rtf;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
89D0F0210F392F20007831A7 /* InfoPlist.strings */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
89D0F0220F392F20007831A7 /* English */,
|
||||||
|
);
|
||||||
|
name = InfoPlist.strings;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
3D634CAC1247805C0020F829 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
PRODUCT_NAME = JPortMidiHeaders;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
3D634CAD1247805C0020F829 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COPY_PHASE_STRIP = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||||
|
PRODUCT_NAME = JPortMidiHeaders;
|
||||||
|
ZERO_LINK = NO;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
3DE2142E124662AB0033C839 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
PRODUCT_NAME = CopyJavaSources;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
3DE2142F124662AB0033C839 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COPY_PHASE_STRIP = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||||
|
PRODUCT_NAME = CopyJavaSources;
|
||||||
|
ZERO_LINK = NO;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
89D0F0490F393A6F007831A7 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
PRODUCT_NAME = pmdefaults;
|
||||||
|
SRCROOT = ./pmdefaults;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
89D0F04A0F393A6F007831A7 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
PRODUCT_NAME = pmdefaults;
|
||||||
|
SRCROOT = ./pmdefaults;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
89D0F1CA0F3B704F007831A7 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
PRODUCT_NAME = pmdefaults;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
89D0F1CB0F3B704F007831A7 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
PRODUCT_NAME = pmdefaults;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
C01FCF4B08A954540054247B /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CONFIGURATION_BUILD_DIR = "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
INFOPLIST_FILE = pmdefaults/resources/Info.plist;
|
||||||
|
INSTALL_PATH = "$(HOME)/Applications";
|
||||||
|
PRODUCT_NAME = pmdefaults;
|
||||||
|
WRAPPER_EXTENSION = app;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
C01FCF4C08A954540054247B /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CONFIGURATION_BUILD_DIR = "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
INFOPLIST_FILE = pmdefaults/resources/Info.plist;
|
||||||
|
INSTALL_PATH = "$(HOME)/Applications";
|
||||||
|
PRODUCT_NAME = PmDefaults;
|
||||||
|
WRAPPER_EXTENSION = app;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
C01FCF4F08A954540054247B /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
|
||||||
|
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
PREBINDING = NO;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
C01FCF5008A954540054247B /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
|
||||||
|
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
PREBINDING = NO;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
3D634CAE1247807A0020F829 /* Build configuration list for PBXAggregateTarget "JPortMidiHeaders" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
3D634CAC1247805C0020F829 /* Debug */,
|
||||||
|
3D634CAD1247805C0020F829 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
3DE21434124662FF0033C839 /* Build configuration list for PBXAggregateTarget "CopyJavaSources" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
3DE2142E124662AB0033C839 /* Debug */,
|
||||||
|
3DE2142F124662AB0033C839 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
89D0F04B0F393AB7007831A7 /* Build configuration list for PBXLegacyTarget "Compile Java" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
89D0F0490F393A6F007831A7 /* Debug */,
|
||||||
|
89D0F04A0F393A6F007831A7 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
89D0F1D20F3B7080007831A7 /* Build configuration list for PBXAggregateTarget "PmDefaults" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
89D0F1CA0F3B704F007831A7 /* Debug */,
|
||||||
|
89D0F1CB0F3B704F007831A7 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Assemble Application" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
C01FCF4B08A954540054247B /* Debug */,
|
||||||
|
C01FCF4C08A954540054247B /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "pm_mac" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
C01FCF4F08A954540054247B /* Debug */,
|
||||||
|
C01FCF5008A954540054247B /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "self:pm_mac.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,86 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0460"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "8D1107260486CEB800E47090"
|
||||||
|
BuildableName = "PmDefaults.app"
|
||||||
|
BlueprintName = "Assemble Application"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "8D1107260486CEB800E47090"
|
||||||
|
BuildableName = "PmDefaults.app"
|
||||||
|
BlueprintName = "Assemble Application"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "8D1107260486CEB800E47090"
|
||||||
|
BuildableName = "PmDefaults.app"
|
||||||
|
BlueprintName = "Assemble Application"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "8D1107260486CEB800E47090"
|
||||||
|
BuildableName = "PmDefaults.app"
|
||||||
|
BlueprintName = "Assemble Application"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0460"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "89D0F0480F393A6F007831A7"
|
||||||
|
BuildableName = "Compile Java"
|
||||||
|
BlueprintName = "Compile Java"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0460"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "3DE2142D124662AA0033C839"
|
||||||
|
BuildableName = "CopyJavaSources"
|
||||||
|
BlueprintName = "CopyJavaSources"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0460"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "3D634CAB1247805C0020F829"
|
||||||
|
BuildableName = "JPortMidiHeaders"
|
||||||
|
BlueprintName = "JPortMidiHeaders"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0460"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "89D0F1C90F3B704E007831A7"
|
||||||
|
BuildableName = "PmDefaults"
|
||||||
|
BlueprintName = "PmDefaults"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>SchemeUserState</key>
|
||||||
|
<dict>
|
||||||
|
<key>Assemble Application.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>4</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Compile Java.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
</dict>
|
||||||
|
<key>CopyJavaSources.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
</dict>
|
||||||
|
<key>JPortMidiHeaders.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>PmDefaults.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>SuppressBuildableAutocreation</key>
|
||||||
|
<dict>
|
||||||
|
<key>3D634CAB1247805C0020F829</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>3DE2142D124662AA0033C839</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>89D0F0480F393A6F007831A7</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>89D0F1C90F3B704E007831A7</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>8D1107260486CEB800E47090</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0460"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "8D1107260486CEB800E47090"
|
||||||
|
BuildableName = "PmDefaults.app"
|
||||||
|
BlueprintName = "Assemble Application"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "8D1107260486CEB800E47090"
|
||||||
|
BuildableName = "PmDefaults.app"
|
||||||
|
BlueprintName = "Assemble Application"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "8D1107260486CEB800E47090"
|
||||||
|
BuildableName = "PmDefaults.app"
|
||||||
|
BlueprintName = "Assemble Application"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "8D1107260486CEB800E47090"
|
||||||
|
BuildableName = "PmDefaults.app"
|
||||||
|
BlueprintName = "Assemble Application"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0460"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "89D0F0480F393A6F007831A7"
|
||||||
|
BuildableName = "Compile Java"
|
||||||
|
BlueprintName = "Compile Java"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0460"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "3DE2142D124662AA0033C839"
|
||||||
|
BuildableName = "CopyJavaSources"
|
||||||
|
BlueprintName = "CopyJavaSources"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0460"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "3D634CAB1247805C0020F829"
|
||||||
|
BuildableName = "JPortMidiHeaders"
|
||||||
|
BlueprintName = "JPortMidiHeaders"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0460"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "89D0F1C90F3B704E007831A7"
|
||||||
|
BuildableName = "PmDefaults"
|
||||||
|
BlueprintName = "PmDefaults"
|
||||||
|
ReferencedContainer = "container:pm_mac.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>SchemeUserState</key>
|
||||||
|
<dict>
|
||||||
|
<key>Assemble Application.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>5</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Compile Java.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>4</integer>
|
||||||
|
</dict>
|
||||||
|
<key>CopyJavaSources.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
</dict>
|
||||||
|
<key>JPortMidiHeaders.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</dict>
|
||||||
|
<key>PmDefaults.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>SuppressBuildableAutocreation</key>
|
||||||
|
<dict>
|
||||||
|
<key>3D634CAB1247805C0020F829</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>3DE2142D124662AA0033C839</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>89D0F0480F393A6F007831A7</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>89D0F1C90F3B704E007831A7</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>8D1107260486CEB800E47090</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project name="pmdefaults" default="jar" basedir="..">
|
||||||
|
|
||||||
|
<!-- Global Properties -->
|
||||||
|
<property environment="env"/>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- building in Xcode -->
|
||||||
|
<condition property="product" value="${env.PRODUCT_NAME}">
|
||||||
|
<isset property="env.PRODUCT_NAME"/>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<condition property="src" value="${env.SRCROOT}/src">
|
||||||
|
<isset property="env.SRCROOT"/>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<condition property="obj" value="${env.OBJECT_FILE_DIR}">
|
||||||
|
<isset property="env.OBJECT_FILE_DIR"/>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<condition property="dst" value="${env.BUILT_PRODUCTS_DIR}">
|
||||||
|
<isset property="env.BUILT_PRODUCTS_DIR"/>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- building from the command line -->
|
||||||
|
<condition property="src" value="src">
|
||||||
|
<not>
|
||||||
|
<isset property="src"/>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<condition property="obj" value="build/obj">
|
||||||
|
<not>
|
||||||
|
<isset property="obj"/>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<condition property="dst" value="build">
|
||||||
|
<not>
|
||||||
|
<isset property="dst"/>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<condition property="product" value="pmdefaults">
|
||||||
|
<not>
|
||||||
|
<isset property="product"/>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Targets -->
|
||||||
|
<target name="init" description="Create build directories">
|
||||||
|
<mkdir dir="${obj}/${product}"/>
|
||||||
|
<mkdir dir="${dst}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="compile" depends="init" description="Compile">
|
||||||
|
<javac destdir="${obj}/${product}" deprecation="on" source="1.5" target="1.5" fork="true" debug="true" debuglevel="lines,source">
|
||||||
|
<src path="${src}/java"/>
|
||||||
|
<classpath path="${src}/../lib/eawt-stubs.jar"/>
|
||||||
|
</javac>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="copy" depends="init" description="Copy resources">
|
||||||
|
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jar" depends="compile, copy" description="Assemble Jar file">
|
||||||
|
<jar jarfile="${dst}/${product}.jar" basedir="${obj}/${product}" manifest="resources/Manifest" index="true"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="install" depends="jar" description="Alias for 'jar'">
|
||||||
|
<!-- sent by Xcode -->
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="clean" description="Removes build directories">
|
||||||
|
<!-- sent by Xcode -->
|
||||||
|
<delete dir="${obj}/${product}"/>
|
||||||
|
<delete file="${dst}/${product}.jar"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="installhdrs" description="">
|
||||||
|
<!-- sent by Xcode -->
|
||||||
|
<echo>"Nothing to do for install-headers phase"</echo>
|
||||||
|
</target>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Prints all class references made by all classes in a Jar file
|
||||||
|
# Depends on the output formatting of javap
|
||||||
|
|
||||||
|
# create a temporary working directory
|
||||||
|
dir=`mktemp -d $TMPDIR/classrefs.XXXXXX`
|
||||||
|
|
||||||
|
asm_dump="$dir/asm_dump"
|
||||||
|
all_classes="$dir/all_classes"
|
||||||
|
|
||||||
|
# for each class in a Jar file, dump the full assembly
|
||||||
|
javap -c -classpath "$1" `/usr/bin/jar tf "$1" | grep "\.class" | sort | xargs | sed -e 's/\.class//g'` > $asm_dump
|
||||||
|
|
||||||
|
# dump the initial list of all classes in the Jar file
|
||||||
|
/usr/bin/jar tf $1 | grep "\.class" | sed -e 's/\.class//g' >> $all_classes
|
||||||
|
|
||||||
|
# dump all static class references
|
||||||
|
cat $asm_dump | grep //class | awk -F"//class " '{print $2}' | sort | uniq >> $all_classes
|
||||||
|
|
||||||
|
# dump all references to classes made in methods
|
||||||
|
cat $asm_dump | grep //Method | awk -F"//Method " '{print $2}' | sort | uniq | grep "\." | awk -F"." '{print $1}' | sort | uniq >> $all_classes
|
||||||
|
|
||||||
|
# dump all references to classes by direct field access
|
||||||
|
cat $asm_dump | grep //Field | awk -F"//Field " '{print $2}' | sort | uniq | grep "\:L" | awk -F"\:L" '{print $2}' | sort | uniq | awk -F"\;" '{print $1}' >> $all_classes
|
||||||
|
|
||||||
|
# sort and reformat
|
||||||
|
sort $all_classes | uniq | grep -v "\"" | sed -e 's/\//\./g'
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
rm -rf $dir
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
|
||||||
|
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
|
||||||
|
|
||||||
|
\f0\b\fs24 \cf0 Author:
|
||||||
|
\b0 \
|
||||||
|
Roger B. Dannenberg\
|
||||||
|
\
|
||||||
|
|
||||||
|
\b With special thanks to:
|
||||||
|
\b0 \
|
||||||
|
National Science Foundation\
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
/* Localized versions of Info.plist keys */
|
||||||
|
|
||||||
|
NSHumanReadableCopyright = "© Carnegie Mellon University, 2010";
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>JavaApplicationStub</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>pmdefaults.icns</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>PmDefaults</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>Java</key>
|
||||||
|
<dict>
|
||||||
|
<key>ClassPath</key>
|
||||||
|
<string>$JAVAROOT/pmdefaults.jar</string>
|
||||||
|
<key>JVMVersion</key>
|
||||||
|
<string>1.5+</string>
|
||||||
|
<key>MainClass</key>
|
||||||
|
<string>pmdefaults.PmDefaults</string>
|
||||||
|
<key>Properties</key>
|
||||||
|
<dict>
|
||||||
|
<key>apple.laf.useScreenMenuBar</key>
|
||||||
|
<string>true</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Main-Class: pmdefaults/PmDefaults
|
||||||
70
libs/backends/wavesaudio/portmidi/src/porttime/ptwinmm.c
Normal file
70
libs/backends/wavesaudio/portmidi/src/porttime/ptwinmm.c
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
/* ptwinmm.c -- portable timer implementation for win32 */
|
||||||
|
|
||||||
|
|
||||||
|
#include "porttime.h"
|
||||||
|
#include "windows.h"
|
||||||
|
#include "time.h"
|
||||||
|
|
||||||
|
|
||||||
|
TIMECAPS caps;
|
||||||
|
|
||||||
|
static long time_offset = 0;
|
||||||
|
static int time_started_flag = FALSE;
|
||||||
|
static long time_resolution;
|
||||||
|
static MMRESULT timer_id;
|
||||||
|
static PtCallback *time_callback;
|
||||||
|
|
||||||
|
void CALLBACK winmm_time_callback(UINT uID, UINT uMsg, DWORD_PTR dwUser,
|
||||||
|
DWORD_PTR dw1, DWORD_PTR dw2)
|
||||||
|
{
|
||||||
|
(*time_callback)(Pt_Time(), (void *) dwUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PMEXPORT PtError Pt_Start(int resolution, PtCallback *callback, void *userData)
|
||||||
|
{
|
||||||
|
if (time_started_flag) return ptAlreadyStarted;
|
||||||
|
timeBeginPeriod(resolution);
|
||||||
|
time_resolution = resolution;
|
||||||
|
time_offset = timeGetTime();
|
||||||
|
time_started_flag = TRUE;
|
||||||
|
time_callback = callback;
|
||||||
|
if (callback) {
|
||||||
|
timer_id = timeSetEvent(resolution, 1, winmm_time_callback,
|
||||||
|
(DWORD_PTR) userData, TIME_PERIODIC | TIME_CALLBACK_FUNCTION);
|
||||||
|
if (!timer_id) return ptHostError;
|
||||||
|
}
|
||||||
|
return ptNoError;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PMEXPORT PtError Pt_Stop()
|
||||||
|
{
|
||||||
|
if (!time_started_flag) return ptAlreadyStopped;
|
||||||
|
if (time_callback && timer_id) {
|
||||||
|
timeKillEvent(timer_id);
|
||||||
|
time_callback = NULL;
|
||||||
|
timer_id = 0;
|
||||||
|
}
|
||||||
|
time_started_flag = FALSE;
|
||||||
|
timeEndPeriod(time_resolution);
|
||||||
|
return ptNoError;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PMEXPORT int Pt_Started()
|
||||||
|
{
|
||||||
|
return time_started_flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PMEXPORT PtTimestamp Pt_Time()
|
||||||
|
{
|
||||||
|
return timeGetTime() - time_offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PMEXPORT void Pt_Sleep(int32_t duration)
|
||||||
|
{
|
||||||
|
Sleep(duration);
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Valeriy Kamyshniy
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
|
@ -30,7 +30,8 @@ void WavesAudioBackend::AudioDeviceManagerNotification (NotificationReason reaso
|
||||||
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceDebugInfo -- " << (char*)parameter << std::endl;
|
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceDebugInfo -- " << (char*)parameter << std::endl;
|
||||||
break;
|
break;
|
||||||
case WCMRAudioDeviceManagerClient::BufferSizeChanged:
|
case WCMRAudioDeviceManagerClient::BufferSizeChanged:
|
||||||
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::BufferSizeChanged" << std::endl;
|
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::BufferSizeChanged: " << *(uint32_t*)parameter << std::endl;
|
||||||
|
_buffer_size_change(*(uint32_t*)parameter);
|
||||||
break;
|
break;
|
||||||
case WCMRAudioDeviceManagerClient::RequestReset:
|
case WCMRAudioDeviceManagerClient::RequestReset:
|
||||||
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::RequestReset" << std::endl;
|
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::RequestReset" << std::endl;
|
||||||
|
|
@ -39,7 +40,8 @@ void WavesAudioBackend::AudioDeviceManagerNotification (NotificationReason reaso
|
||||||
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::RequestResync" << std::endl;
|
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::RequestResync" << std::endl;
|
||||||
break;
|
break;
|
||||||
case WCMRAudioDeviceManagerClient::SamplingRateChanged:
|
case WCMRAudioDeviceManagerClient::SamplingRateChanged:
|
||||||
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::SamplingRateChanged: " << (int64_t)parameter << std::endl;
|
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::SamplingRateChanged: " << *(float*)parameter << std::endl;
|
||||||
|
set_sample_rate(*(float*)parameter);
|
||||||
break;
|
break;
|
||||||
case WCMRAudioDeviceManagerClient::DeviceDroppedSamples:
|
case WCMRAudioDeviceManagerClient::DeviceDroppedSamples:
|
||||||
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceDroppedSamples" << std::endl;
|
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceDroppedSamples" << std::endl;
|
||||||
|
|
@ -47,11 +49,20 @@ void WavesAudioBackend::AudioDeviceManagerNotification (NotificationReason reaso
|
||||||
case WCMRAudioDeviceManagerClient::DeviceStoppedStreaming:
|
case WCMRAudioDeviceManagerClient::DeviceStoppedStreaming:
|
||||||
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceStoppedStreaming" << std::endl;
|
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceStoppedStreaming" << std::endl;
|
||||||
break;
|
break;
|
||||||
|
case WCMRAudioDeviceManagerClient::DeviceStartsStreaming:
|
||||||
|
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceStartsStreaming" << std::endl;
|
||||||
|
_call_thread_init_callback = true; // streaming will be started from device side, just set thread init flag
|
||||||
|
break;
|
||||||
case WCMRAudioDeviceManagerClient::DeviceConnectionLost:
|
case WCMRAudioDeviceManagerClient::DeviceConnectionLost:
|
||||||
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceConnectionLost" << std::endl;
|
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceConnectionLost" << std::endl;
|
||||||
break;
|
break;
|
||||||
case WCMRAudioDeviceManagerClient::DeviceListChanged:
|
case WCMRAudioDeviceManagerClient::DeviceListChanged:
|
||||||
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceListChanged" << std::endl;
|
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceListChanged" << std::endl;
|
||||||
|
_device_list_change();
|
||||||
|
break;
|
||||||
|
case WCMRAudioDeviceManagerClient::IODeviceDisconnected:
|
||||||
|
std::cout << "------------------------------- WCMRAudioDeviceManagerClient::DeviceListChanged" << std::endl;
|
||||||
|
_device_list_change();
|
||||||
break;
|
break;
|
||||||
case WCMRAudioDeviceManagerClient::AudioCallback:
|
case WCMRAudioDeviceManagerClient::AudioCallback:
|
||||||
if (parameter) {
|
if (parameter) {
|
||||||
|
|
@ -77,6 +88,7 @@ WavesAudioBackend::WavesAudioBackend (AudioEngine& e)
|
||||||
, _audio_device_manager (this)
|
, _audio_device_manager (this)
|
||||||
, _midi_device_manager (*this)
|
, _midi_device_manager (*this)
|
||||||
, _device (NULL)
|
, _device (NULL)
|
||||||
|
, _sample_format (FormatFloat)
|
||||||
, _interleaved (true)
|
, _interleaved (true)
|
||||||
, _input_channels (0)
|
, _input_channels (0)
|
||||||
, _max_input_channels (0)
|
, _max_input_channels (0)
|
||||||
|
|
@ -87,7 +99,7 @@ WavesAudioBackend::WavesAudioBackend (AudioEngine& e)
|
||||||
, _systemic_input_latency (0)
|
, _systemic_input_latency (0)
|
||||||
, _systemic_output_latency (0)
|
, _systemic_output_latency (0)
|
||||||
, _call_thread_init_callback (false)
|
, _call_thread_init_callback (false)
|
||||||
, _use_midi (false)
|
, _use_midi (true)
|
||||||
, _sample_time_at_cycle_start (0)
|
, _sample_time_at_cycle_start (0)
|
||||||
, _freewheeling (false)
|
, _freewheeling (false)
|
||||||
, _freewheel_thread_active (false)
|
, _freewheel_thread_active (false)
|
||||||
|
|
@ -100,6 +112,7 @@ WavesAudioBackend::WavesAudioBackend (AudioEngine& e)
|
||||||
|
|
||||||
WavesAudioBackend::~WavesAudioBackend ()
|
WavesAudioBackend::~WavesAudioBackend ()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
|
|
@ -150,14 +163,14 @@ WavesAudioBackend::set_driver (const std::string& /*drivername*/)
|
||||||
std::vector<AudioBackend::DeviceStatus>
|
std::vector<AudioBackend::DeviceStatus>
|
||||||
WavesAudioBackend::enumerate_devices () const
|
WavesAudioBackend::enumerate_devices () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::enumerate_devices (): " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::enumerate_devices (): " << std::endl;
|
||||||
|
|
||||||
std::vector<DeviceStatus> devicesStatus;
|
std::vector<DeviceStatus> devicesStatus;
|
||||||
const WCMRAudioDeviceList& devices = _audio_device_manager.Devices ();
|
const DeviceInfoVec& deviceInfoList = _audio_device_manager.DeviceInfoList();
|
||||||
|
|
||||||
for (WCMRAudioDeviceListConstIter deviceIter = devices.begin (); deviceIter != devices.end (); ++deviceIter) {
|
for (DeviceInfoVecConstIter deviceInfoIter = deviceInfoList.begin (); deviceInfoIter != deviceInfoList.end (); ++deviceInfoIter) {
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t Device found: " << (*deviceIter)->DeviceName () << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t Device found: " << (*deviceInfoIter)->m_DeviceName << std::endl;
|
||||||
devicesStatus.push_back (DeviceStatus ((*deviceIter)->DeviceName (), true));
|
devicesStatus.push_back (DeviceStatus ((*deviceInfoIter)->m_DeviceName, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
return devicesStatus;
|
return devicesStatus;
|
||||||
|
|
@ -167,23 +180,21 @@ WavesAudioBackend::enumerate_devices () const
|
||||||
std::vector<float>
|
std::vector<float>
|
||||||
WavesAudioBackend::available_sample_rates (const std::string& device_name) const
|
WavesAudioBackend::available_sample_rates (const std::string& device_name) const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::available_sample_rates (): [" << device_name << "]" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::available_sample_rates (): [" << device_name << "]" << std::endl;
|
||||||
|
|
||||||
std::vector<int> sr;
|
DeviceInfo devInfo;
|
||||||
|
WTErr err = _audio_device_manager.GetDeviceInfoByName(device_name, devInfo);
|
||||||
|
|
||||||
WCMRAudioDevice * device = _audio_device_manager.GetDeviceByName (device_name);
|
if (eNoErr != err) {
|
||||||
|
|
||||||
if (!device) {
|
|
||||||
std::cerr << "WavesAudioBackend::available_sample_rates (): Failed to find device [" << device_name << "]" << std::endl;
|
std::cerr << "WavesAudioBackend::available_sample_rates (): Failed to find device [" << device_name << "]" << std::endl;
|
||||||
return std::vector<float> ();
|
return std::vector<float> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
sr = device->SamplingRates ();
|
// COMMENTED DBG LOGS */ std::cout << "\tFound " << devInfo.m_AvailableSampleRates.size () << " sample rates for " << device_name << ":";
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\tFound " << sr.size () << " sample rates for " << device->DeviceName () << ":";
|
|
||||||
|
|
||||||
std::vector<float> sample_rates (sr.begin (), sr.end ());
|
std::vector<float> sample_rates (devInfo.m_AvailableSampleRates.begin (), devInfo.m_AvailableSampleRates.end ());
|
||||||
|
|
||||||
/* COMMENTED DBG LOGS */ for (std::vector<float>::iterator i = sample_rates.begin (); i != sample_rates.end (); ++i) std::cout << " " << *i; std::cout << std::endl;
|
// COMMENTED DBG LOGS */ for (std::vector<float>::iterator i = sample_rates.begin (); i != sample_rates.end (); ++i) std::cout << " " << *i; std::cout << std::endl;
|
||||||
|
|
||||||
return sample_rates;
|
return sample_rates;
|
||||||
}
|
}
|
||||||
|
|
@ -191,7 +202,7 @@ WavesAudioBackend::available_sample_rates (const std::string& device_name) const
|
||||||
|
|
||||||
float WavesAudioBackend::default_sample_rate () const
|
float WavesAudioBackend::default_sample_rate () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::default_sample_rate ():" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::default_sample_rate (): " << AudioBackend::default_sample_rate () << std::endl;
|
||||||
return AudioBackend::default_sample_rate ();
|
return AudioBackend::default_sample_rate ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -199,18 +210,22 @@ float WavesAudioBackend::default_sample_rate () const
|
||||||
std::vector<uint32_t>
|
std::vector<uint32_t>
|
||||||
WavesAudioBackend::available_buffer_sizes (const std::string& device_name) const
|
WavesAudioBackend::available_buffer_sizes (const std::string& device_name) const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::available_buffer_sizes (): [" << device_name << "]" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::available_buffer_sizes (): [" << device_name << "]" << std::endl;
|
||||||
|
|
||||||
WCMRAudioDevice * device = _audio_device_manager.GetDeviceByName (device_name);
|
std::vector<int> bs;
|
||||||
if (!device) {
|
|
||||||
std::cerr << "WavesAudioBackend::available_buffer_sizes (): Failed to find device [" << device_name << "]" << std::endl;
|
WTErr retVal;
|
||||||
|
retVal = _audio_device_manager.GetDeviceBufferSizes(device_name, bs);
|
||||||
|
|
||||||
|
if (retVal != eNoErr) {
|
||||||
|
std::cerr << "WavesAudioBackend::available_buffer_sizes (): Failed to get buffer size for device [" << device_name << "]" << std::endl;
|
||||||
return std::vector<uint32_t> ();
|
return std::vector<uint32_t> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<uint32_t> buffer_sizes (device->BufferSizes ().begin (), device->BufferSizes ().end ());
|
std::vector<uint32_t> buffer_sizes (bs.begin (), bs.end ());
|
||||||
|
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\tFound " << buffer_sizes.size () << " buffer sizes for " << device->DeviceName () << ":";
|
// COMMENTED DBG LOGS */ std::cout << "\tFound " << buffer_sizes.size () << " buffer sizes for " << device_name << ":";
|
||||||
/* COMMENTED DBG LOGS */ for (std::vector<uint32_t>::const_iterator i = buffer_sizes.begin (); i != buffer_sizes.end (); ++i) std::cout << " " << *i; std::cout << std::endl;
|
// COMMENTED DBG LOGS */ for (std::vector<uint32_t>::const_iterator i = buffer_sizes.begin (); i != buffer_sizes.end (); ++i) std::cout << " " << *i; std::cout << std::endl;
|
||||||
|
|
||||||
return buffer_sizes;
|
return buffer_sizes;
|
||||||
}
|
}
|
||||||
|
|
@ -219,17 +234,17 @@ WavesAudioBackend::available_buffer_sizes (const std::string& device_name) const
|
||||||
uint32_t
|
uint32_t
|
||||||
WavesAudioBackend::available_input_channel_count (const std::string& device_name) const
|
WavesAudioBackend::available_input_channel_count (const std::string& device_name) const
|
||||||
{
|
{
|
||||||
|
DeviceInfo devInfo;
|
||||||
|
WTErr err = _audio_device_manager.GetDeviceInfoByName(device_name, devInfo);
|
||||||
|
|
||||||
WCMRAudioDevice * device = _audio_device_manager.GetDeviceByName (device_name);
|
if (eNoErr != err) {
|
||||||
|
|
||||||
if (!device) {
|
|
||||||
std::cerr << "WavesAudioBackend::available_input_channel_count (): Failed to find device [" << device_name << "]" << std::endl;
|
std::cerr << "WavesAudioBackend::available_input_channel_count (): Failed to find device [" << device_name << "]" << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t num_of_input_channels = device->InputChannels ().size ();
|
uint32_t num_of_input_channels = devInfo.m_MaxInputChannels;
|
||||||
|
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::available_input_channel_count (): " << num_of_input_channels << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::available_input_channel_count (): " << num_of_input_channels << std::endl;
|
||||||
return num_of_input_channels;
|
return num_of_input_channels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -237,17 +252,17 @@ WavesAudioBackend::available_input_channel_count (const std::string& device_name
|
||||||
uint32_t
|
uint32_t
|
||||||
WavesAudioBackend::available_output_channel_count (const std::string& device_name) const
|
WavesAudioBackend::available_output_channel_count (const std::string& device_name) const
|
||||||
{
|
{
|
||||||
std::vector<std::string> output_channels;
|
DeviceInfo devInfo;
|
||||||
|
WTErr err = _audio_device_manager.GetDeviceInfoByName(device_name, devInfo);
|
||||||
|
|
||||||
WCMRAudioDevice * device = _audio_device_manager.GetDeviceByName (device_name);
|
if (eNoErr != err) {
|
||||||
if (!device) {
|
|
||||||
std::cerr << "WavesAudioBackend::available_output_channel_count (): Failed to find device [" << device_name << "]" << std::endl;
|
std::cerr << "WavesAudioBackend::available_output_channel_count (): Failed to find device [" << device_name << "]" << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t num_of_output_channels = device->OutputChannels ().size ();
|
uint32_t num_of_output_channels = devInfo.m_MaxOutputChannels;
|
||||||
|
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::available_output_channel_count (): " << num_of_output_channels << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::available_output_channel_count (): " << num_of_output_channels << std::endl;
|
||||||
|
|
||||||
return num_of_output_channels;
|
return num_of_output_channels;
|
||||||
}
|
}
|
||||||
|
|
@ -272,7 +287,7 @@ WavesAudioBackend::can_change_buffer_size_when_running () const
|
||||||
int
|
int
|
||||||
WavesAudioBackend::set_device_name (const std::string& device_name)
|
WavesAudioBackend::set_device_name (const std::string& device_name)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_device_name (): " << device_name << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_device_name (): " << device_name << std::endl;
|
||||||
|
|
||||||
if (_ports.size ()) {
|
if (_ports.size ()) {
|
||||||
std::cerr << "WavesAudioBackend::set_device_name (): There are unregistered ports left after [" << (_device ? _device->DeviceName () : std::string ("<NULL>")) << "]!" << std::endl;
|
std::cerr << "WavesAudioBackend::set_device_name (): There are unregistered ports left after [" << (_device ? _device->DeviceName () : std::string ("<NULL>")) << "]!" << std::endl;
|
||||||
|
|
@ -282,14 +297,13 @@ WavesAudioBackend::set_device_name (const std::string& device_name)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
WCMRAudioDevice * device = _audio_device_manager.GetDeviceByName (device_name);
|
if (_device && _device->Streaming () ) {
|
||||||
|
std::cerr << "WavesAudioBackend::set_device_name (): [" << _device->DeviceName () << "] is streaming! Current device must be stopped before setting another device as current" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
if (!device) {
|
// we must have only one device initialized at a time
|
||||||
std::cerr << "WavesAudioBackend::set_device_name (): Failed to find device [" << device_name << "]!" << std::endl;
|
// stop current device first
|
||||||
return -1;
|
WTErr retVal;
|
||||||
}
|
|
||||||
|
|
||||||
WTErr retVal;
|
|
||||||
if (_device) {
|
if (_device) {
|
||||||
retVal = _device->SetActive (false);
|
retVal = _device->SetActive (false);
|
||||||
if (retVal != eNoErr) {
|
if (retVal != eNoErr) {
|
||||||
|
|
@ -298,7 +312,17 @@ WavesAudioBackend::set_device_name (const std::string& device_name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_device = NULL;
|
// deinitialize it
|
||||||
|
_audio_device_manager.DestroyCurrentDevice();
|
||||||
|
_device = 0;
|
||||||
|
|
||||||
|
WCMRAudioDevice * device = _audio_device_manager.InitNewCurrentDevice(device_name);
|
||||||
|
|
||||||
|
if (!device) {
|
||||||
|
std::cerr << "WavesAudioBackend::set_device_name (): Failed to initialize device [" << device_name << "]!" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
retVal = device->SetActive (true);
|
retVal = device->SetActive (true);
|
||||||
if (retVal != eNoErr) {
|
if (retVal != eNoErr) {
|
||||||
|
|
@ -311,10 +335,31 @@ WavesAudioBackend::set_device_name (const std::string& device_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
WavesAudioBackend::drop_device()
|
||||||
|
{
|
||||||
|
WTErr wtErr = 0;
|
||||||
|
|
||||||
|
if (_device)
|
||||||
|
{
|
||||||
|
wtErr = _device->SetActive (false);
|
||||||
|
if (wtErr != eNoErr) {
|
||||||
|
std::cerr << "WavesAudioBackend::drop_device (): [" << _device->DeviceName () << "]->SetActive () failed!" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_audio_device_manager.DestroyCurrentDevice();
|
||||||
|
_device = 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
WavesAudioBackend::set_sample_rate (float sample_rate)
|
WavesAudioBackend::set_sample_rate (float sample_rate)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_sample_rate (): " << sample_rate << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_sample_rate (): " << sample_rate << std::endl;
|
||||||
|
|
||||||
WTErr retVal = eNoErr;
|
WTErr retVal = eNoErr;
|
||||||
|
|
||||||
|
|
@ -328,7 +373,7 @@ WavesAudioBackend::set_sample_rate (float sample_rate)
|
||||||
|
|
||||||
if (device_needs_restart) {
|
if (device_needs_restart) {
|
||||||
retVal = _device->SetStreaming (false);
|
retVal = _device->SetStreaming (false);
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->_device->SetStreaming (false);"<< std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->_device->SetStreaming (false);"<< std::endl;
|
||||||
if (retVal != eNoErr) {
|
if (retVal != eNoErr) {
|
||||||
std::cerr << "WavesAudioBackend::set_sample_rate (): [" << _device->DeviceName () << "]->SetStreaming (false) failed (" << retVal << ") !" << std::endl;
|
std::cerr << "WavesAudioBackend::set_sample_rate (): [" << _device->DeviceName () << "]->SetStreaming (false) failed (" << retVal << ") !" << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -342,12 +387,10 @@ WavesAudioBackend::set_sample_rate (float sample_rate)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
_sample_rate = sample_rate;
|
_sample_rate_change(sample_rate);
|
||||||
_init_dsp_load_history();
|
|
||||||
engine.sample_rate_change (sample_rate);
|
|
||||||
|
|
||||||
if (device_needs_restart) {
|
if (device_needs_restart) {
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->SetStreaming (true);"<< std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->SetStreaming (true);"<< std::endl;
|
||||||
_call_thread_init_callback = true;
|
_call_thread_init_callback = true;
|
||||||
retVal = _device->SetStreaming (true);
|
retVal = _device->SetStreaming (true);
|
||||||
if (retVal != eNoErr) {
|
if (retVal != eNoErr) {
|
||||||
|
|
@ -362,7 +405,7 @@ WavesAudioBackend::set_sample_rate (float sample_rate)
|
||||||
int
|
int
|
||||||
WavesAudioBackend::set_buffer_size (uint32_t buffer_size)
|
WavesAudioBackend::set_buffer_size (uint32_t buffer_size)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_buffer_size (): " << buffer_size << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_buffer_size (" << buffer_size << "):"<< std::endl;
|
||||||
|
|
||||||
WTErr retVal = eNoErr;
|
WTErr retVal = eNoErr;
|
||||||
|
|
||||||
|
|
@ -375,7 +418,7 @@ WavesAudioBackend::set_buffer_size (uint32_t buffer_size)
|
||||||
|
|
||||||
if (device_needs_restart) {
|
if (device_needs_restart) {
|
||||||
retVal = _device->SetStreaming (false);
|
retVal = _device->SetStreaming (false);
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->SetStreaming (false);"<< std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->SetStreaming (false);"<< std::endl;
|
||||||
if (retVal != eNoErr) {
|
if (retVal != eNoErr) {
|
||||||
std::cerr << "WavesAudioBackend::set_buffer_size (): [" << _device->DeviceName () << "]->SetStreaming (false) failed (" << retVal << ") !" << std::endl;
|
std::cerr << "WavesAudioBackend::set_buffer_size (): [" << _device->DeviceName () << "]->SetStreaming (false) failed (" << retVal << ") !" << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -385,16 +428,14 @@ WavesAudioBackend::set_buffer_size (uint32_t buffer_size)
|
||||||
retVal = _device->SetCurrentBufferSize (buffer_size);
|
retVal = _device->SetCurrentBufferSize (buffer_size);
|
||||||
|
|
||||||
if (retVal != eNoErr) {
|
if (retVal != eNoErr) {
|
||||||
std::cerr << "WavesAudioBackend::set_sample_rate (): [" << _device->DeviceName() << "]->SetCurrentBufferSize (" << buffer_size << ") failed (" << retVal << ") !" << std::endl;
|
std::cerr << "WavesAudioBackend::set_buffer_size (): [" << _device->DeviceName() << "]->SetCurrentBufferSize (" << buffer_size << ") failed (" << retVal << ") !" << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
_buffer_size = buffer_size;
|
_buffer_size_change(buffer_size);
|
||||||
_init_dsp_load_history();
|
|
||||||
engine.buffer_size_change (buffer_size);
|
|
||||||
|
|
||||||
if (device_needs_restart) {
|
if (device_needs_restart) {
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->SetStreaming (true);"<< std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->SetStreaming (true);"<< std::endl;
|
||||||
_call_thread_init_callback = true;
|
_call_thread_init_callback = true;
|
||||||
retVal = _device->SetStreaming (true);
|
retVal = _device->SetStreaming (true);
|
||||||
if (retVal != eNoErr) {
|
if (retVal != eNoErr) {
|
||||||
|
|
@ -407,6 +448,145 @@ WavesAudioBackend::set_buffer_size (uint32_t buffer_size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
WavesAudioBackend::set_sample_format (SampleFormat sample_format)
|
||||||
|
{
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_sample_format (): " << sample_format << std::endl;
|
||||||
|
|
||||||
|
_sample_format = sample_format;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
WavesAudioBackend::_reset_device (uint32_t buffer_size, float sample_rate)
|
||||||
|
{
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::_reset_device (" << buffer_size <<", " << sample_rate << "):" << std::endl;
|
||||||
|
|
||||||
|
WTErr retVal = eNoErr;
|
||||||
|
|
||||||
|
if (!_device) {
|
||||||
|
std::cerr << "WavesAudioBackend::set_buffer_size (): No device is set!" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool device_needs_restart = _device->Streaming ();
|
||||||
|
|
||||||
|
if (device_needs_restart) {
|
||||||
|
retVal = _device->SetStreaming (false);
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->SetStreaming (false);"<< std::endl;
|
||||||
|
if (retVal != eNoErr) {
|
||||||
|
std::cerr << "WavesAudioBackend::_reset_device (): [" << _device->DeviceName () << "]->SetStreaming (false) failed (" << retVal << ") !" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
retVal = _device->SetActive (false);
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->SetActive (false);"<< std::endl;
|
||||||
|
if (retVal != eNoErr) {
|
||||||
|
std::cerr << "WavesAudioBackend::_reset_device (): [" << _device->DeviceName () << "]->SetActive (false) failed (" << retVal << ") !" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
retVal = _device->UpdateDeviceInfo ();
|
||||||
|
if (retVal != eNoErr) {
|
||||||
|
std::cerr << "WavesAudioBackend::_reset_device (): [" << _device->DeviceName() << "]->UpdateDeviceInfo () failed (" << retVal << ") !" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buffer_size != 0)
|
||||||
|
{
|
||||||
|
retVal = _device->SetCurrentBufferSize (buffer_size);
|
||||||
|
|
||||||
|
if (retVal != eNoErr) {
|
||||||
|
std::cerr << "WavesAudioBackend::_reset_device (): [" << _device->DeviceName() << "]->SetCurrentBufferSize (" << buffer_size << ") failed (" << retVal << ") !" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
_buffer_size = buffer_size;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uint32_t current_buffer_size = _device->CurrentBufferSize();
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "\t\tcurrent_buffer_size: " << current_buffer_size << std::endl;
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "\t\t _buffer_size: " << _buffer_size << std::endl;
|
||||||
|
if(_buffer_size != current_buffer_size)
|
||||||
|
{
|
||||||
|
_buffer_size = current_buffer_size;
|
||||||
|
engine.buffer_size_change (_buffer_size);
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "\t\tengine.buffer_size_change (" << buffer_size <<")" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sample_rate > 0.0)
|
||||||
|
{
|
||||||
|
retVal = _device->SetCurrentSamplingRate ((int)sample_rate);
|
||||||
|
|
||||||
|
if (retVal != eNoErr) {
|
||||||
|
std::cerr << "WavesAudioBackend::set_sample_rate (): [" << _device->DeviceName() << "]->SetCurrentSamplingRate ((int)" << sample_rate << ") failed (" << retVal << ") !" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
_sample_rate = sample_rate;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float current_sample_rate = _device->CurrentSamplingRate();
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "\t\tcurrent_sample_rate: " << current_sample_rate << std::endl;
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "\t\t _sample_rate: " << _sample_rate << std::endl;
|
||||||
|
if(_sample_rate != current_sample_rate)
|
||||||
|
{
|
||||||
|
_sample_rate = current_sample_rate;
|
||||||
|
engine.sample_rate_change (_sample_rate);
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "\t\tengine.sample_rate_change (" << _sample_rate <<")" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_init_dsp_load_history();
|
||||||
|
|
||||||
|
if (device_needs_restart) {
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->SetActive (true);"<< std::endl;
|
||||||
|
retVal = _device->SetActive (true);
|
||||||
|
if (retVal != eNoErr) {
|
||||||
|
std::cerr << "WavesAudioBackend::_reset_device (): [" << _device->DeviceName () << "]->SetActive (true) failed (" << retVal << ") !" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "\t\t[" << _device->DeviceName() << "]->SetStreaming (true);"<< std::endl;
|
||||||
|
_call_thread_init_callback = true;
|
||||||
|
retVal = _device->SetStreaming (true);
|
||||||
|
if (retVal != eNoErr) {
|
||||||
|
std::cerr << "WavesAudioBackend::_reset_device (): [" << _device->DeviceName () << "]->SetStreaming (true) failed (" << retVal << ") !" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
WavesAudioBackend::_buffer_size_change (uint32_t new_buffer_size)
|
||||||
|
{
|
||||||
|
_buffer_size = new_buffer_size;
|
||||||
|
_init_dsp_load_history();
|
||||||
|
return engine.buffer_size_change (new_buffer_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
WavesAudioBackend::_sample_rate_change (float new_sample_rate)
|
||||||
|
{
|
||||||
|
_sample_rate = new_sample_rate;
|
||||||
|
_init_dsp_load_history();
|
||||||
|
return engine.sample_rate_change (new_sample_rate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
WavesAudioBackend::_device_list_change ()
|
||||||
|
{
|
||||||
|
// requires GZ changes for device list update
|
||||||
|
return engine.device_list_change ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
WavesAudioBackend::set_interleaved (bool yn)
|
WavesAudioBackend::set_interleaved (bool yn)
|
||||||
{
|
{
|
||||||
|
|
@ -419,7 +599,7 @@ WavesAudioBackend::set_interleaved (bool yn)
|
||||||
int
|
int
|
||||||
WavesAudioBackend::set_input_channels (uint32_t input_channels)
|
WavesAudioBackend::set_input_channels (uint32_t input_channels)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_input_channels (): " << input_channels << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_input_channels (): " << input_channels << std::endl;
|
||||||
|
|
||||||
_input_channels = input_channels;
|
_input_channels = input_channels;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -429,7 +609,7 @@ WavesAudioBackend::set_input_channels (uint32_t input_channels)
|
||||||
int
|
int
|
||||||
WavesAudioBackend::set_output_channels (uint32_t output_channels)
|
WavesAudioBackend::set_output_channels (uint32_t output_channels)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_output_channels (): " << output_channels << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_output_channels (): " << output_channels << std::endl;
|
||||||
|
|
||||||
_output_channels = output_channels;
|
_output_channels = output_channels;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -439,10 +619,11 @@ WavesAudioBackend::set_output_channels (uint32_t output_channels)
|
||||||
std::string
|
std::string
|
||||||
WavesAudioBackend::device_name () const
|
WavesAudioBackend::device_name () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::device_name (): " << _device->DeviceName () << std::endl;
|
|
||||||
if (!_device) {
|
if (!_device) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::device_name (): " << _device->DeviceName () << std::endl;
|
||||||
|
|
||||||
return _device->DeviceName ();
|
return _device->DeviceName ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -450,7 +631,7 @@ WavesAudioBackend::device_name () const
|
||||||
float
|
float
|
||||||
WavesAudioBackend::sample_rate () const
|
WavesAudioBackend::sample_rate () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::sample_rate (): " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::sample_rate (): " << std::endl;
|
||||||
|
|
||||||
if (!_device) {
|
if (!_device) {
|
||||||
std::cerr << "WavesAudioBackend::sample_rate (): No device is set!" << std::endl;
|
std::cerr << "WavesAudioBackend::sample_rate (): No device is set!" << std::endl;
|
||||||
|
|
@ -459,7 +640,7 @@ WavesAudioBackend::sample_rate () const
|
||||||
|
|
||||||
int sample_rate = _device->CurrentSamplingRate ();
|
int sample_rate = _device->CurrentSamplingRate ();
|
||||||
|
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t[" << _device->DeviceName () << "]->CurrentSamplingRate () returned " << sample_rate << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t[" << _device->DeviceName () << "]->CurrentSamplingRate () returned " << sample_rate << std::endl;
|
||||||
|
|
||||||
return (float)sample_rate;
|
return (float)sample_rate;
|
||||||
}
|
}
|
||||||
|
|
@ -469,7 +650,7 @@ uint32_t
|
||||||
WavesAudioBackend::buffer_size () const
|
WavesAudioBackend::buffer_size () const
|
||||||
{
|
{
|
||||||
|
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::buffer_size (): " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::buffer_size (): " << std::endl;
|
||||||
|
|
||||||
if (!_device) {
|
if (!_device) {
|
||||||
std::cerr << "WavesAudioBackend::buffer_size (): No device is set!" << std::endl;
|
std::cerr << "WavesAudioBackend::buffer_size (): No device is set!" << std::endl;
|
||||||
|
|
@ -478,16 +659,24 @@ WavesAudioBackend::buffer_size () const
|
||||||
|
|
||||||
int size = _device->CurrentBufferSize ();
|
int size = _device->CurrentBufferSize ();
|
||||||
|
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t[" << _device->DeviceName () << "]->CurrentBufferSize () returned " << size << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t[" << _device->DeviceName () << "]->CurrentBufferSize () returned " << size << std::endl;
|
||||||
|
|
||||||
return (uint32_t)size;
|
return (uint32_t)size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SampleFormat
|
||||||
|
WavesAudioBackend::sample_format () const
|
||||||
|
{
|
||||||
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::sample_format ()" << std::endl;
|
||||||
|
return _sample_format;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
WavesAudioBackend::interleaved () const
|
WavesAudioBackend::interleaved () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::interleaved ()" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::interleaved ()" << std::endl;
|
||||||
|
|
||||||
return _interleaved;
|
return _interleaved;
|
||||||
}
|
}
|
||||||
|
|
@ -496,7 +685,7 @@ WavesAudioBackend::interleaved () const
|
||||||
uint32_t
|
uint32_t
|
||||||
WavesAudioBackend::input_channels () const
|
WavesAudioBackend::input_channels () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::input_channels ()" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::input_channels ()" << std::endl;
|
||||||
|
|
||||||
return _input_channels;
|
return _input_channels;
|
||||||
}
|
}
|
||||||
|
|
@ -505,7 +694,7 @@ WavesAudioBackend::input_channels () const
|
||||||
uint32_t
|
uint32_t
|
||||||
WavesAudioBackend::output_channels () const
|
WavesAudioBackend::output_channels () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::output_channels ()" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::output_channels ()" << std::endl;
|
||||||
|
|
||||||
return _output_channels;
|
return _output_channels;
|
||||||
}
|
}
|
||||||
|
|
@ -527,7 +716,7 @@ WavesAudioBackend::control_app_name () const
|
||||||
void
|
void
|
||||||
WavesAudioBackend::launch_control_app ()
|
WavesAudioBackend::launch_control_app ()
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::launch_control_app ()" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::launch_control_app ()" << std::endl;
|
||||||
if (!_device) {
|
if (!_device) {
|
||||||
std::cerr << "WavesAudioBackend::launch_control_app (): No device is set!" << std::endl;
|
std::cerr << "WavesAudioBackend::launch_control_app (): No device is set!" << std::endl;
|
||||||
return;
|
return;
|
||||||
|
|
@ -539,14 +728,14 @@ WavesAudioBackend::launch_control_app ()
|
||||||
std::cerr << "WavesAudioBackend::launch_control_app (): [" << _device->DeviceName () << "]->ShowConfigPanel () failed (" << err << ")!" << std::endl;
|
std::cerr << "WavesAudioBackend::launch_control_app (): [" << _device->DeviceName () << "]->ShowConfigPanel () failed (" << err << ")!" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* COMMENTED DBG LOGS */ else std::cout << "WavesAudioBackend::launch_control_app (): [" << _device->DeviceName () << "]->ShowConfigPanel () successfully launched!" << std::endl;
|
// COMMENTED DBG LOGS */ else std::cout << "WavesAudioBackend::launch_control_app (): [" << _device->DeviceName () << "]->ShowConfigPanel () successfully launched!" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
WavesAudioBackend::_start (bool for_latency_measurement)
|
WavesAudioBackend::_start (bool for_latency_measurement)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::_start ()" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::_start ()" << std::endl;
|
||||||
|
|
||||||
if (!_device) {
|
if (!_device) {
|
||||||
std::cerr << "WavesAudioBackend::_start (): No device is set!" << std::endl;
|
std::cerr << "WavesAudioBackend::_start (): No device is set!" << std::endl;
|
||||||
|
|
@ -606,7 +795,7 @@ WavesAudioBackend::_audio_device_callback (const float* input_buffer,
|
||||||
_cycle_start_time_nanos = cycle_start_time_nanos;
|
_cycle_start_time_nanos = cycle_start_time_nanos;
|
||||||
|
|
||||||
if (_buffer_size != nframes) {
|
if (_buffer_size != nframes) {
|
||||||
std::cout << _buffer_size << "!=" << nframes << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\tAudioEngine::thread_init_callback() buffer size and nframes are not equal: " << _buffer_size << "!=" << nframes << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -615,7 +804,7 @@ WavesAudioBackend::_audio_device_callback (const float* input_buffer,
|
||||||
|
|
||||||
if (_call_thread_init_callback) {
|
if (_call_thread_init_callback) {
|
||||||
_call_thread_init_callback = false;
|
_call_thread_init_callback = false;
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\tAudioEngine::thread_init_callback() invoked for " << std::hex << pthread_self() << std::dec << " !" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\tAudioEngine::thread_init_callback() invoked for " << std::hex << pthread_self() << std::dec << " !" << std::endl;
|
||||||
AudioEngine::thread_init_callback (this);
|
AudioEngine::thread_init_callback (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -639,35 +828,34 @@ WavesAudioBackend::_audio_device_callback (const float* input_buffer,
|
||||||
int
|
int
|
||||||
WavesAudioBackend::stop ()
|
WavesAudioBackend::stop ()
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::stop ()" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::stop ()" << std::endl;
|
||||||
|
|
||||||
WTErr retVal = eNoErr;
|
WTErr wtErr = eNoErr;
|
||||||
|
int retVal = 0;
|
||||||
|
|
||||||
if (!_device) {
|
// COMMENTED DBG LOGS */ std::cout << "\t[" << _device->DeviceName () << "]" << std::endl;
|
||||||
std::cerr << "WavesAudioBackend::stop (): No device is set!" << std::endl;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t[" << _device->DeviceName () << "]" << std::endl;
|
if (_device) {
|
||||||
|
wtErr = _device->SetStreaming (false);
|
||||||
retVal = _device->SetStreaming (false);
|
if (wtErr != eNoErr) {
|
||||||
if (retVal != eNoErr) {
|
std::cerr << "WavesAudioBackend::stop (): [" << _device->DeviceName () << "]->SetStreaming () failed!" << std::endl;
|
||||||
std::cerr << "WavesAudioBackend::stop (): [" << _device->DeviceName () << "]->SetStreaming () failed!" << std::endl;
|
retVal = -1;
|
||||||
return -1;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_midi_device_manager.stop ();
|
_midi_device_manager.stop ();
|
||||||
|
|
||||||
_unregister_system_audio_ports ();
|
_unregister_system_audio_ports ();
|
||||||
_unregister_system_midi_ports ();
|
_unregister_system_midi_ports ();
|
||||||
return 0;
|
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
WavesAudioBackend::freewheel (bool start_stop)
|
WavesAudioBackend::freewheel (bool start_stop)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::freewheel (" << start_stop << "):" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::freewheel (" << start_stop << "):" << std::endl;
|
||||||
|
|
||||||
if (start_stop != _freewheeling) {
|
if (start_stop != _freewheeling) {
|
||||||
if (start_stop == true) {
|
if (start_stop == true) {
|
||||||
|
|
@ -700,10 +888,10 @@ WavesAudioBackend::freewheel (bool start_stop)
|
||||||
void
|
void
|
||||||
WavesAudioBackend::_freewheel_thread ()
|
WavesAudioBackend::_freewheel_thread ()
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::_freewheel_thread ():" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::_freewheel_thread ():" << std::endl;
|
||||||
if (!_freewheel_thread_active) { // Lets create it
|
if (!_freewheel_thread_active) { // Lets create it
|
||||||
|
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\tCreating the thread _freewheel_thread () . . ." << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\tCreating the thread _freewheel_thread () . . ." << std::endl;
|
||||||
pthread_attr_t attributes;
|
pthread_attr_t attributes;
|
||||||
pthread_t thread_id;
|
pthread_t thread_id;
|
||||||
|
|
||||||
|
|
@ -726,7 +914,7 @@ WavesAudioBackend::_freewheel_thread ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t. . . _freewheel_thread () complete." << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t. . . _freewheel_thread () complete." << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -738,7 +926,7 @@ WavesAudioBackend::_freewheel_thread ()
|
||||||
while (_freewheel_thread_active) {
|
while (_freewheel_thread_active) {
|
||||||
engine.process_callback (_buffer_size);
|
engine.process_callback (_buffer_size);
|
||||||
}
|
}
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::_freewheel_thread (): FINISHED" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::_freewheel_thread (): FINISHED" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -771,7 +959,7 @@ WavesAudioBackend::_init_dsp_load_history()
|
||||||
_dsp_load_accumulator = 0;
|
_dsp_load_accumulator = 0;
|
||||||
|
|
||||||
_dsp_load_history_length = (_sample_rate + _buffer_size - 1) / _buffer_size;
|
_dsp_load_history_length = (_sample_rate + _buffer_size - 1) / _buffer_size;
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t\t_dsp_load_history_length = " << _dsp_load_history_length << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t\t_dsp_load_history_length = " << _dsp_load_history_length << std::endl;
|
||||||
_dsp_load_history = std::list<uint64_t>(_dsp_load_history_length, 0);
|
_dsp_load_history = std::list<uint64_t>(_dsp_load_history_length, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -779,21 +967,21 @@ WavesAudioBackend::_init_dsp_load_history()
|
||||||
void
|
void
|
||||||
WavesAudioBackend::transport_start ()
|
WavesAudioBackend::transport_start ()
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::transport_start (): " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::transport_start (): " << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WavesAudioBackend::transport_stop ()
|
WavesAudioBackend::transport_stop ()
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::transport_stop (): " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::transport_stop (): " << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TransportState
|
TransportState
|
||||||
WavesAudioBackend::transport_state () const
|
WavesAudioBackend::transport_state () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::transport_state (): " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::transport_state (): " << std::endl;
|
||||||
return TransportStopped;
|
return TransportStopped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -801,14 +989,14 @@ WavesAudioBackend::transport_state () const
|
||||||
void
|
void
|
||||||
WavesAudioBackend::transport_locate (framepos_t pos)
|
WavesAudioBackend::transport_locate (framepos_t pos)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::transport_locate (" << pos << "): " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::transport_locate (" << pos << "): " << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
framepos_t
|
framepos_t
|
||||||
WavesAudioBackend::transport_frame () const
|
WavesAudioBackend::transport_frame () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::transport_frame (): " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::transport_frame (): " << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -816,7 +1004,7 @@ WavesAudioBackend::transport_frame () const
|
||||||
int
|
int
|
||||||
WavesAudioBackend::set_time_master (bool yn)
|
WavesAudioBackend::set_time_master (bool yn)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_time_master (): " << yn << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_time_master (): " << yn << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -824,7 +1012,7 @@ WavesAudioBackend::set_time_master (bool yn)
|
||||||
int
|
int
|
||||||
WavesAudioBackend::usecs_per_cycle () const
|
WavesAudioBackend::usecs_per_cycle () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::usecs_per_cycle (): " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::usecs_per_cycle (): " << std::endl;
|
||||||
return (1000000 * _sample_rate) / _buffer_size;
|
return (1000000 * _sample_rate) / _buffer_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -890,7 +1078,7 @@ WavesAudioBackend::samples_since_cycle_start ()
|
||||||
{
|
{
|
||||||
pframes_t diff_sample_time;
|
pframes_t diff_sample_time;
|
||||||
diff_sample_time = sample_time () - _sample_time_at_cycle_start;
|
diff_sample_time = sample_time () - _sample_time_at_cycle_start;
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "samples_since_cycle_start: " << diff_sample_time << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "samples_since_cycle_start: " << diff_sample_time << std::endl;
|
||||||
|
|
||||||
return diff_sample_time;
|
return diff_sample_time;
|
||||||
}
|
}
|
||||||
|
|
@ -899,7 +1087,7 @@ WavesAudioBackend::samples_since_cycle_start ()
|
||||||
bool
|
bool
|
||||||
WavesAudioBackend::get_sync_offset (pframes_t& /*offset*/) const
|
WavesAudioBackend::get_sync_offset (pframes_t& /*offset*/) const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "get_sync_offset: false" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "get_sync_offset: false" << std::endl;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -908,7 +1096,7 @@ WavesAudioBackend::get_sync_offset (pframes_t& /*offset*/) const
|
||||||
int
|
int
|
||||||
WavesAudioBackend::create_process_thread (boost::function<void ()> func)
|
WavesAudioBackend::create_process_thread (boost::function<void ()> func)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::create_process_thread ():" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::create_process_thread ():" << std::endl;
|
||||||
int retVal;
|
int retVal;
|
||||||
pthread_attr_t attributes;
|
pthread_attr_t attributes;
|
||||||
size_t stacksize_aligned;
|
size_t stacksize_aligned;
|
||||||
|
|
@ -935,7 +1123,7 @@ WavesAudioBackend::create_process_thread (boost::function<void ()> func)
|
||||||
}
|
}
|
||||||
|
|
||||||
_backend_threads.push_back (thread_id);
|
_backend_threads.push_back (thread_id);
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t\t\t. . . thread " << std::hex << thread_id << " has been created" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t\t\t. . . thread " << std::hex << thread_id << std::dec << " has been created" << std::endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -944,7 +1132,7 @@ WavesAudioBackend::create_process_thread (boost::function<void ()> func)
|
||||||
void*
|
void*
|
||||||
WavesAudioBackend::__start_process_thread (void* arg)
|
WavesAudioBackend::__start_process_thread (void* arg)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__start_process_thread ():" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__start_process_thread ():" << std::endl;
|
||||||
ThreadData* td = reinterpret_cast<ThreadData*> (arg);
|
ThreadData* td = reinterpret_cast<ThreadData*> (arg);
|
||||||
boost::function<void ()> f = td->f;
|
boost::function<void ()> f = td->f;
|
||||||
delete td;
|
delete td;
|
||||||
|
|
@ -956,24 +1144,24 @@ WavesAudioBackend::__start_process_thread (void* arg)
|
||||||
int
|
int
|
||||||
WavesAudioBackend::join_process_threads ()
|
WavesAudioBackend::join_process_threads ()
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::join_process_thread ()" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::join_process_thread ()" << std::endl;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
for (std::vector<pthread_t>::const_iterator i = _backend_threads.begin ();
|
for (std::vector<pthread_t>::const_iterator i = _backend_threads.begin ();
|
||||||
i != _backend_threads.end ();
|
i != _backend_threads.end ();
|
||||||
++i) {
|
++i) {
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t\t\tstopping thread " << std::hex << *i << std::dec << "...\n";
|
// COMMENTED DBG LOGS */ std::cout << "\t\t\tstopping thread " << std::hex << *i << std::dec << "...\n";
|
||||||
|
|
||||||
void* status;
|
void* status;
|
||||||
if (pthread_join (*i, &status) != 0) {
|
if (pthread_join (*i, &status) != 0) {
|
||||||
std::cerr << "AudioEngine: cannot stop process thread !" << std::endl;
|
std::cerr << "AudioEngine: cannot stop process thread !" << std::endl;
|
||||||
ret += -1;
|
ret += -1;
|
||||||
}
|
}
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t\t\t\t...done" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t\t\t\t...done" << std::endl;
|
||||||
}
|
}
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t\t\tall threads finished..." << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t\t\tall threads finished..." << std::endl;
|
||||||
_backend_threads.clear ();
|
_backend_threads.clear ();
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "\t\t\tthread list cleared..." << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "\t\t\tthread list cleared..." << std::endl;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
@ -982,7 +1170,7 @@ WavesAudioBackend::join_process_threads ()
|
||||||
bool
|
bool
|
||||||
WavesAudioBackend::in_process_thread ()
|
WavesAudioBackend::in_process_thread ()
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::in_process_thread ()" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::in_process_thread ()" << std::endl;
|
||||||
for (std::vector<pthread_t>::const_iterator i = _backend_threads.begin ();
|
for (std::vector<pthread_t>::const_iterator i = _backend_threads.begin ();
|
||||||
i != _backend_threads.end (); i++) {
|
i != _backend_threads.end (); i++) {
|
||||||
if (pthread_equal (*i, pthread_self ()) != 0) {
|
if (pthread_equal (*i, pthread_self ()) != 0) {
|
||||||
|
|
@ -1008,7 +1196,7 @@ WavesAudioBackend::__thread_stack_size ()
|
||||||
uint32_t
|
uint32_t
|
||||||
WavesAudioBackend::process_thread_count ()
|
WavesAudioBackend::process_thread_count ()
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::process_thread_count (): returns " << _backend_threads.size () << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::process_thread_count (): returns " << _backend_threads.size () << std::endl;
|
||||||
return _backend_threads.size ();
|
return _backend_threads.size ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1083,7 +1271,7 @@ static boost::shared_ptr<WavesAudioBackend> __instance;
|
||||||
boost::shared_ptr<AudioBackend>
|
boost::shared_ptr<AudioBackend>
|
||||||
WavesAudioBackend::__waves_backend_factory (AudioEngine& e)
|
WavesAudioBackend::__waves_backend_factory (AudioEngine& e)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__waves_backend_factory ():" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__waves_backend_factory ():" << std::endl;
|
||||||
if (!__instance) {
|
if (!__instance) {
|
||||||
__instance.reset (new WavesAudioBackend (e));
|
__instance.reset (new WavesAudioBackend (e));
|
||||||
}
|
}
|
||||||
|
|
@ -1100,7 +1288,7 @@ uint64_t WavesAudioBackend::__performance_counter_frequency;
|
||||||
int
|
int
|
||||||
WavesAudioBackend::__instantiate (const std::string& arg1, const std::string& arg2)
|
WavesAudioBackend::__instantiate (const std::string& arg1, const std::string& arg2)
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__instantiate ():" << "[" << arg1 << "], [" << arg2 << "]" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__instantiate ():" << "[" << arg1 << "], [" << arg2 << "]" << std::endl;
|
||||||
__instantiated_name = arg1;
|
__instantiated_name = arg1;
|
||||||
#if defined(_WINDOWS)
|
#if defined(_WINDOWS)
|
||||||
|
|
||||||
|
|
@ -1117,7 +1305,7 @@ WavesAudioBackend::__instantiate (const std::string& arg1, const std::string& ar
|
||||||
int
|
int
|
||||||
WavesAudioBackend::__deinstantiate ()
|
WavesAudioBackend::__deinstantiate ()
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__deinstantiate ():" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__deinstantiate ():" << std::endl;
|
||||||
__instance.reset ();
|
__instance.reset ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -1126,7 +1314,7 @@ WavesAudioBackend::__deinstantiate ()
|
||||||
bool
|
bool
|
||||||
WavesAudioBackend::__already_configured ()
|
WavesAudioBackend::__already_configured ()
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__already_configured ():" << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__already_configured ():" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1134,7 +1322,7 @@ WavesAudioBackend::__already_configured ()
|
||||||
void*
|
void*
|
||||||
WavesAudioBackend::private_handle () const
|
WavesAudioBackend::private_handle () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WHY DO CALL IT: WavesAudioBackend::private_handle: " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WHY DO CALL IT: WavesAudioBackend::private_handle: " << std::endl;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1158,7 +1346,7 @@ WavesAudioBackend::my_name () const
|
||||||
bool
|
bool
|
||||||
WavesAudioBackend::can_monitor_input () const
|
WavesAudioBackend::can_monitor_input () const
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::can_monitor_input: " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::can_monitor_input: " << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1176,9 +1364,12 @@ AudioBackendInfo WavesAudioBackend::__backend_info = {
|
||||||
WavesAudioBackend::__already_configured,
|
WavesAudioBackend::__already_configured,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __MINGW64__
|
||||||
extern "C" ARDOURBACKEND_API ARDOUR::AudioBackendInfo* descriptor ()
|
extern "C" __declspec(dllexport) ARDOUR::AudioBackendInfo* descriptor ()
|
||||||
|
#else
|
||||||
|
extern "C" ARDOURBACKEND_API ARDOUR::AudioBackendInfo* descriptor ()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
/* COMMENTED DBG LOGS */ std::cout << "waves_backend.dll : ARDOUR::AudioBackendInfo* descriptor (): " << std::endl;
|
// COMMENTED DBG LOGS */ std::cout << "waves_backend.dll : ARDOUR::AudioBackendInfo* descriptor (): " << std::endl;
|
||||||
return &WavesAudioBackend::backend_info ();
|
return &WavesAudioBackend::backend_info ();
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Valeriy Kamyshniy
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
class ArdourAudioDeviceManager : public WCMRCoreAudioDeviceManager
|
class ArdourAudioDeviceManager : public WCMRCoreAudioDeviceManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArdourAudioDeviceManager (WCMRAudioDeviceManagerClient *client) : WCMRCoreAudioDeviceManager (client, eFullDuplexDevices, true, eCABS_Simple, false) {};
|
ArdourAudioDeviceManager (WCMRAudioDeviceManagerClient *client) : WCMRCoreAudioDeviceManager (client, eAllDevices) {};
|
||||||
};
|
};
|
||||||
|
|
||||||
#elif defined (_WINDOWS)
|
#elif defined (_WINDOWS)
|
||||||
|
|
@ -51,7 +51,7 @@ class ArdourAudioDeviceManager : public WCMRCoreAudioDeviceManager
|
||||||
class ArdourAudioDeviceManager : public WCMRPortAudioDeviceManager
|
class ArdourAudioDeviceManager : public WCMRPortAudioDeviceManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArdourAudioDeviceManager (WCMRAudioDeviceManagerClient *client) : WCMRPortAudioDeviceManager (client, eFullDuplexDevices, paASIO) {};
|
ArdourAudioDeviceManager (WCMRAudioDeviceManagerClient *client) : WCMRPortAudioDeviceManager (client, eAllDevices) {};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -103,10 +103,14 @@ class WavesMidiPort;
|
||||||
|
|
||||||
virtual int set_device_name (const std::string& name);
|
virtual int set_device_name (const std::string& name);
|
||||||
|
|
||||||
|
virtual int drop_device();
|
||||||
|
|
||||||
virtual int set_sample_rate (float);
|
virtual int set_sample_rate (float);
|
||||||
|
|
||||||
virtual int set_buffer_size (uint32_t);
|
virtual int set_buffer_size (uint32_t);
|
||||||
|
|
||||||
|
virtual int set_sample_format (SampleFormat);
|
||||||
|
|
||||||
virtual int set_interleaved (bool yn);
|
virtual int set_interleaved (bool yn);
|
||||||
|
|
||||||
virtual int set_input_channels (uint32_t);
|
virtual int set_input_channels (uint32_t);
|
||||||
|
|
@ -123,6 +127,8 @@ class WavesMidiPort;
|
||||||
|
|
||||||
virtual uint32_t buffer_size () const;
|
virtual uint32_t buffer_size () const;
|
||||||
|
|
||||||
|
virtual SampleFormat sample_format () const;
|
||||||
|
|
||||||
virtual bool interleaved () const;
|
virtual bool interleaved () const;
|
||||||
|
|
||||||
virtual uint32_t input_channels () const;
|
virtual uint32_t input_channels () const;
|
||||||
|
|
@ -275,6 +281,7 @@ class WavesMidiPort;
|
||||||
WavesMidiDeviceManager _midi_device_manager;
|
WavesMidiDeviceManager _midi_device_manager;
|
||||||
|
|
||||||
WCMRAudioDevice *_device;
|
WCMRAudioDevice *_device;
|
||||||
|
SampleFormat _sample_format;
|
||||||
bool _interleaved;
|
bool _interleaved;
|
||||||
static std::string __instantiated_name;
|
static std::string __instantiated_name;
|
||||||
uint32_t _input_channels;
|
uint32_t _input_channels;
|
||||||
|
|
@ -317,8 +324,15 @@ class WavesMidiPort;
|
||||||
pframes_t sample_time,
|
pframes_t sample_time,
|
||||||
uint64_t cycle_start_time_nanos);
|
uint64_t cycle_start_time_nanos);
|
||||||
|
|
||||||
|
int _reset_device (uint32_t buffer_size, float sample_rate);
|
||||||
void _changed_midi_devices ();
|
void _changed_midi_devices ();
|
||||||
|
|
||||||
|
// DO change sample rate and buffer size
|
||||||
|
int _buffer_size_change(uint32_t new_buffer_size);
|
||||||
|
int _sample_rate_change(float new_sample_rate);
|
||||||
|
|
||||||
|
int _device_list_change();
|
||||||
|
|
||||||
int _register_system_audio_ports ();
|
int _register_system_audio_ports ();
|
||||||
int _register_system_midi_ports ();
|
int _register_system_midi_ports ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Valeriy Kamyshniy
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Valeriy Kamyshniy
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/assign/list_of.hpp>
|
#include <boost/assign/list_of.hpp>
|
||||||
|
|
||||||
#include "waves_audiobackend.h"
|
#include "waves_audiobackend.h"
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Valeriy Kamyshniy
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Valeriy Kamyshniy
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Paul Davis
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Valeriy Kamyshniy
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Paul Davis
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Valeriy amyshniy
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "waves_midi_buffer.h"
|
#include "waves_midi_buffer.h"
|
||||||
#include "waves_midi_event.h"
|
#include "waves_midi_event.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Valeriy amyshniy
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __libardour_waves_midi_buffer_h__
|
#ifndef __libardour_waves_midi_buffer_h__
|
||||||
#define __libardour_waves_midi_buffer_h__
|
#define __libardour_waves_midi_buffer_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Gorobchenko Dmytro
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Gorobchenko Dmytro
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Paul Davis
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Gorobchenko Dmytro
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Valeriy amyshniy
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "waves_midi_event.h"
|
#include "waves_midi_event.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Valeriy amyshniy
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Gorobchenko Dmytro
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2014 Waves Audio Ltd.
|
Copyright (C) 2013 Gorobchenko Dmytro
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __WCFourCC_h__
|
#ifndef __WCFourCC_h__
|
||||||
#define __WCFourCC_h__
|
#define __WCFourCC_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#if !defined(__WTByteOrder_h__)
|
#if !defined(__WTByteOrder_h__)
|
||||||
#define __WTByteOrder_h__
|
#define __WTByteOrder_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __WUComPtr_h__
|
#ifndef __WUComPtr_h__
|
||||||
#define __WUComPtr_h__
|
#define __WUComPtr_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __WUDefines_h__
|
#ifndef __WUDefines_h__
|
||||||
#define __WUDefines_h__
|
#define __WUDefines_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __WUMathConsts_h__
|
#ifndef __WUMathConsts_h__
|
||||||
#define __WUMathConsts_h__
|
#define __WUMathConsts_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __WUTypes_h__
|
#ifndef __WUTypes_h__
|
||||||
#define __WUTypes_h__
|
#define __WUTypes_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __IncludeWindows_h__
|
#ifndef __IncludeWindows_h__
|
||||||
#define __IncludeWindows_h__
|
#define __IncludeWindows_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,6 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
// Copyright (c) 2008 Waves Audio Ltd. All rights reserved.
|
||||||
//
|
//
|
||||||
//! \file WCMRAudioDeviceManager.cpp
|
//! \file WCMRAudioDeviceManager.cpp
|
||||||
//!
|
//!
|
||||||
|
|
@ -27,10 +10,6 @@
|
||||||
#include "WCMRAudioDeviceManager.h"
|
#include "WCMRAudioDeviceManager.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//**********************************************************************************************
|
//**********************************************************************************************
|
||||||
// WCMRAudioDevice::WCMRAudioDevice
|
// WCMRAudioDevice::WCMRAudioDevice
|
||||||
//
|
//
|
||||||
|
|
@ -39,27 +18,21 @@
|
||||||
//! and streaming will also be provided by the derived implementations.
|
//! and streaming will also be provided by the derived implementations.
|
||||||
//!
|
//!
|
||||||
//! \param *pManager : The audio device manager that's managing this device.
|
//! \param *pManager : The audio device manager that's managing this device.
|
||||||
//!
|
|
||||||
//! \return Nothing.
|
//! \return Nothing.
|
||||||
//!
|
//!
|
||||||
//**********************************************************************************************
|
//**********************************************************************************************
|
||||||
WCMRAudioDevice::WCMRAudioDevice (WCMRAudioDeviceManager *pManager)
|
WCMRAudioDevice::WCMRAudioDevice (WCMRAudioDeviceManager *pManager) :
|
||||||
|
m_pMyManager (pManager)
|
||||||
|
, m_ConnectionStatus (DeviceDisconnected)
|
||||||
|
, m_IsActive (false)
|
||||||
|
, m_IsStreaming (false)
|
||||||
|
, m_CurrentSamplingRate (-1)
|
||||||
|
, m_CurrentBufferSize (0)
|
||||||
|
, m_LeftMonitorChannel (-1)
|
||||||
|
, m_RightMonitorChannel (-1)
|
||||||
|
, m_MonitorGain (1.0f)
|
||||||
{
|
{
|
||||||
m_pMyManager = pManager;
|
|
||||||
m_DeviceName = "Unknown";
|
m_DeviceName = "Unknown";
|
||||||
|
|
||||||
m_ConnectionStatus = DeviceDisconnected;
|
|
||||||
m_IsActive = false;
|
|
||||||
m_IsStreaming = false;
|
|
||||||
|
|
||||||
m_CurrentSamplingRate = -1;
|
|
||||||
m_CurrentBufferSize = 0;
|
|
||||||
|
|
||||||
m_LeftMonitorChannel = -1;
|
|
||||||
m_RightMonitorChannel = -1;
|
|
||||||
m_MonitorGain = 1.0f;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -565,6 +538,7 @@ uint32_t WCMRAudioDevice::GetLatency (bool isInput)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//**********************************************************************************************
|
//**********************************************************************************************
|
||||||
// WCMRAudioDeviceManager::WCMRAudioDeviceManager
|
// WCMRAudioDeviceManager::WCMRAudioDeviceManager
|
||||||
//
|
//
|
||||||
|
|
@ -576,15 +550,13 @@ uint32_t WCMRAudioDevice::GetLatency (bool isInput)
|
||||||
//!
|
//!
|
||||||
//**********************************************************************************************
|
//**********************************************************************************************
|
||||||
WCMRAudioDeviceManager::WCMRAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient, eAudioDeviceFilter eCurAudioDeviceFilter)
|
WCMRAudioDeviceManager::WCMRAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient, eAudioDeviceFilter eCurAudioDeviceFilter)
|
||||||
: m_pTheClient (pTheClient)
|
: m_eAudioDeviceFilter(eCurAudioDeviceFilter)
|
||||||
, m_eAudioDeviceFilter(eCurAudioDeviceFilter)
|
, m_CurrentDevice(0)
|
||||||
|
, m_pTheClient (pTheClient)
|
||||||
{
|
{
|
||||||
//The derived classes will do lot more init!
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//**********************************************************************************************
|
//**********************************************************************************************
|
||||||
// WCMRAudioDeviceManager::~WCMRAudioDeviceManager
|
// WCMRAudioDeviceManager::~WCMRAudioDeviceManager
|
||||||
//
|
//
|
||||||
|
|
@ -599,19 +571,21 @@ WCMRAudioDeviceManager::~WCMRAudioDeviceManager()
|
||||||
{
|
{
|
||||||
AUTO_FUNC_DEBUG;
|
AUTO_FUNC_DEBUG;
|
||||||
|
|
||||||
|
std::cout << "API::Destroying AudioDeviceManager " << std::endl;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//Need to call release on our devices, and erase them from list
|
// clean up device info list
|
||||||
std::vector<WCMRAudioDevice*>::iterator deviceIter;
|
{
|
||||||
while (m_Devices.size())
|
wvNS::wvThread::ThreadMutex::lock theLock(m_AudioDeviceInfoVecMutex);
|
||||||
{
|
while( m_DeviceInfoVec.size() )
|
||||||
WCMRAudioDevice *pDeviceToRelease = m_Devices.back();
|
{
|
||||||
m_Devices.pop_back();
|
DeviceInfo* devInfo = m_DeviceInfoVec.back();
|
||||||
if (pDeviceToRelease)
|
m_DeviceInfoVec.pop_back();
|
||||||
SAFE_RELEASE (pDeviceToRelease);
|
delete devInfo;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
delete m_CurrentDevice;
|
||||||
|
|
||||||
//The derived classes may want to do additional de-int!
|
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
|
@ -621,109 +595,48 @@ WCMRAudioDeviceManager::~WCMRAudioDeviceManager()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WCMRAudioDevice* WCMRAudioDeviceManager::InitNewCurrentDevice(const std::string & deviceName)
|
||||||
|
|
||||||
//**********************************************************************************************
|
|
||||||
// WCMRAudioDeviceManager::DoIdle_Private
|
|
||||||
//
|
|
||||||
//! Used for idle time processing. This calls each device's DoIdle so that it can perform it's own idle processing.
|
|
||||||
//!
|
|
||||||
//! \param none
|
|
||||||
//!
|
|
||||||
//! \return noErr if no devices have returned an error. An error code if any of the devices returned error.
|
|
||||||
//!
|
|
||||||
//**********************************************************************************************
|
|
||||||
WTErr WCMRAudioDeviceManager::DoIdle_Private()
|
|
||||||
{
|
{
|
||||||
WTErr retVal = eNoErr;
|
return initNewCurrentDeviceImpl(deviceName);
|
||||||
|
}
|
||||||
|
|
||||||
//Need to call DoIdle of all our devices...
|
|
||||||
std::vector<WCMRAudioDevice*>::iterator deviceIter;
|
void WCMRAudioDeviceManager::DestroyCurrentDevice()
|
||||||
for (deviceIter = m_Devices.begin(); deviceIter != m_Devices.end(); deviceIter++)
|
{
|
||||||
|
return destroyCurrentDeviceImpl();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const DeviceInfoVec WCMRAudioDeviceManager::DeviceInfoList() const
|
||||||
|
{
|
||||||
|
wvNS::wvThread::ThreadMutex::lock theLock(m_AudioDeviceInfoVecMutex);
|
||||||
|
return m_DeviceInfoVec;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WTErr WCMRAudioDeviceManager::GetDeviceInfoByName(const std::string & nameToMatch, DeviceInfo & devInfo) const
|
||||||
|
{
|
||||||
|
wvNS::wvThread::ThreadMutex::lock theLock(m_AudioDeviceInfoVecMutex);
|
||||||
|
DeviceInfoVecConstIter iter = m_DeviceInfoVec.begin();
|
||||||
|
for (; iter != m_DeviceInfoVec.end(); ++iter)
|
||||||
{
|
{
|
||||||
WTErr thisDeviceErr = (*deviceIter)->DoIdle();
|
if (nameToMatch == (*iter)->m_DeviceName)
|
||||||
|
{
|
||||||
if (thisDeviceErr != eNoErr)
|
devInfo = *(*iter);
|
||||||
retVal = thisDeviceErr;
|
return eNoErr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (retVal);
|
return eRMResNotFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WTErr WCMRAudioDeviceManager::GetDeviceBufferSizes(const std::string & nameToMatch, std::vector<int>& bufferSizes) const
|
||||||
|
|
||||||
//**********************************************************************************************
|
|
||||||
// WCMRAudioDeviceManager::Devices_Private
|
|
||||||
//
|
|
||||||
//! Retrieve list of devices managed by this manager.
|
|
||||||
//!
|
|
||||||
//! \param none
|
|
||||||
//!
|
|
||||||
//! \return A vector containing the list of devices.
|
|
||||||
//!
|
|
||||||
//**********************************************************************************************
|
|
||||||
const WCMRAudioDeviceList& WCMRAudioDeviceManager::Devices_Private() const
|
|
||||||
{
|
{
|
||||||
return (m_Devices);
|
return getDeviceBufferSizesImpl(nameToMatch, bufferSizes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//**********************************************************************************************
|
|
||||||
// *WCMRAudioDeviceManager::GetDeviceByName_Private
|
|
||||||
//
|
|
||||||
//! Locates a device based on device name.
|
|
||||||
//!
|
|
||||||
//! \param nameToMatch : Device to look for.
|
|
||||||
//!
|
|
||||||
//! \return Pointer to the device object if found, NULL otherwise.
|
|
||||||
//!
|
|
||||||
//**********************************************************************************************
|
|
||||||
WCMRAudioDevice *WCMRAudioDeviceManager::GetDeviceByName_Private(const std::string& nameToMatch) const
|
|
||||||
{
|
|
||||||
//Need to check all our devices...
|
|
||||||
WCMRAudioDevice *pRetVal = NULL;
|
|
||||||
|
|
||||||
WCMRAudioDeviceListConstIter deviceIter;
|
|
||||||
for (deviceIter = m_Devices.begin(); deviceIter != m_Devices.end(); deviceIter++)
|
|
||||||
{
|
|
||||||
if ((*deviceIter)->DeviceName() == nameToMatch)
|
|
||||||
{
|
|
||||||
pRetVal = *deviceIter;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (pRetVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
//**********************************************************************************************
|
|
||||||
// *WCMRAudioDeviceManager::GetDefaultDevice
|
|
||||||
//
|
|
||||||
//! Locates a device based on device name.
|
|
||||||
//!
|
|
||||||
//! \param nameToMatch : Device to look for.
|
|
||||||
//!
|
|
||||||
//! \return Pointer to the device object if found, NULL otherwise.
|
|
||||||
//!
|
|
||||||
//**********************************************************************************************
|
|
||||||
WCMRAudioDevice *WCMRAudioDeviceManager::GetDefaultDevice_Private()
|
|
||||||
{
|
|
||||||
//Need to check all our devices...
|
|
||||||
WCMRAudioDevice *pRetVal = NULL;
|
|
||||||
|
|
||||||
WCMRAudioDeviceListIter deviceIter = m_Devices.begin();
|
|
||||||
if(deviceIter != m_Devices.end())
|
|
||||||
{
|
|
||||||
pRetVal = *deviceIter;
|
|
||||||
}
|
|
||||||
return (pRetVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//**********************************************************************************************
|
//**********************************************************************************************
|
||||||
// WCMRAudioDeviceManager::NotifyClient
|
// WCMRAudioDeviceManager::NotifyClient
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,6 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
// Copyright (c) 2008 Waves Audio Ltd. All rights reserved.
|
||||||
//
|
//
|
||||||
//! \file WCMRAudioDeviceManager.h
|
//! \file WCMRAudioDeviceManager.h
|
||||||
//!
|
//!
|
||||||
|
|
@ -42,19 +25,35 @@
|
||||||
#include "WCRefManager.h"
|
#include "WCRefManager.h"
|
||||||
#include "BasicTypes/WUTypes.h"
|
#include "BasicTypes/WUTypes.h"
|
||||||
#include "WUErrors.h"
|
#include "WUErrors.h"
|
||||||
|
#include "WCThreadSafe.h"
|
||||||
|
|
||||||
#define WCUNUSEDPARAM(a)
|
#define WCUNUSEDPARAM(a)
|
||||||
|
|
||||||
//forward decl.
|
|
||||||
class WCMRAudioConnection;
|
|
||||||
class WCMRAudioDevice;
|
class WCMRAudioDevice;
|
||||||
class WCMRAudioDeviceManager;
|
class WCMRAudioDeviceManager;
|
||||||
|
|
||||||
typedef std::vector<WCMRAudioDevice *> WCMRAudioDeviceList; ///< Vector for audio devices
|
typedef unsigned int DeviceID;
|
||||||
typedef std::vector<WCMRAudioDevice *>::iterator WCMRAudioDeviceListIter; ///< Vector iterator for audio devices
|
|
||||||
typedef std::vector<WCMRAudioDevice *>::const_iterator WCMRAudioDeviceListConstIter; ///< Vector iterator for audio devices
|
|
||||||
typedef std::vector<WCMRAudioConnection *> WCMRAudioConnectionsList; ///< Vector for audio devices
|
|
||||||
|
|
||||||
|
struct DeviceInfo
|
||||||
|
{
|
||||||
|
DeviceID m_DeviceId;
|
||||||
|
std::string m_DeviceName;
|
||||||
|
std::vector<int> m_AvailableSampleRates;
|
||||||
|
unsigned int m_MaxInputChannels;
|
||||||
|
unsigned int m_MaxOutputChannels;
|
||||||
|
|
||||||
|
DeviceInfo():
|
||||||
|
m_DeviceId(-1), m_DeviceName("Unknown"), m_MaxInputChannels(0), m_MaxOutputChannels(0)
|
||||||
|
{};
|
||||||
|
|
||||||
|
DeviceInfo(unsigned int deviceID, const std::string & deviceName):
|
||||||
|
m_DeviceId(deviceID), m_DeviceName(deviceName), m_MaxInputChannels(0), m_MaxOutputChannels(0)
|
||||||
|
{};
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::vector<DeviceInfo*> DeviceInfoVec;
|
||||||
|
typedef DeviceInfoVec::iterator DeviceInfoVecIter;
|
||||||
|
typedef DeviceInfoVec::const_iterator DeviceInfoVecConstIter;
|
||||||
|
|
||||||
/// for notification... A client must derive it's class from us.
|
/// for notification... A client must derive it's class from us.
|
||||||
class WCMRAudioDeviceManagerClient
|
class WCMRAudioDeviceManagerClient
|
||||||
|
|
@ -71,6 +70,7 @@ class WCMRAudioDeviceManagerClient
|
||||||
BufferSizeChanged,
|
BufferSizeChanged,
|
||||||
ClockSourceChanged,
|
ClockSourceChanged,
|
||||||
DeviceStoppedStreaming,
|
DeviceStoppedStreaming,
|
||||||
|
DeviceStartsStreaming,
|
||||||
DeviceDroppedSamples,
|
DeviceDroppedSamples,
|
||||||
DeviceConnectionLost,
|
DeviceConnectionLost,
|
||||||
DeviceGenericError,
|
DeviceGenericError,
|
||||||
|
|
@ -123,7 +123,7 @@ public:
|
||||||
{
|
{
|
||||||
DeviceAvailable,
|
DeviceAvailable,
|
||||||
DeviceDisconnected,
|
DeviceDisconnected,
|
||||||
DeviceError
|
DeviceErrors
|
||||||
};
|
};
|
||||||
|
|
||||||
WCMRAudioDevice (WCMRAudioDeviceManager *pManager);///<Constructor
|
WCMRAudioDevice (WCMRAudioDeviceManager *pManager);///<Constructor
|
||||||
|
|
@ -168,6 +168,8 @@ public:
|
||||||
|
|
||||||
virtual uint32_t GetLatency (bool isInput); ///Get latency.
|
virtual uint32_t GetLatency (bool isInput); ///Get latency.
|
||||||
|
|
||||||
|
virtual WTErr UpdateDeviceInfo () = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
WCMRAudioDeviceManager *m_pMyManager; ///< The manager who's managing this device, can be used for sending notifications!
|
WCMRAudioDeviceManager *m_pMyManager; ///< The manager who's managing this device, can be used for sending notifications!
|
||||||
|
|
||||||
|
|
@ -191,6 +193,7 @@ protected:
|
||||||
float m_MonitorGain; ///< Amount of gain to apply for monitoring signal.
|
float m_MonitorGain; ///< Amount of gain to apply for monitoring signal.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// This enum is for choosing filter for audio devices scan
|
// This enum is for choosing filter for audio devices scan
|
||||||
typedef enum eAudioDeviceFilter
|
typedef enum eAudioDeviceFilter
|
||||||
{
|
{
|
||||||
|
|
@ -202,65 +205,44 @@ typedef enum eAudioDeviceFilter
|
||||||
eAudioDeviceFilterNum // Number of enums
|
eAudioDeviceFilterNum // Number of enums
|
||||||
} eAudioDeviceFilter;
|
} eAudioDeviceFilter;
|
||||||
|
|
||||||
//! WCMRAudioDeviceManager
|
|
||||||
/*! The Audio Device Manager class */
|
|
||||||
class WCMRAudioDeviceManager : public WCRefManager
|
class WCMRAudioDeviceManager : public WCRefManager
|
||||||
{
|
{
|
||||||
private://< Private version of class functions which will be called by class's public function after mutex lock acquistion.
|
|
||||||
WCMRAudioDevice* GetDefaultDevice_Private();
|
|
||||||
WTErr DoIdle_Private();
|
|
||||||
const WCMRAudioDeviceList& Devices_Private() const;
|
|
||||||
WCMRAudioDevice* GetDeviceByName_Private(const std::string & nameToMatch) const;
|
|
||||||
|
|
||||||
public://< Public functions for the class.
|
public://< Public functions for the class.
|
||||||
WCMRAudioDevice* GetDefaultDevice()
|
|
||||||
{
|
|
||||||
//wvNS::wvThread::ThreadMutex::lock theLock(m_AudioDeviceManagerMutex);
|
|
||||||
return GetDefaultDevice_Private();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual WTErr DoIdle()
|
WCMRAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient, eAudioDeviceFilter eCurAudioDeviceFilter); ///< constructor
|
||||||
{
|
|
||||||
//wvNS::wvThread::ThreadMutex::lock theLock(m_AudioDeviceManagerMutex);
|
|
||||||
return DoIdle_Private();
|
|
||||||
}
|
|
||||||
|
|
||||||
const WCMRAudioDeviceList& Devices() const
|
|
||||||
{
|
|
||||||
//wvNS::wvThread::ThreadMutex::lock theLock(m_AudioDeviceManagerMutex);
|
|
||||||
return Devices_Private();
|
|
||||||
}
|
|
||||||
|
|
||||||
WCMRAudioDevice* GetDeviceByName(const std::string & nameToMatch) const
|
|
||||||
{
|
|
||||||
//wvNS::wvThread::ThreadMutex::lock theLock(m_AudioDeviceManagerMutex);
|
|
||||||
return GetDeviceByName_Private(nameToMatch);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
WCMRAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient, eAudioDeviceFilter eCurAudioDeviceFilter
|
|
||||||
); ///< constructor
|
|
||||||
virtual ~WCMRAudioDeviceManager(void); ///< Destructor
|
virtual ~WCMRAudioDeviceManager(void); ///< Destructor
|
||||||
|
|
||||||
virtual WTErr UpdateDeviceList () = 0; //has to be overridden!
|
//interfaces
|
||||||
|
WCMRAudioDevice* InitNewCurrentDevice(const std::string & deviceName);
|
||||||
|
void DestroyCurrentDevice();
|
||||||
|
const DeviceInfoVec DeviceInfoList () const;
|
||||||
|
WTErr GetDeviceInfoByName(const std::string & nameToMatch, DeviceInfo & devInfo) const;
|
||||||
|
WTErr GetDeviceBufferSizes(const std::string & nameToMatch, std::vector<int>& bufferSizes) const;
|
||||||
|
|
||||||
|
//virtual void EnableVerboseLogging(bool /*bEnable*/, const std::string& /*logFilePath*/) { };
|
||||||
|
|
||||||
//This is primarily for use by WCMRAudioDevice and it's descendants... We could have made it
|
//notify backend
|
||||||
//protected and made WCMRAudioDevice a friend, and then in some way found a way to extend
|
void NotifyClient (WCMRAudioDeviceManagerClient::NotificationReason forReason, void *pParam = NULL);
|
||||||
//the friendship to WCMRAudioDevice's descendants, but that would require a lot of extra
|
|
||||||
//effort!
|
|
||||||
void NotifyClient (WCMRAudioDeviceManagerClient::NotificationReason forReason, void *pParam = NULL);
|
|
||||||
virtual void EnableVerboseLogging(bool /*bEnable*/, const std::string& /*logFilePath*/) { };
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
//< NOTE : Mutex protection is commented, but wrapper classes are still there, in case they are required in future.
|
mutable wvNS::wvThread::ThreadMutex m_AudioDeviceInfoVecMutex; // mutex to lock device info list
|
||||||
//wvNS::wvThread::ThreadMutex m_AudioDeviceManagerMutex; ///< Mutex for Audio device manager class function access.
|
DeviceInfoVec m_DeviceInfoVec;
|
||||||
WCMRAudioDeviceManagerClient *m_pTheClient; ///< The device manager's client, used to send notifications.
|
|
||||||
|
|
||||||
WCMRAudioDeviceList m_Devices; ///< List of all relevant devices devices
|
eAudioDeviceFilter m_eAudioDeviceFilter;
|
||||||
eAudioDeviceFilter m_eAudioDeviceFilter; // filter of 'm_Devices'
|
WCMRAudioDevice* m_CurrentDevice;
|
||||||
|
|
||||||
|
private:
|
||||||
|
// override in derived classes
|
||||||
|
// made private to avoid pure virtual function call
|
||||||
|
virtual WCMRAudioDevice* initNewCurrentDeviceImpl(const std::string & deviceName) = 0;
|
||||||
|
virtual void destroyCurrentDeviceImpl() = 0;
|
||||||
|
virtual WTErr getDeviceBufferSizesImpl(const std::string & deviceName, std::vector<int>& bufferSizes) const = 0;
|
||||||
|
virtual WTErr generateDeviceListImpl() = 0;
|
||||||
|
virtual WTErr updateDeviceListImpl() = 0;
|
||||||
|
|
||||||
|
WCMRAudioDeviceManagerClient *m_pTheClient; ///< The device manager's client, used to send notifications.
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //#ifndef __WCMRAudioDeviceManager_h_
|
#endif //#ifndef __WCMRAudioDeviceManager_h_
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,6 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
// Copyright (c) 2008 Waves Audio Ltd. All rights reserved.
|
||||||
//
|
//
|
||||||
//! \file WCMRCoreAudioDeviceManager.cpp
|
//! \file WCMRCoreAudioDeviceManager.cpp
|
||||||
//!
|
//!
|
||||||
|
|
@ -58,6 +41,8 @@ static const int DEFAULT_SR = 44100;
|
||||||
///< The default buffer size.
|
///< The default buffer size.
|
||||||
static const int DEFAULT_BUFFERSIZE = 128;
|
static const int DEFAULT_BUFFERSIZE = 128;
|
||||||
|
|
||||||
|
static const int NONE_DEVICE_ID = -1;
|
||||||
|
|
||||||
///< Number of stalls to wait before notifying user...
|
///< Number of stalls to wait before notifying user...
|
||||||
static const int NUM_STALLS_FOR_NOTIFICATION = 2 * 50; // 2*50 corresponds to 2 * 50 x 42 ms idle timer - about 4 seconds.
|
static const int NUM_STALLS_FOR_NOTIFICATION = 2 * 50; // 2*50 corresponds to 2 * 50 x 42 ms idle timer - about 4 seconds.
|
||||||
static const int CHANGE_CHECK_COUNTER_PERIOD = 100; // 120 corresponds to 120 x 42 ms idle timer - about 4 seconds.
|
static const int CHANGE_CHECK_COUNTER_PERIOD = 100; // 120 corresponds to 120 x 42 ms idle timer - about 4 seconds.
|
||||||
|
|
@ -166,7 +151,7 @@ WCMRCoreAudioDevice::WCMRCoreAudioDevice (WCMRCoreAudioDeviceManager *pManager,
|
||||||
m_CurrentBufferSize = (int)bufferSize;
|
m_CurrentBufferSize = (int)bufferSize;
|
||||||
|
|
||||||
|
|
||||||
UpdateDeviceInfo(true /*updateSRSupported*/, true /* updateBufferSizes */);
|
UpdateDeviceInfo();
|
||||||
|
|
||||||
//should use a valid current SR...
|
//should use a valid current SR...
|
||||||
if (m_SamplingRates.size())
|
if (m_SamplingRates.size())
|
||||||
|
|
@ -253,13 +238,10 @@ WCMRCoreAudioDevice::~WCMRCoreAudioDevice ()
|
||||||
//
|
//
|
||||||
//! Updates Device Information about channels, sampling rates, buffer sizes.
|
//! Updates Device Information about channels, sampling rates, buffer sizes.
|
||||||
//!
|
//!
|
||||||
//! \param updateSRSupported : Is Sampling Rate support needs to be updated.
|
|
||||||
//! \param updateBufferSizes : Is buffer size support needs to be updated.
|
|
||||||
//!
|
|
||||||
//! \return WTErr.
|
//! \return WTErr.
|
||||||
//!
|
//!
|
||||||
//**********************************************************************************************
|
//**********************************************************************************************
|
||||||
WTErr WCMRCoreAudioDevice::UpdateDeviceInfo (bool updateSRSupported, bool updateBufferSizes)
|
WTErr WCMRCoreAudioDevice::UpdateDeviceInfo ()
|
||||||
{
|
{
|
||||||
AUTO_FUNC_DEBUG;
|
AUTO_FUNC_DEBUG;
|
||||||
|
|
||||||
|
|
@ -272,17 +254,8 @@ WTErr WCMRCoreAudioDevice::UpdateDeviceInfo (bool updateSRSupported, bool update
|
||||||
WTErr errSR = eNoErr;
|
WTErr errSR = eNoErr;
|
||||||
WTErr errBS = eNoErr;
|
WTErr errBS = eNoErr;
|
||||||
|
|
||||||
if (updateSRSupported)
|
errSR = UpdateDeviceSampleRates();
|
||||||
{
|
errBS = UpdateDeviceBufferSizes();
|
||||||
errSR = UpdateDeviceSampleRates();
|
|
||||||
}
|
|
||||||
|
|
||||||
//update SR list... This is done conditionally, because some devices may not like
|
|
||||||
//changing the SR later on, just to check on things.
|
|
||||||
if (updateBufferSizes)
|
|
||||||
{
|
|
||||||
errBS = UpdateDeviceBufferSizes();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(errName != eNoErr || errIn != eNoErr || errOut != eNoErr || errSR != eNoErr || errBS != eNoErr)
|
if(errName != eNoErr || errIn != eNoErr || errOut != eNoErr || errSR != eNoErr || errBS != eNoErr)
|
||||||
{
|
{
|
||||||
|
|
@ -786,7 +759,7 @@ WTErr WCMRCoreAudioDevice::SetCurrentSamplingRate (int newRate)
|
||||||
retVal = SetAndCheckCurrentSamplingRate (newRate);
|
retVal = SetAndCheckCurrentSamplingRate (newRate);
|
||||||
if(retVal == eNoErr)
|
if(retVal == eNoErr)
|
||||||
{
|
{
|
||||||
retVal = UpdateDeviceInfo (false/*updateSRSupported*/, true/*updateBufferSizes*/);
|
retVal = UpdateDeviceInfo ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//reactivate it.
|
//reactivate it.
|
||||||
|
|
@ -1759,7 +1732,7 @@ WTErr WCMRCoreAudioDevice::SetActive (bool newState)
|
||||||
m_DropsReported = 0;
|
m_DropsReported = 0;
|
||||||
m_IgnoreThisDrop = true;
|
m_IgnoreThisDrop = true;
|
||||||
|
|
||||||
UpdateDeviceInfo(true /*updateSRSupported */, true /* updateBufferSizes#*/);
|
UpdateDeviceInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2317,14 +2290,10 @@ OSStatus WCMRCoreAudioDevice::GetStreamLatency(AudioDeviceID device, bool isInpu
|
||||||
//! \return Nothing.
|
//! \return Nothing.
|
||||||
//!
|
//!
|
||||||
//**********************************************************************************************
|
//**********************************************************************************************
|
||||||
WCMRCoreAudioDeviceManager::WCMRCoreAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient, eAudioDeviceFilter eCurAudioDeviceFilter
|
WCMRCoreAudioDeviceManager::WCMRCoreAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient,
|
||||||
, bool useMultithreading, eCABS_Method eCABS_method, bool bNocopy)
|
eAudioDeviceFilter eCurAudioDeviceFilter, bool useMultithreading, bool bNocopy)
|
||||||
: WCMRAudioDeviceManager (pTheClient, eCurAudioDeviceFilter
|
: WCMRAudioDeviceManager (pTheClient, eCurAudioDeviceFilter)
|
||||||
)
|
|
||||||
, m_UpdateDeviceListRequested(0)
|
|
||||||
, m_UpdateDeviceListProcessed(0)
|
|
||||||
, m_UseMultithreading (useMultithreading)
|
, m_UseMultithreading (useMultithreading)
|
||||||
, m_eCABS_Method(eCABS_method)
|
|
||||||
, m_bNoCopyAudioBuffer(bNocopy)
|
, m_bNoCopyAudioBuffer(bNocopy)
|
||||||
{
|
{
|
||||||
AUTO_FUNC_DEBUG;
|
AUTO_FUNC_DEBUG;
|
||||||
|
|
@ -2347,13 +2316,13 @@ WCMRCoreAudioDeviceManager::WCMRCoreAudioDeviceManager(WCMRAudioDeviceManagerCli
|
||||||
}
|
}
|
||||||
|
|
||||||
//add a listener to find out when devices change...
|
//add a listener to find out when devices change...
|
||||||
AudioHardwareAddPropertyListener (kAudioHardwarePropertyDevices, StaticPropertyChangeProc, this);
|
AudioHardwareAddPropertyListener (kAudioHardwarePropertyDevices, DevicePropertyChangeCallback, this);
|
||||||
|
|
||||||
//Always add the None device first...
|
//Always add the None device first...
|
||||||
m_Devices.push_back (new WCMRNativeAudioNoneDevice(this));
|
m_NoneDevice = new WCMRNativeAudioNoneDevice(this);
|
||||||
|
|
||||||
//prepare our initial list...
|
//prepare our initial list...
|
||||||
UpdateDeviceList_Private();
|
generateDeviceListImpl();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -2376,25 +2345,7 @@ WCMRCoreAudioDeviceManager::~WCMRCoreAudioDeviceManager()
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AudioHardwareRemovePropertyListener (kAudioHardwarePropertyDevices, StaticPropertyChangeProc);
|
delete m_NoneDevice;
|
||||||
|
|
||||||
//Note: We purposely release the device list here, instead of
|
|
||||||
//depending on the superclass to do it, as by the time the superclass'
|
|
||||||
//destructor executes, we will have called Pa_Terminate()!
|
|
||||||
|
|
||||||
//Need to call release on our devices, and erase them from list
|
|
||||||
std::vector<WCMRAudioDevice*>::iterator deviceIter;
|
|
||||||
while (m_Devices.size())
|
|
||||||
{
|
|
||||||
WCMRAudioDevice *pDeviceToRelease = m_Devices.back();
|
|
||||||
m_Devices.pop_back();
|
|
||||||
|
|
||||||
SAFE_RELEASE (pDeviceToRelease);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//The derived classes may want to do additional de-int!
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
|
@ -2405,119 +2356,241 @@ WCMRCoreAudioDeviceManager::~WCMRCoreAudioDeviceManager()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//**********************************************************************************************
|
WCMRAudioDevice* WCMRCoreAudioDeviceManager::initNewCurrentDeviceImpl(const std::string & deviceName)
|
||||||
// WCMRCoreAudioDeviceManager::StaticPropertyChangeProc
|
|
||||||
//
|
|
||||||
//! The property change listener for the Audio Device Manager. It calls upon (non-static) PropertyChangeProc
|
|
||||||
//! to do the actual work.
|
|
||||||
//!
|
|
||||||
//! \param iPropertyID : the property that has changed.
|
|
||||||
//! \param inClientData : What was supplied at init time.
|
|
||||||
//!
|
|
||||||
//! \return if parameters are incorrect, or the value returned by PropertyChangeProc.
|
|
||||||
//!
|
|
||||||
//**********************************************************************************************
|
|
||||||
OSStatus WCMRCoreAudioDeviceManager::StaticPropertyChangeProc (AudioHardwarePropertyID inPropertyID, void* inClientData)
|
|
||||||
{
|
{
|
||||||
WCMRCoreAudioDeviceManager *pMyManager = (WCMRCoreAudioDeviceManager *)inClientData;
|
destroyCurrentDeviceImpl();
|
||||||
|
|
||||||
if (pMyManager)
|
std::cout << "API::PortAudioDeviceManager::initNewCurrentDevice " << deviceName << std::endl;
|
||||||
return pMyManager->PropertyChangeProc (inPropertyID);
|
if (deviceName == m_NoneDevice->DeviceName() )
|
||||||
|
{
|
||||||
|
m_CurrentDevice = m_NoneDevice;
|
||||||
|
return m_CurrentDevice;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
DeviceInfo devInfo;
|
||||||
|
WTErr err = GetDeviceInfoByName(deviceName, devInfo);
|
||||||
|
|
||||||
|
if (eNoErr == err)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
std::cout << "API::PortAudioDeviceManager::Creating PA device: " << devInfo.m_DeviceId << ", Device Name: " << devInfo.m_DeviceName << std::endl;
|
||||||
|
TRACE_MSG ("API::PortAudioDeviceManager::Creating PA device: " << devInfo.m_DeviceId << ", Device Name: " << devInfo.m_DeviceName);
|
||||||
|
|
||||||
|
m_CurrentDevice = new WCMRCoreAudioDevice (this, devInfo.m_DeviceId, m_UseMultithreading, m_bNoCopyAudioBuffer);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
std::cout << "Unabled to create PA Device: " << devInfo.m_DeviceId << std::endl;
|
||||||
|
DEBUG_MSG ("Unabled to create PA Device: " << devInfo.m_DeviceId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_CurrentDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void WCMRCoreAudioDeviceManager::destroyCurrentDeviceImpl()
|
||||||
//**********************************************************************************************
|
|
||||||
// WCMRCoreAudioDeviceManager::PropertyChangeProc
|
|
||||||
//
|
|
||||||
//! The property change listener for the Audio Device Manager. Currently we only listen for the
|
|
||||||
//! device list change (device arrival/removal, and accordingly cause an update to the device list.
|
|
||||||
//! Note that the actual update happens from the DoIdle() call to prevent multi-threading related issues.
|
|
||||||
//!
|
|
||||||
//! \param
|
|
||||||
//!
|
|
||||||
//! \return Nothing.
|
|
||||||
//!
|
|
||||||
//**********************************************************************************************
|
|
||||||
OSStatus WCMRCoreAudioDeviceManager::PropertyChangeProc (AudioHardwarePropertyID inPropertyID)
|
|
||||||
{
|
{
|
||||||
OSStatus retVal = 0;
|
if (m_CurrentDevice != m_NoneDevice)
|
||||||
switch (inPropertyID)
|
delete m_CurrentDevice;
|
||||||
|
|
||||||
|
m_CurrentDevice = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WTErr WCMRCoreAudioDeviceManager::getDeviceAvailableSampleRates(DeviceID deviceId, std::vector<int>& sampleRates)
|
||||||
|
{
|
||||||
|
AUTO_FUNC_DEBUG;
|
||||||
|
|
||||||
|
WTErr retVal = eNoErr;
|
||||||
|
OSStatus err = kAudioHardwareNoError;
|
||||||
|
UInt32 propSize = 0;
|
||||||
|
|
||||||
|
sampleRates.clear();
|
||||||
|
|
||||||
|
//! 1. Get sample rate property size.
|
||||||
|
err = AudioDeviceGetPropertyInfo(deviceId, 0, 0, kAudioDevicePropertyAvailableNominalSampleRates, &propSize, NULL);
|
||||||
|
if (err == kAudioHardwareNoError)
|
||||||
{
|
{
|
||||||
case kAudioHardwarePropertyDevices:
|
//! 2. Get property: cannels output.
|
||||||
m_UpdateDeviceListRequested++;
|
|
||||||
break;
|
// Allocate size accrding to the number of audio values
|
||||||
default:
|
int numRates = propSize / sizeof(AudioValueRange);
|
||||||
break;
|
AudioValueRange* supportedRates = new AudioValueRange[numRates];
|
||||||
|
|
||||||
|
// Get sampling rates from Audio device
|
||||||
|
err = AudioDeviceGetProperty(deviceId, 0, 0, kAudioDevicePropertyAvailableNominalSampleRates, &propSize, supportedRates);
|
||||||
|
if (err == kAudioHardwareNoError)
|
||||||
|
{
|
||||||
|
//! 3. Update sample rates
|
||||||
|
|
||||||
|
// now iterate through our standard SRs
|
||||||
|
for(int ourSR=0; gAllSampleRates[ourSR] > 0; ourSR++)
|
||||||
|
{
|
||||||
|
//check to see if our SR is in the supported rates...
|
||||||
|
for (int deviceSR = 0; deviceSR < numRates; deviceSR++)
|
||||||
|
{
|
||||||
|
if ((supportedRates[deviceSR].mMinimum <= gAllSampleRates[ourSR]) &&
|
||||||
|
(supportedRates[deviceSR].mMaximum >= gAllSampleRates[ourSR]))
|
||||||
|
{
|
||||||
|
sampleRates.push_back ((int)gAllSampleRates[ourSR]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal = eCoreAudioFailed;
|
||||||
|
DEBUG_MSG("Failed to get device Sample rates. Device Name: " << m_DeviceName.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
delete [] supportedRates;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal = eCoreAudioFailed;
|
||||||
|
DEBUG_MSG("Failed to get device Sample rates property size. Device Name: " << m_DeviceName.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**********************************************************************************************
|
|
||||||
// WCMRCoreAudioDeviceManager::remove_pattern
|
|
||||||
//
|
|
||||||
//! remove a substring from a given string
|
|
||||||
//!
|
|
||||||
//! \param original_str - original string
|
|
||||||
//! \param pattern_str - pattern to find
|
|
||||||
//! \param return_str - the return string - without the pattern substring
|
|
||||||
//!
|
|
||||||
//! \return Nothing.
|
|
||||||
//!
|
|
||||||
//**********************************************************************************************
|
|
||||||
void WCMRCoreAudioDeviceManager::remove_pattern(const std::string& original_str, const std::string& pattern_str, std::string& return_str)
|
|
||||||
{
|
|
||||||
char *orig_c_str = new char[original_str.size() + 1];
|
|
||||||
char* strSavePtr;
|
|
||||||
strcpy(orig_c_str, original_str.c_str());
|
|
||||||
char *p_splited_orig_str = strtok_r(orig_c_str," ", &strSavePtr);
|
|
||||||
|
|
||||||
std::ostringstream stream_str;
|
WTErr WCMRCoreAudioDeviceManager::getDeviceMaxInputChannels(DeviceID deviceId, unsigned int& inputChannels)
|
||||||
while (p_splited_orig_str != 0)
|
{
|
||||||
|
AUTO_FUNC_DEBUG;
|
||||||
|
WTErr retVal = eNoErr;
|
||||||
|
OSStatus err = kAudioHardwareNoError;
|
||||||
|
UInt32 propSize = 0;
|
||||||
|
inputChannels = 0;
|
||||||
|
|
||||||
|
// 1. Get property cannels input size.
|
||||||
|
err = AudioDeviceGetPropertyInfo (deviceId, 0, 1/* Input */, kAudioDevicePropertyStreamConfiguration, &propSize, NULL);
|
||||||
|
if (err == kAudioHardwareNoError)
|
||||||
{
|
{
|
||||||
int cmp_res = strcmp(p_splited_orig_str, pattern_str.c_str()); // might need Ignore case ( stricmp OR strcasecmp)
|
//! 2. Get property: cannels input.
|
||||||
if ( cmp_res != 0)
|
|
||||||
stream_str << p_splited_orig_str << " ";
|
// Allocate size according to the property size. Note that this is a variable sized struct...
|
||||||
p_splited_orig_str = strtok_r(NULL," ", &strSavePtr);
|
AudioBufferList *pStreamBuffers = (AudioBufferList *)malloc(propSize);
|
||||||
|
|
||||||
|
if (pStreamBuffers)
|
||||||
|
{
|
||||||
|
memset (pStreamBuffers, 0, propSize);
|
||||||
|
|
||||||
|
// Get the Input channels
|
||||||
|
err = AudioDeviceGetProperty (deviceId, 0, 1/* Input */, kAudioDevicePropertyStreamConfiguration, &propSize, pStreamBuffers);
|
||||||
|
if (err == kAudioHardwareNoError)
|
||||||
|
{
|
||||||
|
// Calculate the number of input channels
|
||||||
|
for (UInt32 streamIndex = 0; streamIndex < pStreamBuffers->mNumberBuffers; streamIndex++)
|
||||||
|
{
|
||||||
|
inputChannels += pStreamBuffers->mBuffers[streamIndex].mNumberChannels;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal = eCoreAudioFailed;
|
||||||
|
DEBUG_MSG("Failed to get device Input channels. Device Name: " << m_DeviceName.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
free (pStreamBuffers);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal = eMemOutOfMemory;
|
||||||
|
DEBUG_MSG("Faild to allocate memory. Device Name: " << m_DeviceName.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
delete[] orig_c_str;
|
else
|
||||||
return_str = stream_str.str();
|
{
|
||||||
|
retVal = eCoreAudioFailed;
|
||||||
|
DEBUG_MSG("Failed to get device Input channels property size. Device Name: " << m_DeviceName.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//**********************************************************************************************
|
WTErr WCMRCoreAudioDeviceManager::getDeviceMaxOutputChannels(DeviceID deviceId, unsigned int& outputChannels)
|
||||||
// WCMRCoreAudioDeviceManager::UpdateDeviceList_Private
|
|
||||||
//
|
|
||||||
//! Updates the list of devices maintained by the manager. If devices have gone away, they are removed
|
|
||||||
//! if new devices have been connected, they are added to the list.
|
|
||||||
//!
|
|
||||||
//! \param none
|
|
||||||
//!
|
|
||||||
//! \return eNoErr on success, an error code on failure.
|
|
||||||
//!
|
|
||||||
//**********************************************************************************************
|
|
||||||
WTErr WCMRCoreAudioDeviceManager::UpdateDeviceList_Private()
|
|
||||||
{
|
{
|
||||||
AUTO_FUNC_DEBUG;
|
AUTO_FUNC_DEBUG;
|
||||||
|
|
||||||
|
WTErr retVal = eNoErr;
|
||||||
|
OSStatus err = kAudioHardwareNoError;
|
||||||
|
UInt32 propSize = 0;
|
||||||
|
outputChannels = 0;
|
||||||
|
|
||||||
|
//! 1. Get property cannels output size.
|
||||||
|
err = AudioDeviceGetPropertyInfo (deviceId, 0, 0/* Output */, kAudioDevicePropertyStreamConfiguration, &propSize, NULL);
|
||||||
|
if (err == kAudioHardwareNoError)
|
||||||
|
{
|
||||||
|
//! 2. Get property: cannels output.
|
||||||
|
|
||||||
|
// Allocate size according to the property size. Note that this is a variable sized struct...
|
||||||
|
AudioBufferList *pStreamBuffers = (AudioBufferList *)malloc(propSize);
|
||||||
|
if (pStreamBuffers)
|
||||||
|
{
|
||||||
|
memset (pStreamBuffers, 0, propSize);
|
||||||
|
|
||||||
|
// Get the Output channels
|
||||||
|
err = AudioDeviceGetProperty (deviceId, 0, 0/* Output */, kAudioDevicePropertyStreamConfiguration, &propSize, pStreamBuffers);
|
||||||
|
if (err == kAudioHardwareNoError)
|
||||||
|
{
|
||||||
|
// Calculate the number of output channels
|
||||||
|
for (UInt32 streamIndex = 0; streamIndex < pStreamBuffers->mNumberBuffers; streamIndex++)
|
||||||
|
{
|
||||||
|
outputChannels += pStreamBuffers->mBuffers[streamIndex].mNumberChannels;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal = eCoreAudioFailed;
|
||||||
|
DEBUG_MSG("Failed to get device Output channels. Device Name: " << m_DeviceName.c_str());
|
||||||
|
}
|
||||||
|
free (pStreamBuffers);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal = eMemOutOfMemory;
|
||||||
|
DEBUG_MSG("Faild to allocate memory. Device Name: " << m_DeviceName.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal = eCoreAudioFailed;
|
||||||
|
DEBUG_MSG("Failed to get device Output channels property size. Device Name: " << m_DeviceName.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WTErr WCMRCoreAudioDeviceManager::generateDeviceListImpl()
|
||||||
|
{
|
||||||
|
AUTO_FUNC_DEBUG;
|
||||||
|
|
||||||
|
// lock the list first
|
||||||
|
wvNS::wvThread::ThreadMutex::lock theLock(m_AudioDeviceInfoVecMutex);
|
||||||
|
m_DeviceInfoVec.clear();
|
||||||
|
|
||||||
|
//First, get info from None device which is always present
|
||||||
|
if (m_NoneDevice)
|
||||||
|
{
|
||||||
|
DeviceInfo *pDevInfo = new DeviceInfo(NONE_DEVICE_ID, m_NoneDevice->DeviceName() );
|
||||||
|
pDevInfo->m_AvailableSampleRates = m_NoneDevice->SamplingRates();
|
||||||
|
m_DeviceInfoVec.push_back(pDevInfo);
|
||||||
|
}
|
||||||
|
|
||||||
WTErr retVal = eNoErr;
|
WTErr retVal = eNoErr;
|
||||||
OSStatus osErr = noErr;
|
OSStatus osErr = noErr;
|
||||||
AudioDeviceID* deviceIDs = 0;
|
AudioDeviceID* deviceIDs = 0;
|
||||||
size_t reportedDeviceIndex = 0;
|
|
||||||
|
|
||||||
openlog("WCMRCoreAudioDeviceManager", LOG_PID | LOG_CONS, LOG_USER);
|
openlog("WCMRCoreAudioDeviceManager", LOG_PID | LOG_CONS, LOG_USER);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
// Define 2 vectors for input and output - only for eMatchedDuplexDevices case
|
|
||||||
WCMRAudioDeviceList adOnlyIn;
|
|
||||||
WCMRAudioDeviceList adOnlyOut;
|
|
||||||
|
|
||||||
//Get device count...
|
//Get device count...
|
||||||
UInt32 propSize = 0;
|
UInt32 propSize = 0;
|
||||||
osErr = AudioHardwareGetPropertyInfo (kAudioHardwarePropertyDevices, &propSize, NULL);
|
osErr = AudioHardwareGetPropertyInfo (kAudioHardwarePropertyDevices, &propSize, NULL);
|
||||||
|
|
@ -2535,140 +2608,140 @@ WTErr WCMRCoreAudioDeviceManager::UpdateDeviceList_Private()
|
||||||
if (WUIsError(osErr))
|
if (WUIsError(osErr))
|
||||||
throw osErr;
|
throw osErr;
|
||||||
|
|
||||||
//first go through our list of devices, remove the ones that are no longer present...
|
//now add the ones that are not there...
|
||||||
std::vector<WCMRAudioDevice*>::iterator deviceIter;
|
for (size_t deviceIndex = 0; deviceIndex < numDevices; deviceIndex++)
|
||||||
for (deviceIter = m_Devices.begin(); deviceIter != m_Devices.end(); /*This is purposefully blank*/)
|
|
||||||
{
|
{
|
||||||
WCMRCoreAudioDevice *pDeviceToWorkUpon = dynamic_cast<WCMRCoreAudioDevice *>(*deviceIter);
|
DeviceInfo* pDevInfo = 0;
|
||||||
|
|
||||||
//it's possible that the device is actually not a core audio device - perhaps a none device...
|
//Get device name and create new DeviceInfo entry
|
||||||
if (!pDeviceToWorkUpon)
|
//Get property name size.
|
||||||
|
osErr = AudioDeviceGetPropertyInfo(deviceIDs[deviceIndex], 0, 0, kAudioDevicePropertyDeviceName, &propSize, NULL);
|
||||||
|
if (osErr == kAudioHardwareNoError)
|
||||||
{
|
{
|
||||||
deviceIter++;
|
//Get property: name.
|
||||||
continue;
|
char* deviceName = new char[propSize];
|
||||||
}
|
osErr = AudioDeviceGetProperty(deviceIDs[deviceIndex], 0, 0, kAudioDevicePropertyDeviceName, &propSize, deviceName);
|
||||||
|
if (osErr == kAudioHardwareNoError)
|
||||||
AudioDeviceID myDeviceID = pDeviceToWorkUpon->DeviceID();
|
|
||||||
bool deviceFound = false;
|
|
||||||
for (reportedDeviceIndex = 0; reportedDeviceIndex < numDevices; reportedDeviceIndex++)
|
|
||||||
{
|
|
||||||
if (myDeviceID == deviceIDs[reportedDeviceIndex])
|
|
||||||
{
|
{
|
||||||
deviceFound = true;
|
pDevInfo = new DeviceInfo(deviceIDs[deviceIndex], deviceName);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
|
||||||
if (!deviceFound)
|
|
||||||
{
|
|
||||||
//it's no longer there, need to remove it!
|
|
||||||
WCMRAudioDevice *pTheDeviceToErase = *deviceIter;
|
|
||||||
deviceIter = m_Devices.erase (deviceIter);
|
|
||||||
if (pTheDeviceToErase->Active())
|
|
||||||
{
|
{
|
||||||
NotifyClient (WCMRAudioDeviceManagerClient::DeviceConnectionLost);
|
retVal = eCoreAudioFailed;
|
||||||
|
DEBUG_MSG("Failed to get device name. Device ID: " << m_DeviceID);
|
||||||
}
|
}
|
||||||
SAFE_RELEASE (pTheDeviceToErase);
|
|
||||||
|
delete [] deviceName;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
deviceIter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
//now add the ones that are not there...
|
|
||||||
for (reportedDeviceIndex = 0; reportedDeviceIndex < numDevices; reportedDeviceIndex++)
|
|
||||||
{
|
|
||||||
bool deviceFound = false;
|
|
||||||
for (deviceIter = m_Devices.begin(); deviceIter != m_Devices.end(); deviceIter++)
|
|
||||||
{
|
{
|
||||||
WCMRCoreAudioDevice *pDeviceToWorkUpon = dynamic_cast<WCMRCoreAudioDevice *>(*deviceIter);
|
retVal = eCoreAudioFailed;
|
||||||
//it's possible that the device is actually not a core audio device - perhaps a none device...
|
DEBUG_MSG("Failed to get device name property size. Device ID: " << m_DeviceID);
|
||||||
if (!pDeviceToWorkUpon)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (pDeviceToWorkUpon->DeviceID() == deviceIDs[reportedDeviceIndex])
|
|
||||||
{
|
|
||||||
deviceFound = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!deviceFound)
|
if (pDevInfo)
|
||||||
{
|
{
|
||||||
//add it to our list...
|
//Retrieve all the information we need for the device
|
||||||
//build a device object...
|
WTErr wErr = eNoErr;
|
||||||
WCMRCoreAudioDevice *pNewDevice = new WCMRCoreAudioDevice (this, deviceIDs[reportedDeviceIndex], m_UseMultithreading, m_bNoCopyAudioBuffer);
|
|
||||||
bool bDeleteNewDevice = true;
|
|
||||||
|
|
||||||
if (pNewDevice)
|
//Get available sample rates for the device
|
||||||
|
std::vector<int> availableSampleRates;
|
||||||
|
wErr = getDeviceAvailableSampleRates(pDevInfo->m_DeviceId, availableSampleRates);
|
||||||
|
|
||||||
|
if (wErr != eNoErr)
|
||||||
{
|
{
|
||||||
|
DEBUG_MSG ("Failed to get device available sample rates. Device ID: " << m_DeviceID);
|
||||||
|
delete pDevInfo;
|
||||||
|
continue; //proceed to the next device
|
||||||
|
}
|
||||||
|
|
||||||
// Don't delete the new device by default, since most cases use it
|
pDevInfo->m_AvailableSampleRates = availableSampleRates;
|
||||||
bDeleteNewDevice = false;
|
|
||||||
|
|
||||||
// Insert the new device to the device list according to its enum
|
//Get max input channels
|
||||||
switch(m_eAudioDeviceFilter)
|
uint32 maxInputChannels;
|
||||||
{
|
wErr = getDeviceMaxInputChannels(pDevInfo->m_DeviceId, maxInputChannels);
|
||||||
|
|
||||||
|
if (wErr != eNoErr)
|
||||||
|
{
|
||||||
|
DEBUG_MSG ("Failed to get device max input channels count. Device ID: " << m_DeviceID);
|
||||||
|
delete pDevInfo;
|
||||||
|
continue; //proceed to the next device
|
||||||
|
}
|
||||||
|
|
||||||
|
pDevInfo->m_MaxInputChannels = maxInputChannels;
|
||||||
|
|
||||||
|
//Get max output channels
|
||||||
|
uint32 maxOutputChannels;
|
||||||
|
wErr = getDeviceMaxOutputChannels(pDevInfo->m_DeviceId, maxOutputChannels);
|
||||||
|
|
||||||
|
if (wErr != eNoErr)
|
||||||
|
{
|
||||||
|
DEBUG_MSG ("Failed to get device max output channels count. Device ID: " << m_DeviceID);
|
||||||
|
delete pDevInfo;
|
||||||
|
continue; //proceed to the next device
|
||||||
|
}
|
||||||
|
|
||||||
|
pDevInfo->m_MaxOutputChannels = maxOutputChannels;
|
||||||
|
|
||||||
|
//Now check if this device is acceptable according to current input/output settings
|
||||||
|
bool bRejectDevice = false;
|
||||||
|
switch(m_eAudioDeviceFilter)
|
||||||
|
{
|
||||||
case eInputOnlyDevices:
|
case eInputOnlyDevices:
|
||||||
if ((int) pNewDevice->InputChannels().size() != 0)
|
if (pDevInfo->m_MaxInputChannels != 0)
|
||||||
{
|
{
|
||||||
m_Devices.push_back (pNewDevice);
|
m_DeviceInfoVec.push_back(pDevInfo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Delete unnecesarry device
|
// Delete unnecesarry device
|
||||||
bDeleteNewDevice = true;
|
bRejectDevice = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eOutputOnlyDevices:
|
case eOutputOnlyDevices:
|
||||||
if ((int) pNewDevice->OutputChannels().size() != 0)
|
if (pDevInfo->m_MaxOutputChannels != 0)
|
||||||
{
|
{
|
||||||
m_Devices.push_back (pNewDevice);
|
m_DeviceInfoVec.push_back(pDevInfo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Delete unnecesarry device
|
// Delete unnecesarry device
|
||||||
bDeleteNewDevice = true;
|
bRejectDevice = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eFullDuplexDevices:
|
case eFullDuplexDevices:
|
||||||
if ((int) pNewDevice->InputChannels().size() != 0 && (int) pNewDevice->OutputChannels().size() != 0)
|
if (pDevInfo->m_MaxInputChannels != 0 && pDevInfo->m_MaxOutputChannels != 0)
|
||||||
{
|
{
|
||||||
m_Devices.push_back (pNewDevice);
|
m_DeviceInfoVec.push_back(pDevInfo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Delete unnecesarry device
|
// Delete unnecesarry device
|
||||||
bDeleteNewDevice = true;
|
bRejectDevice = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eAllDevices:
|
case eAllDevices:
|
||||||
default:
|
default:
|
||||||
m_Devices.push_back (pNewDevice);
|
m_DeviceInfoVec.push_back(pDevInfo);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bDeleteNewDevice)
|
if(bRejectDevice)
|
||||||
{
|
{
|
||||||
syslog (LOG_NOTICE, "%s rejected, In Channels = %d, Out Channels = %d\n",
|
syslog (LOG_NOTICE, "%s rejected, In Channels = %d, Out Channels = %d\n",
|
||||||
pNewDevice->DeviceName().c_str(), (int) pNewDevice->InputChannels().size(),
|
pDevInfo->m_DeviceName.c_str(), pDevInfo->m_MaxInputChannels, pDevInfo->m_MaxOutputChannels);
|
||||||
(int) pNewDevice->OutputChannels().size());
|
|
||||||
// In case of Input and Output both channels being Zero, we will release memory; since we created CoreAudioDevice but we are Not adding it in list.
|
// In case of Input and Output both channels being Zero, we will release memory; since we created CoreAudioDevice but we are Not adding it in list.
|
||||||
SAFE_RELEASE(pNewDevice);
|
delete pDevInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//If no devices were found, that's not a good thing!
|
//If no devices were found, that's not a good thing!
|
||||||
if (m_Devices.empty())
|
if (m_DeviceInfoVec.empty())
|
||||||
{
|
{
|
||||||
DEBUG_MSG ("No matching CoreAudio devices were found\n");
|
DEBUG_MSG ("No matching CoreAudio devices were found\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_UpdateDeviceListRequested = m_UpdateDeviceListProcessed = 0;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
|
@ -2676,42 +2749,118 @@ WTErr WCMRCoreAudioDeviceManager::UpdateDeviceList_Private()
|
||||||
retVal = eCoreAudioFailed;
|
retVal = eCoreAudioFailed;
|
||||||
}
|
}
|
||||||
|
|
||||||
safe_delete_array(deviceIDs);
|
delete[] deviceIDs;
|
||||||
closelog();
|
closelog();
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WTErr WCMRCoreAudioDeviceManager::updateDeviceListImpl()
|
||||||
//**********************************************************************************************
|
|
||||||
// WCMRCoreAudioDeviceManager::DoIdle
|
|
||||||
//
|
|
||||||
//! Used for idle time processing. This calls each device's DoIdle so that it can perform it's own idle processing.
|
|
||||||
//! Also, if a device list change is detected, it updates the device list.
|
|
||||||
//!
|
|
||||||
//! \param none
|
|
||||||
//!
|
|
||||||
//! \return noErr if no devices have returned an error. An error code if any of the devices returned error.
|
|
||||||
//!
|
|
||||||
//**********************************************************************************************
|
|
||||||
WTErr WCMRCoreAudioDeviceManager::DoIdle()
|
|
||||||
{
|
{
|
||||||
//WTErr retVal = eNoErr;
|
wvNS::wvThread::ThreadMutex::lock theLock(m_AudioDeviceInfoVecMutex);
|
||||||
|
WTErr err = generateDeviceListImpl();
|
||||||
|
|
||||||
|
if (eNoErr != err)
|
||||||
{
|
{
|
||||||
//wvThread::ThreadMutex::lock theLock(m_AudioDeviceManagerMutex);
|
std::cout << "API::PortAudioDeviceManager::updateDeviceListImpl: Device list update error: "<< err << std::endl;
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
//If there's something specific to CoreAudio manager idle handling do it here...
|
if (m_CurrentDevice)
|
||||||
if (m_UpdateDeviceListRequested != m_UpdateDeviceListProcessed)
|
{
|
||||||
|
// if we have device initialized we should find out if this device is still connected
|
||||||
|
DeviceInfo devInfo;
|
||||||
|
WTErr deviceLookUpErr = GetDeviceInfoByName(m_CurrentDevice->DeviceName(), devInfo );
|
||||||
|
|
||||||
|
if (eNoErr != deviceLookUpErr)
|
||||||
{
|
{
|
||||||
m_UpdateDeviceListProcessed = m_UpdateDeviceListRequested;
|
NotifyClient (WCMRAudioDeviceManagerClient::IODeviceDisconnected);
|
||||||
UpdateDeviceList_Private();
|
return err;
|
||||||
NotifyClient (WCMRAudioDeviceManagerClient::DeviceListChanged);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Note that the superclass is going to call all the devices' DoIdle() anyway...
|
NotifyClient (WCMRAudioDeviceManagerClient::DeviceListChanged);
|
||||||
return (WCMRAudioDeviceManager::DoIdle());
|
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WTErr WCMRCoreAudioDeviceManager::getDeviceBufferSizesImpl(const std::string & deviceName, std::vector<int>& bufferSizes) const
|
||||||
|
{
|
||||||
|
AUTO_FUNC_DEBUG;
|
||||||
|
|
||||||
|
WTErr retVal = eNoErr;
|
||||||
|
OSStatus err = kAudioHardwareNoError;
|
||||||
|
UInt32 propSize = 0;
|
||||||
|
|
||||||
|
bufferSizes.clear();
|
||||||
|
|
||||||
|
//first check if the request has been made for None device
|
||||||
|
if (deviceName == m_NoneDevice->DeviceName() )
|
||||||
|
{
|
||||||
|
bufferSizes = m_NoneDevice->BufferSizes();
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
DeviceInfo devInfo;
|
||||||
|
retVal = GetDeviceInfoByName(deviceName, devInfo);
|
||||||
|
|
||||||
|
if (eNoErr == retVal)
|
||||||
|
{
|
||||||
|
// 1. Get buffer size range
|
||||||
|
AudioValueRange bufferSizesRange;
|
||||||
|
propSize = sizeof (AudioValueRange);
|
||||||
|
err = AudioDeviceGetProperty (devInfo.m_DeviceId, 0, 0, kAudioDevicePropertyBufferFrameSizeRange, &propSize, &bufferSizesRange);
|
||||||
|
if(err == kAudioHardwareNoError)
|
||||||
|
{
|
||||||
|
// 2. Run on all ranges and add them to the list
|
||||||
|
for(int bsize=0; gAllBufferSizes[bsize] > 0; bsize++)
|
||||||
|
{
|
||||||
|
if ((bufferSizesRange.mMinimum <= gAllBufferSizes[bsize]) && (bufferSizesRange.mMaximum >= gAllBufferSizes[bsize]))
|
||||||
|
{
|
||||||
|
bufferSizes.push_back (gAllBufferSizes[bsize]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//if we didn't get a single hit, let's simply add the min. and the max...
|
||||||
|
if (bufferSizes.empty())
|
||||||
|
{
|
||||||
|
bufferSizes.push_back ((int)bufferSizesRange.mMinimum);
|
||||||
|
bufferSizes.push_back ((int)bufferSizesRange.mMaximum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal = eCoreAudioFailed;
|
||||||
|
DEBUG_MSG("Failed to get device buffer sizes range. Device Name: " << m_DeviceName.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal = eRMResNotFound;
|
||||||
|
std::cout << "API::PortAudioDeviceManager::GetBufferSizes: Device not found: "<< deviceName << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
OSStatus WCMRCoreAudioDeviceManager::DevicePropertyChangeCallback (AudioHardwarePropertyID inPropertyID, void* inClientData)
|
||||||
|
{
|
||||||
|
switch (inPropertyID)
|
||||||
|
{
|
||||||
|
case kAudioHardwarePropertyDevices:
|
||||||
|
{
|
||||||
|
WCMRCoreAudioDeviceManager* pManager = (WCMRCoreAudioDeviceManager*)inClientData;
|
||||||
|
if (pManager)
|
||||||
|
pManager->updateDeviceListImpl();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,6 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
// Copyright (c) 2008 Waves Audio Ltd. All rights reserved.
|
||||||
//
|
//
|
||||||
//! \file WCMRCoreAudioDeviceManager.h
|
//! \file WCMRCoreAudioDeviceManager.h
|
||||||
//!
|
//!
|
||||||
|
|
@ -138,7 +121,7 @@ protected:
|
||||||
uint32_t m_NextSampleToUse;
|
uint32_t m_NextSampleToUse;
|
||||||
#endif //WV_USE_TONE_GEN
|
#endif //WV_USE_TONE_GEN
|
||||||
|
|
||||||
WTErr UpdateDeviceInfo (bool updateSRSupported, bool updateBufferSizes);
|
WTErr UpdateDeviceInfo ();
|
||||||
WTErr UpdateDeviceName();
|
WTErr UpdateDeviceName();
|
||||||
WTErr UpdateDeviceInputs();
|
WTErr UpdateDeviceInputs();
|
||||||
WTErr UpdateDeviceOutputs();
|
WTErr UpdateDeviceOutputs();
|
||||||
|
|
@ -181,40 +164,28 @@ class WCMRCoreAudioDeviceManager : public WCMRAudioDeviceManager
|
||||||
public:
|
public:
|
||||||
|
|
||||||
WCMRCoreAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient, eAudioDeviceFilter eCurAudioDeviceFilter,
|
WCMRCoreAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient, eAudioDeviceFilter eCurAudioDeviceFilter,
|
||||||
bool useMultithreading = true, eCABS_Method eCABS_method = eCABS_Simple, bool bNocopy = false); ///< constructor
|
bool useMultithreading = true, bool bNocopy = false); ///< constructor
|
||||||
virtual ~WCMRCoreAudioDeviceManager(void); ///< Destructor
|
virtual ~WCMRCoreAudioDeviceManager(void); ///< Destructor
|
||||||
|
|
||||||
|
|
||||||
virtual WTErr UpdateDeviceList() //has to be overridden!
|
|
||||||
{
|
|
||||||
//wvNS::wvThread::ThreadMutex::lock theLock(m_AudioDeviceManagerMutex);
|
|
||||||
return UpdateDeviceList_Private();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual eCABS_Method GetBufferSizeMethod()
|
|
||||||
{
|
|
||||||
//wvNS::wvThread::ThreadMutex::lock theLock(m_AudioDeviceManagerMutex);
|
|
||||||
return GetBufferSizeMethod_Private();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual WTErr DoIdle();
|
|
||||||
|
|
||||||
private:
|
|
||||||
WTErr UpdateDeviceList_Private();
|
|
||||||
eCABS_Method GetBufferSizeMethod_Private() { return m_eCABS_Method; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
static OSStatus DevicePropertyChangeCallback (AudioHardwarePropertyID inPropertyID, void* inClientData);
|
||||||
|
|
||||||
|
virtual WCMRAudioDevice* initNewCurrentDeviceImpl(const std::string & deviceName);
|
||||||
|
virtual void destroyCurrentDeviceImpl();
|
||||||
|
virtual WTErr generateDeviceListImpl();
|
||||||
|
virtual WTErr updateDeviceListImpl();
|
||||||
|
virtual WTErr getDeviceBufferSizesImpl(const std::string & deviceName, std::vector<int>& bufferSizes) const;
|
||||||
|
|
||||||
int m_UpdateDeviceListRequested; ///< Number of times device list change has been detected.
|
|
||||||
int m_UpdateDeviceListProcessed; ///< Number of times device list change has been processed.
|
|
||||||
bool m_UseMultithreading; ///< Flag indicates whether to use multi-threading for audio processing.
|
bool m_UseMultithreading; ///< Flag indicates whether to use multi-threading for audio processing.
|
||||||
bool m_bNoCopyAudioBuffer;
|
bool m_bNoCopyAudioBuffer;
|
||||||
eCABS_Method m_eCABS_Method; // Type of core audio buffer size list method
|
|
||||||
|
|
||||||
static OSStatus StaticPropertyChangeProc (AudioHardwarePropertyID inPropertyID, void* inClientData);
|
private:
|
||||||
OSStatus PropertyChangeProc (AudioHardwarePropertyID inPropertyID);
|
// helper functions for this class only
|
||||||
|
WTErr getDeviceAvailableSampleRates(DeviceID deviceId, std::vector<int>& sampleRates);
|
||||||
|
WTErr getDeviceMaxInputChannels(DeviceID deviceId, unsigned int& inputChannels);
|
||||||
|
WTErr getDeviceMaxOutputChannels(DeviceID deviceId, unsigned int& outputChannels);
|
||||||
|
|
||||||
void remove_pattern(const std::string& original_str, const std::string& pattern_str, std::string& return_str);
|
WCMRAudioDevice* m_NoneDevice;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //#ifndef __WCMRCoreAudioDeviceManager_h_
|
#endif //#ifndef __WCMRCoreAudioDeviceManager_h_
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,6 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
// Copyright (c) 2008 Waves Audio Ltd. All rights reserved.
|
||||||
//
|
//
|
||||||
//! \file WCMRNativeAudio.cpp
|
//! \file WCMRNativeAudio.cpp
|
||||||
//!
|
//!
|
||||||
|
|
@ -136,6 +119,12 @@ WTErr WCMRNativeAudioNoneDevice::SetCurrentBufferSize (int newSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WTErr WCMRNativeAudioNoneDevice::UpdateDeviceInfo ()
|
||||||
|
{
|
||||||
|
return eNoErr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
WTErr WCMRNativeAudioNoneDevice::SetStreaming (bool newState)
|
WTErr WCMRNativeAudioNoneDevice::SetStreaming (bool newState)
|
||||||
{
|
{
|
||||||
if (Streaming() == newState)
|
if (Streaming() == newState)
|
||||||
|
|
@ -144,7 +133,8 @@ WTErr WCMRNativeAudioNoneDevice::SetStreaming (bool newState)
|
||||||
}
|
}
|
||||||
|
|
||||||
WCMRAudioDevice::SetStreaming(newState);
|
WCMRAudioDevice::SetStreaming(newState);
|
||||||
if(Streaming())
|
|
||||||
|
if (Streaming())
|
||||||
{
|
{
|
||||||
if (m_SilenceThread)
|
if (m_SilenceThread)
|
||||||
std::cerr << "\t\t\t\t\t !!!!!!!!!!!!!!! Warning: the inactive NONE-DEVICE was streaming!" << std::endl;
|
std::cerr << "\t\t\t\t\t !!!!!!!!!!!!!!! Warning: the inactive NONE-DEVICE was streaming!" << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,6 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
// Copyright (c) 2008 Waves Audio Ltd. All rights reserved.
|
||||||
//
|
//
|
||||||
//! \file WCMRNativeAudio.h
|
//! \file WCMRNativeAudio.h
|
||||||
//!
|
//!
|
||||||
|
|
@ -42,9 +25,10 @@ class WCMRNativeAudioDevice : public WCMRAudioDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
WCMRNativeAudioDevice (WCMRAudioDeviceManager *pManager, bool useMultithreading = true, bool bNoCopy = false) : WCMRAudioDevice (pManager),
|
WCMRNativeAudioDevice (WCMRAudioDeviceManager *pManager, bool useMultithreading = true, bool bNoCopy = false) :
|
||||||
m_UseMultithreading (useMultithreading),
|
WCMRAudioDevice (pManager)
|
||||||
m_bNoCopyAudioBuffer(bNoCopy)
|
, m_UseMultithreading (useMultithreading)
|
||||||
|
, m_bNoCopyAudioBuffer(bNoCopy)
|
||||||
{}
|
{}
|
||||||
virtual ~WCMRNativeAudioDevice () {}
|
virtual ~WCMRNativeAudioDevice () {}
|
||||||
|
|
||||||
|
|
@ -52,7 +36,6 @@ protected:
|
||||||
bool m_UseMultithreading;
|
bool m_UseMultithreading;
|
||||||
bool m_bNoCopyAudioBuffer; ///< This flag determines whether the audio callback performs a copy of audio, or the source/sink perform the copy. It should be true to let source/sink do the copies.
|
bool m_bNoCopyAudioBuffer; ///< This flag determines whether the audio callback performs a copy of audio, or the source/sink perform the copy. It should be true to let source/sink do the copies.
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -65,6 +48,7 @@ public:
|
||||||
virtual WTErr SetActive (bool newState);///<Prepare/Activate device.
|
virtual WTErr SetActive (bool newState);///<Prepare/Activate device.
|
||||||
virtual WTErr SetStreaming (bool newState);///<Start/Stop Streaming - should reconnect connections when streaming starts!
|
virtual WTErr SetStreaming (bool newState);///<Start/Stop Streaming - should reconnect connections when streaming starts!
|
||||||
virtual WTErr SetCurrentBufferSize (int newSize);///<Change Current Buffer Size : This is a requset, might not be successful at run time!
|
virtual WTErr SetCurrentBufferSize (int newSize);///<Change Current Buffer Size : This is a requset, might not be successful at run time!
|
||||||
|
virtual WTErr UpdateDeviceInfo ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
@ -75,8 +59,8 @@ private:
|
||||||
#else
|
#else
|
||||||
inline void _usleep(uint64_t usec) { ::usleep(usec); }
|
inline void _usleep(uint64_t usec) { ::usleep(usec); }
|
||||||
#endif
|
#endif
|
||||||
static const size_t __m_NumInputChannels = 32;
|
static const size_t __m_NumInputChannels = 0;
|
||||||
static const size_t __m_NumOutputChannels = 32;
|
static const size_t __m_NumOutputChannels = 0;
|
||||||
pthread_t m_SilenceThread;
|
pthread_t m_SilenceThread;
|
||||||
float *_m_inputBuffer;
|
float *_m_inputBuffer;
|
||||||
float *_m_outputBuffer;
|
float *_m_outputBuffer;
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,160 @@
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2008 Waves Audio Ltd. All rights reserved.
|
||||||
|
//
|
||||||
|
//! \file WCMRPortAudioDeviceManager.h
|
||||||
|
//!
|
||||||
|
//! WCMRPortAudioDeviceManager and related class declarations
|
||||||
|
//!
|
||||||
|
//---------------------------------------------------------------------------------*/
|
||||||
|
#ifndef __WCMRPortAudioDeviceManager_h_
|
||||||
|
#define __WCMRPortAudioDeviceManager_h_
|
||||||
|
|
||||||
|
#include "WCMRAudioDeviceManager.h"
|
||||||
|
#include "WCMRNativeAudio.h"
|
||||||
|
#include "portaudio.h"
|
||||||
|
|
||||||
|
//forward decl.
|
||||||
|
class WCMRPortAudioDeviceManager;
|
||||||
|
|
||||||
|
//! Manages a port audio device, providing information
|
||||||
|
//! about the device, and managing audio callbacks.
|
||||||
|
class WCMRPortAudioDevice : public WCMRNativeAudioDevice
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
WCMRPortAudioDevice (WCMRPortAudioDeviceManager *pManager, unsigned int deviceID, bool useMultiThreading = true, bool bNoCopy = false);///<Constructor
|
||||||
|
virtual ~WCMRPortAudioDevice ();///<Destructor
|
||||||
|
|
||||||
|
virtual int CurrentSamplingRate(); ///<Current Sampling rate.?
|
||||||
|
virtual WTErr SetCurrentSamplingRate(int newRate);///<Change Current Sampling Rate : This is a requset, might not be successful at run time!
|
||||||
|
|
||||||
|
virtual int CurrentBufferSize();///<Current Buffer Size.? - note that this may change with change in sampling rate.
|
||||||
|
virtual WTErr SetCurrentBufferSize (int newSize);///<Change Current Buffer Size : This is a requset, might not be successful at run time!
|
||||||
|
|
||||||
|
virtual ConnectionStates ConnectionStatus();///< Connection Status - device available, gone, disconnected
|
||||||
|
|
||||||
|
virtual WTErr SetActive (bool newState);///<Prepare/Activate device.
|
||||||
|
|
||||||
|
virtual WTErr SetStreaming (bool newState);///<Start/Stop Streaming - should reconnect connections when streaming starts!
|
||||||
|
|
||||||
|
virtual WTErr SetMonitorChannels (int leftChannel, int rightChannel);///<Set monitor channels. - optional, will not be available with AG
|
||||||
|
virtual WTErr SetMonitorGain (float newGain);///<Set monitor gain. - optional, will not be available with AG
|
||||||
|
|
||||||
|
virtual WTErr ShowConfigPanel (void *pParam);///< Show Control Panel - in case of ASIO this will work only with Active device!
|
||||||
|
|
||||||
|
virtual int AudioCallback (const float *pInputBuffer, float *pOutputBuffer, unsigned long framesPerBuffe, bool dropsDetectedr);
|
||||||
|
|
||||||
|
virtual WTErr UpdateDeviceInfo ();
|
||||||
|
|
||||||
|
virtual WTErr ResetDevice();
|
||||||
|
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
static long StaticASIOMessageHook (void *pRefCon, long selector, long value, void* message, double* opt);
|
||||||
|
long ASIOMessageHook (long selector, long value, void* message, double* opt);
|
||||||
|
#endif //_WINDOWS
|
||||||
|
|
||||||
|
protected:
|
||||||
|
static DWORD WINAPI __DoIdle__(LPVOID lpThreadParameter);
|
||||||
|
|
||||||
|
// Methods which are executed by device processing thread
|
||||||
|
WTErr DoIdle();///<Do Idle Processing
|
||||||
|
void initDevice();
|
||||||
|
void terminateDevice();
|
||||||
|
void updateDeviceInfo(bool callerIsWaiting = false);
|
||||||
|
void activateDevice(bool callerIsWaiting = false);
|
||||||
|
void deactivateDevice(bool callerIsWaiting = false);
|
||||||
|
void startStreaming(bool callerIsWaiting = false);
|
||||||
|
void stopStreaming(bool callerIsWaiting = false);
|
||||||
|
void resetDevice (bool callerIsWaiting = false);///<Reset device - close and reopen stream, update device information!
|
||||||
|
|
||||||
|
PaError testStateValidness(int sampleRate, int bufferSize);
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
static int TheCallback (const void *pInputBuffer, void *pOutputBuffer, unsigned long framesPerBuffer,
|
||||||
|
const PaStreamCallbackTimeInfo* /*pTimeInfo*/, PaStreamCallbackFlags /*statusFlags*/, void *pUserData );
|
||||||
|
|
||||||
|
unsigned int m_DeviceID; ///< The PA device id
|
||||||
|
PaStream* m_PortAudioStream; ///< Port audio stream, when the device is active!
|
||||||
|
bool m_StopRequested; ///< should be set to true when want to stop, set to false otherwise.
|
||||||
|
const float *m_pInputData; ///< This is what came in with the most recent callback.
|
||||||
|
int m_SampleCounter; ///< The current running sample counter, updated by the audio callback.
|
||||||
|
int m_SampleCountAtLastIdle;
|
||||||
|
|
||||||
|
int m_DropsDetected; ///< Number of times audio drops have been detected so far.
|
||||||
|
int m_DropsReported; ///< Number of times audio drops have been reported so far to the client.
|
||||||
|
bool m_IgnoreThisDrop; ///< Allows disregarding the first drop
|
||||||
|
|
||||||
|
int m_BufferSizeChangeRequested;
|
||||||
|
int m_BufferSizeChangeReported;
|
||||||
|
int m_ResetRequested;
|
||||||
|
int m_ResetReported;
|
||||||
|
int m_ResyncRequested;
|
||||||
|
int m_ResyncReported;
|
||||||
|
|
||||||
|
HANDLE m_hDeviceProcessingThread;
|
||||||
|
DWORD m_DeviceProcessingThreadID;
|
||||||
|
|
||||||
|
///< Backend request events
|
||||||
|
HANDLE m_hResetRequestedEvent;
|
||||||
|
HANDLE m_hResetDone;
|
||||||
|
|
||||||
|
HANDLE m_hUpdateDeviceInfoRequestedEvent;
|
||||||
|
HANDLE m_hUpdateDeviceInfoDone;
|
||||||
|
|
||||||
|
HANDLE m_hActivateRequestedEvent;
|
||||||
|
HANDLE m_hActivationDone;
|
||||||
|
|
||||||
|
HANDLE m_hDeActivateRequestedEvent;
|
||||||
|
HANDLE m_hDeActivationDone;
|
||||||
|
|
||||||
|
HANDLE m_hStartStreamingRequestedEvent;
|
||||||
|
HANDLE m_hStartStreamingDone;
|
||||||
|
|
||||||
|
HANDLE m_hStopStreamingRequestedEvent;
|
||||||
|
HANDLE m_hStopStreamingDone;
|
||||||
|
/////////////////////////
|
||||||
|
|
||||||
|
///< Device request events
|
||||||
|
HANDLE m_hResetFromDevRequestedEvent;
|
||||||
|
HANDLE m_hBufferSizeChangedEvent;
|
||||||
|
HANDLE m_hSampleRateChangedEvent;
|
||||||
|
/////////////////////////////
|
||||||
|
|
||||||
|
///< Sync events
|
||||||
|
HANDLE m_hDeviceInitialized;
|
||||||
|
HANDLE m_hExitIdleThread;
|
||||||
|
|
||||||
|
//Should be set if the device connection status is "DeviceErrors"
|
||||||
|
WTErr m_lastErr;
|
||||||
|
};
|
||||||
|
|
||||||
|
//! WCMRPortAudioDeviceManager
|
||||||
|
/*! The PortAudio Device Manager class */
|
||||||
|
class WCMRPortAudioDeviceManager : public WCMRAudioDeviceManager
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
WCMRPortAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient, eAudioDeviceFilter eCurAudioDeviceFilter,
|
||||||
|
bool useMultithreading = true, bool bNocopy = false); ///< constructor
|
||||||
|
|
||||||
|
virtual ~WCMRPortAudioDeviceManager(void); ///< destructor
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
virtual WCMRAudioDevice* initNewCurrentDeviceImpl(const std::string & deviceName);
|
||||||
|
virtual void destroyCurrentDeviceImpl();
|
||||||
|
virtual WTErr generateDeviceListImpl(); // use this in derived class to fill device list
|
||||||
|
virtual WTErr updateDeviceListImpl() {return eNoErr; } // not supported
|
||||||
|
virtual WTErr getDeviceBufferSizesImpl(const std::string & deviceName, std::vector<int>& buffers) const;
|
||||||
|
|
||||||
|
bool m_UseMultithreading; ///< Flag indicates whether to use multi-threading for audio processing.
|
||||||
|
bool m_bNoCopyAudioBuffer;
|
||||||
|
|
||||||
|
private:
|
||||||
|
// helper functions for this class only
|
||||||
|
WTErr getDeviceAvailableSampleRates(DeviceID deviceId, std::vector<int>& sampleRates);
|
||||||
|
|
||||||
|
WCMRAudioDevice* m_NoneDevice;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //#ifndef __WCMRPortAudioDeviceManager_h_
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __MinMaxUtilities_h__
|
#ifndef __MinMaxUtilities_h__
|
||||||
#define __MinMaxUtilities_h__
|
#define __MinMaxUtilities_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include "IncludeWindows.h"
|
#include "IncludeWindows.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __UMicroseconds_h__
|
#ifndef __UMicroseconds_h__
|
||||||
#define __UMicroseconds_h__
|
#define __UMicroseconds_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __WCFixedString_h__
|
#ifndef __WCFixedString_h__
|
||||||
#define __WCFixedString_h__
|
#define __WCFixedString_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __WUErrors_h__
|
#ifndef __WUErrors_h__
|
||||||
#define __WUErrors_h__
|
#define __WUErrors_h__
|
||||||
|
|
||||||
|
|
@ -53,6 +35,7 @@ const WTErr eAppTerminateFailed = -23; //!< failed to terminate an appl
|
||||||
const WTErr eAppReturnedError = -24; //!< Non zero exit code from application
|
const WTErr eAppReturnedError = -24; //!< Non zero exit code from application
|
||||||
const WTErr eNotImplemented = -25; //!< Function is not implmemented
|
const WTErr eNotImplemented = -25; //!< Function is not implmemented
|
||||||
const WTErr eNotEmpty = -26; //!< Something was expected to be empty but is not
|
const WTErr eNotEmpty = -26; //!< Something was expected to be empty but is not
|
||||||
|
const WTErr eAsioFailed = -27;
|
||||||
|
|
||||||
// File Manager errors
|
// File Manager errors
|
||||||
const WTErr eFMNoSuchVolume = -1001;
|
const WTErr eFMNoSuchVolume = -1001;
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __safe_delete_h__
|
#ifndef __safe_delete_h__
|
||||||
#define __safe_delete_h__
|
#define __safe_delete_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#include "WCRefManager.h"
|
#include "WCRefManager.h"
|
||||||
|
|
||||||
/// Construcotr.
|
/// Construcotr.
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef WCREFMANAGER_H
|
#ifndef WCREFMANAGER_H
|
||||||
#define WCREFMANAGER_H
|
#define WCREFMANAGER_H
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#include "Threads/WCThreadSafe.h"
|
#include "Threads/WCThreadSafe.h"
|
||||||
|
|
||||||
#if XPLATFORMTHREADS_WINDOWS
|
#if XPLATFORMTHREADS_WINDOWS
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __WCThreadSafe_h_
|
#ifndef __WCThreadSafe_h_
|
||||||
#define __WCThreadSafe_h_
|
#define __WCThreadSafe_h_
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __WavesPublicAPI_Defines_h__
|
#ifndef __WavesPublicAPI_Defines_h__
|
||||||
#define __WavesPublicAPI_Defines_h__
|
#define __WavesPublicAPI_Defines_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,5 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Copyright (c) 2011 Waves Audio Ltd. All rights reserved.
|
||||||
// \file WTErr.h, defines basic error type and "No Error" code
|
// \file WTErr.h, defines basic error type and "No Error" code
|
||||||
// All users may use their own error codes with this type, as long as eNoErr remains defined here
|
// All users may use their own error codes with this type, as long as eNoErr remains defined here
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2013 Waves Audio Ltd.
|
|
||||||
|
|
||||||
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
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifndef __stdint_h__
|
#ifndef __stdint_h__
|
||||||
#define __stdint_h__
|
#define __stdint_h__
|
||||||
|
|
||||||
|
|
|
||||||
83
libs/backends/wavesaudio/wscript
Normal file → Executable file
83
libs/backends/wavesaudio/wscript
Normal file → Executable file
|
|
@ -19,14 +19,18 @@ def options(opt):
|
||||||
autowaf.set_options(opt)
|
autowaf.set_options(opt)
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
|
if conf.options.dist_target == 'mingw':
|
||||||
|
autowaf.check_pkg(conf, 'portaudio-2.0', uselib_store='PORTAUDIO',
|
||||||
|
atleast_version='19')
|
||||||
autowaf.configure(conf)
|
autowaf.configure(conf)
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
obj = bld(features = 'c cxx cxxshlib')
|
|
||||||
if bld.env['build_target'] == 'mountain_lion':
|
if bld.env['build_target'] == 'mingw':
|
||||||
obj.framework = 'CoreMidi'
|
obj = bld(features = 'cxx cxxshlib')
|
||||||
else:
|
else:
|
||||||
obj.framework = 'CoreMIDI'
|
obj = bld(features = 'cxx cxxshlib', framework = ["CoreMidi"])
|
||||||
|
|
||||||
obj.source = [
|
obj.source = [
|
||||||
'waves_audiobackend.cc',
|
'waves_audiobackend.cc',
|
||||||
'waves_audiobackend.latency.cc',
|
'waves_audiobackend.latency.cc',
|
||||||
|
|
@ -41,34 +45,59 @@ def build(bld):
|
||||||
'waves_midi_buffer.cc',
|
'waves_midi_buffer.cc',
|
||||||
'wavesapi/refmanager/WCRefManager.cpp',
|
'wavesapi/refmanager/WCRefManager.cpp',
|
||||||
'wavesapi/devicemanager/WCMRAudioDeviceManager.cpp',
|
'wavesapi/devicemanager/WCMRAudioDeviceManager.cpp',
|
||||||
'wavesapi/devicemanager/WCMRCoreAudioDeviceManager.cpp',
|
|
||||||
'wavesapi/devicemanager/WCMRNativeAudio.cpp',
|
'wavesapi/devicemanager/WCMRNativeAudio.cpp',
|
||||||
'wavesapi/threads/WCThreadSafe.cpp',
|
'wavesapi/threads/WCThreadSafe.cpp',
|
||||||
'portmidi/src/pm_common/pmutil.c',
|
'portmidi/src/pm_common/pmutil.c',
|
||||||
'portmidi/src/pm_common/portmidi.c',
|
'portmidi/src/pm_common/portmidi.c'
|
||||||
'portmidi/src/pm_mac/pmmac.c',
|
|
||||||
'portmidi/src/pm_mac/pmmacosxcm.c',
|
|
||||||
'portmidi/src/pm_mac/finddefault.c',
|
|
||||||
'portmidi/src/pm_mac/readbinaryplist.c',
|
|
||||||
'portmidi/src/porttime/ptmacosx_mach.c'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env['build_target'] == 'mingw':
|
||||||
|
platform_dependent = [
|
||||||
|
'wavesapi/miscutils/UMicroseconds.cpp',
|
||||||
|
'wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp',
|
||||||
|
'portmidi/src/pm_win/pmwin.c',
|
||||||
|
'portmidi/src/pm_win/pmwinmm.c',
|
||||||
|
'portmidi/src/porttime/ptwinmm.c'
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
platform_dependent = [
|
||||||
|
'wavesapi/devicemanager/WCMRCoreAudioDeviceManager.cpp',
|
||||||
|
'portmidi/src/pm_mac/pmmac.c',
|
||||||
|
'portmidi/src/pm_mac/pmmacosxcm.c',
|
||||||
|
'portmidi/src/pm_mac/finddefault.c',
|
||||||
|
'portmidi/src/pm_mac/readbinaryplist.c',
|
||||||
|
'portmidi/src/porttime/ptmacosx_mach.c'
|
||||||
|
]
|
||||||
|
|
||||||
|
obj.source.extend(platform_dependent)
|
||||||
|
|
||||||
obj.includes = ['.',
|
obj.includes = ['.',
|
||||||
'wavesapi',
|
'wavesapi',
|
||||||
'wavesapi/refmanager',
|
'wavesapi/refmanager',
|
||||||
'wavesapi/wavespublicapi',
|
'wavesapi/wavespublicapi',
|
||||||
'wavesapi/devicemanager',
|
'wavesapi/devicemanager',
|
||||||
'wavesapi/miscutils',
|
'wavesapi/miscutils',
|
||||||
'portmidi',
|
'wavesapi/threads',
|
||||||
'portmidi/src/pm_common'
|
'portmidi',
|
||||||
]
|
'portmidi/src/pm_common'
|
||||||
|
]
|
||||||
|
|
||||||
obj.cxxflags = [ '-fPIC' ]
|
obj.cxxflags = [ '-fPIC' ]
|
||||||
obj.cflags = [ '-fPIC', '-fms-extensions' ]
|
|
||||||
obj.name = 'waves_audiobackend'
|
obj.name = 'waves_audiobackend'
|
||||||
obj.target = 'waves_audiobackend'
|
obj.target = 'waves_audiobackend'
|
||||||
obj.use = [ 'libardour', 'libpbd' ]
|
obj.use = 'libardour libpbd'
|
||||||
|
if bld.env['build_target'] == 'mingw':
|
||||||
|
obj.uselib = ['PORTAUDIO']
|
||||||
obj.vnum = WAVESAUDIOBACKEND_VERSION
|
obj.vnum = WAVESAUDIOBACKEND_VERSION
|
||||||
obj.install_path = os.path.join(bld.env['LIBDIR'], 'backends')
|
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'backends')
|
||||||
obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"',
|
|
||||||
'__MACOS__',
|
if bld.env['build_target']== 'mingw':
|
||||||
'ARDOURBACKEND_DLL_EXPORTS'
|
obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"',
|
||||||
]
|
'_WINDOWS',
|
||||||
|
'ARDOURBACKEND_DLL_EXPORTS'
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"',
|
||||||
|
'__MACOS__',
|
||||||
|
'ARDOURBACKEND_DLL_EXPORTS'
|
||||||
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue