Commit 7241a9ec authored by sletz's avatar sletz
Browse files

Update Windows PortAudio and JackRouter DLL.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4737 0c269be4-1314-0410-8aa9-9f06e86f4224
parent f25c4b0e
......@@ -342,11 +342,11 @@ void JackRouter::processInputs()
{
int pos = (fToggle) ? 0 : fBufferSize;
for (i = 0; i < fActiveInputs; i++) {
for (int i = 0; i < fActiveInputs; i++) {
if (!fFloatSample) {
jack_default_audio_sample_t* buffer = (jack_default_audio_sample_t*)jack_port_get_buffer(fInputPorts[i], fBufferSize);
long* in = (long*)fInputBuffers[i] + pos;
for (j = 0; j < fBufferSize; j++) {
for (int j = 0; j < fBufferSize; j++) {
in[j] = buffer[j] * jack_default_audio_sample_t(0x7fffffff);
}
} else {
......@@ -362,12 +362,12 @@ void JackRouter::processOutputs()
{
int pos = (fToggle) ? 0 : fBufferSize;
for (i = 0; i < fActiveOutputs; i++) {
for (int i = 0; i < fActiveOutputs; i++) {
if (!fFloatSample) {
jack_default_audio_sample_t* buffer = (jack_default_audio_sample_t*)jack_port_get_buffer(fOutputPorts[i], fBufferSize);
long* out = (long*)fOutputBuffers[i] + pos;
jack_default_audio_sample_t gain = jack_default_audio_sample_t(1)/jack_default_audio_sample_t(0x7fffffff);
for (j = 0; j < fBufferSize; j++) {
for (int j = 0; j < fBufferSize; j++) {
buffer[j] = out[j] * gain;
}
} else {
......
......@@ -19,8 +19,8 @@
<Add directory="..\common" />
</Compiler>
<Linker>
<Add library="libjack64" />
<Add directory="Release64\bin" />
<Add library="libjack64" />
</Linker>
</Target>
<Target title="Win32 Debug 64bits">
......@@ -36,8 +36,8 @@
<Add directory="..\common" />
</Compiler>
<Linker>
<Add library="libjack64" />
<Add directory="Debug64\bin" />
<Add library="libjack64" />
</Linker>
</Target>
<Target title="Win32 Profiling 64bits">
......@@ -54,11 +54,11 @@
<Add directory="..\common" />
</Compiler>
<Linker>
<Add library="libjack64" />
<Add directory="Release64\bin" />
<Add library="libjack64" />
</Linker>
</Target>
<Target title="Win32 Release 32bits">
<Target title="Win32 Release 32bits">
<Option output="Release\bin\jack_unload" prefix_auto="1" extension_auto="1" />
<Option object_output="Release\" />
<Option type="1" />
......@@ -66,15 +66,15 @@
<Compiler>
<Add option="-O2" />
<Add option="-Wall" />
<Add option="-m32" />
<Add option="-m32" />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
<Add directory="..\common" />
</Compiler>
<Linker>
<Add option="-m32" />
<Add library="libjack" />
<Add directory="Release\bin" />
<Add option="-m32" />
<Add library="libjack" />
</Linker>
</Target>
<Target title="Win32 Debug 32bits">
......@@ -85,15 +85,15 @@
<Compiler>
<Add option="-Wall" />
<Add option="-g" />
<Add option="-m32" />
<Add option="-m32" />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
<Add directory="..\common" />
</Compiler>
<Linker>
<Add option="-m32" />
<Add library="libjack" />
<Add directory="Debug\bin" />
<Add option="-m32" />
<Add library="libjack" />
</Linker>
</Target>
<Target title="Win32 Profiling 32bits">
......@@ -104,16 +104,16 @@
<Compiler>
<Add option="-O2" />
<Add option="-Wall" />
<Add option="-m32" />
<Add option="-m32" />
<Add option="-DJACK_MONITOR" />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
<Add directory="..\common" />
</Compiler>
<Linker>
<Add option="-m32" />
<Add library="libjack" />
<Add directory="Release\bin" />
<Add option="-m32" />
<Add library="libjack" />
</Linker>
</Target>
</Build>
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="jack">
<Project filename="libjack.cbp" />
<Project filename="libjack.cbp" active="1" />
<Project filename="libjacknet.cbp" />
<Project filename="libjackserver.cbp" />
<Project filename="jack_portaudio.cbp" />
......@@ -13,7 +13,7 @@
<Project filename="jack_load.cbp" />
<Project filename="jack_unload.cbp" />
<Project filename="jack_lsp.cbp" />
<Project filename="jack_latent_client.cbp" active="1" />
<Project filename="jack_latent_client.cbp" />
<Project filename="jack_metro.cbp" />
<Project filename="jack_connect.cbp" />
<Project filename="jack_disconnect.cbp" />
......
......@@ -298,6 +298,7 @@
<Add library="uuid" />
<Add library="odbc32" />
<Add library="odbccp32" />
<Add library="winmm" />
</Linker>
<Unit filename="..\common\JackAPI.cpp" />
<Unit filename="..\common\JackActivationCount.cpp" />
......
......@@ -224,6 +224,7 @@
<Add library="odbc32" />
<Add library="odbccp32" />
<Add library="ws2_32" />
<Add library="winmm" />
</Linker>
<Unit filename="..\common\JackAudioAdapterInterface.cpp" />
<Unit filename="..\common\JackException.cpp" />
......
......@@ -242,6 +242,7 @@
<Add library="odbc32" />
<Add library="odbccp32" />
<Add library="ws2_32" />
<Add library="winmm" />
</Linker>
<Unit filename="..\common\JackAPI.cpp" />
<Unit filename="..\common\JackActivationCount.cpp" />
......
#ifndef PA_ASIO_H
#define PA_ASIO_H
/*
* $Id: pa_asio.h,v 1.1.2.2 2006/06/20 14:44:48 letz Exp $
* $Id: pa_asio.h 1667 2011-05-02 15:49:20Z rossb $
* PortAudio Portable Real-Time Audio Library
* ASIO specific extensions
*
......@@ -18,10 +18,6 @@
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* Any person wishing to distribute modifications to the Software is
* requested to send the modifications to the original developer so that
* they can be incorporated into the canonical version.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
......@@ -29,14 +25,25 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* The text above constitutes the entire PortAudio license; however,
* the PortAudio community also makes the following non-binding requests:
*
* Any person wishing to distribute modifications to the Software is
* requested to send the modifications to the original developer so that
* they can be incorporated into the canonical version. It is also
* requested that these non-binding requests be included along with the
* license above.
*/
/** @file
@ingroup public_header
@brief ASIO-specific PortAudio API extension header file.
*/
#include "portaudio.h"
#ifdef __cplusplus
......@@ -45,75 +52,95 @@ extern "C"
#endif /* __cplusplus */
/** Retrieve legal latency settings for the specificed device, in samples.
@param device The global index of the device about which the query is being made.
@param minLatency A pointer to the location which will recieve the minimum latency value.
@param maxLatency A pointer to the location which will recieve the maximum latency value.
@param preferredLatency A pointer to the location which will recieve the preferred latency value.
@param granularity A pointer to the location which will recieve the granularity. This value
determines which values between minLatency and maxLatency are available. ie the step size,
if granularity is -1 then available latency settings are powers of two.
@see ASIOGetBufferSize in the ASIO SDK.
@todo This function should have a better name, any suggestions?
*/
PaError PaAsio_GetAvailableLatencyValues( PaDeviceIndex device,
long *minLatency, long *maxLatency, long *preferredLatency, long *granularity );
/** Retrieve legal native buffer sizes for the specificed device, in sample frames.
@param device The global index of the device about which the query is being made.
@param minBufferSizeFrames A pointer to the location which will receive the minimum buffer size value.
@param maxBufferSizeFrames A pointer to the location which will receive the maximum buffer size value.
@param preferredBufferSizeFrames A pointer to the location which will receive the preferred buffer size value.
@param granularity A pointer to the location which will receive the "granularity". This value determines
the step size used to compute the legal values between minBufferSizeFrames and maxBufferSizeFrames.
If granularity is -1 then available buffer size values are powers of two.
/** Display the ASIO control panel for the specified device.
@param device The global index of the device whose control panel is to be displayed.
@param systemSpecific On Windows, the calling application's main window handle,
on Macintosh this value should be zero.
*/
PaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific );
@see ASIOGetBufferSize in the ASIO SDK.
@note: this function used to be called PaAsio_GetAvailableLatencyValues. There is a
#define that maps PaAsio_GetAvailableLatencyValues to this function for backwards compatibility.
*/
PaError PaAsio_GetAvailableBufferSizes( PaDeviceIndex device,
long *minBufferSizeFrames, long *maxBufferSizeFrames, long *preferredBufferSizeFrames, long *granularity );
/** Backwards compatibility alias for PaAsio_GetAvailableBufferSizes
/** Retrieve a pointer to a string containing the name of the specified
input channel. The string is valid until Pa_Terminate is called.
The string will be no longer than 32 characters including the null terminator.
*/
PaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,
const char** channelName );
@see PaAsio_GetAvailableBufferSizes
*/
#define PaAsio_GetAvailableLatencyValues PaAsio_GetAvailableBufferSizes
/** Retrieve a pointer to a string containing the name of the specified
input channel. The string is valid until Pa_Terminate is called.
The string will be no longer than 32 characters including the null terminator.
*/
PaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,
const char** channelName );
/** Display the ASIO control panel for the specified device.
@param device The global index of the device whose control panel is to be displayed.
@param systemSpecific On Windows, the calling application's main window handle,
on Macintosh this value should be zero.
*/
PaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific );
/** Retrieve a pointer to a string containing the name of the specified
input channel. The string is valid until Pa_Terminate is called.
The string will be no longer than 32 characters including the null terminator.
*/
PaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,
const char** channelName );
/** Retrieve a pointer to a string containing the name of the specified
input channel. The string is valid until Pa_Terminate is called.
The string will be no longer than 32 characters including the null terminator.
*/
PaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,
const char** channelName );
/** Set the sample rate of an open paASIO stream.
@param stream The stream to operate on.
@param sampleRate The new sample rate.
Note that this function may fail if the stream is alredy running and the
ASIO driver does not support switching the sample rate of a running stream.
Returns paIncompatibleStreamHostApi if stream is not a paASIO stream.
*/
PaError PaAsio_SetStreamSampleRate( PaStream* stream, double sampleRate );
#define paAsioUseChannelSelectors (0x01)
typedef struct PaAsioStreamInfo {
unsigned long size; /**< sizeof(PaAsioStreamInfo) */
PaHostApiTypeId hostApiType; /**< paASIO */
unsigned long version; /**< 1 */
unsigned long flags;
/* Support for opening only specific channels of an ASIO device.
If the paAsioUseChannelSelectors flag is set, channelSelectors is a
pointer to an array of integers specifying the device channels to use.
When used, the length of the channelSelectors array must match the
corresponding channelCount parameter to Pa_OpenStream() otherwise a
crash may result.
The values in the selectors array must specify channels within the
range of supported channels for the device or paInvalidChannelCount will
result.
*/
int *channelSelectors;
}
PaAsioStreamInfo;
typedef struct PaAsioStreamInfo{
unsigned long size; /**< sizeof(PaAsioStreamInfo) */
PaHostApiTypeId hostApiType; /**< paASIO */
unsigned long version; /**< 1 */
unsigned long flags;
/* Support for opening only specific channels of an ASIO device.
If the paAsioUseChannelSelectors flag is set, channelSelectors is a
pointer to an array of integers specifying the device channels to use.
When used, the length of the channelSelectors array must match the
corresponding channelCount parameter to Pa_OpenStream() otherwise a
crash may result.
The values in the selectors array must specify channels within the
range of supported channels for the device or paInvalidChannelCount will
result.
*/
int *channelSelectors;
}PaAsioStreamInfo;
#ifdef __cplusplus
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment