Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/paex_read_write_wire.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ int main(void)
int numChannels;

printf("patest_read_write_wire.c\n"); fflush(stdout);
printf("sizeof(int) = %lu\n", sizeof(int)); fflush(stdout);
printf("sizeof(long) = %lu\n", sizeof(long)); fflush(stdout);
printf("sizeof(int) = %lu\n", (unsigned long) sizeof(int)); fflush(stdout);
printf("sizeof(long) = %lu\n", (unsigned long) sizeof(long)); fflush(stdout);

err = Pa_Initialize();
if( err != paNoError ) goto error2;
Expand Down
1 change: 0 additions & 1 deletion qa/loopback/src/paqa.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,6 @@ static int PaQa_AnalyzeLoopbackConnection( UserOptions *userOptions, PaDeviceInd
int iRate;
int iSize;
int iFormat;
int savedValue;
TestParameters testParams;
const PaDeviceInfo *inputDeviceInfo = Pa_GetDeviceInfo( inputDevice );
const PaDeviceInfo *outputDeviceInfo = Pa_GetDeviceInfo( outputDevice );
Expand Down
2 changes: 1 addition & 1 deletion qa/paqa_devs.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static int gNumFailed = 0;
static float NextSineSample( PaQaData *data )
{
float phase = data->phase + PHASE_INCREMENT;
if( phase > M_PI ) phase -= 2.0 * M_PI;
if( phase > M_PI ) phase -= (float) (2.0 * M_PI);
data->phase = phase;
return sinf(phase) * SINE_AMPLITUDE;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hostapi/jack/pa_jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
stream->isBlockingStream = !streamCallback;
if( stream->isBlockingStream )
{
float latency = 0.001; /* 1ms is the absolute minimum we support */
float latency = 0.001f; /* 1ms is the absolute minimum we support */
int minimum_buffer_frames = 0;

if( inputParameters && inputParameters->suggestedLatency > latency )
Expand Down
13 changes: 7 additions & 6 deletions test/patest_dsound_find_best_latency_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,17 @@
* license above.
*/

#define _WIN32_WINNT 0x0501 /* for GetNativeSystemInfo */

#include <stdio.h>
#include <time.h>
#include <math.h>

#define _WIN32_WINNT 0x0501 /* for GetNativeSystemInfo */
#include <windows.h>
//#include <mmsystem.h> /* required when using pa_win_wmme.h */

#include <conio.h> /* for _getch */

#include <tchar.h>

#include "portaudio.h"
#include "pa_win_ds.h"
Expand Down Expand Up @@ -100,7 +101,7 @@ static void printWindowsVersionInfo( FILE *fp )

memset( &osVersionInfoEx, 0, sizeof(OSVERSIONINFOEX) );
osVersionInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
GetVersionEx( &osVersionInfoEx );
GetVersionEx( (LPOSVERSIONINFO) &osVersionInfoEx );


if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ){
Expand Down Expand Up @@ -201,7 +202,7 @@ static void printWindowsVersionInfo( FILE *fp )


fprintf( fp, "OS name and edition: %s %s\n", osName, osProductType );
fprintf( fp, "OS version: %d.%d.%d %S\n",
_ftprintf( fp, TEXT("OS version: %d.%d.%d %s\n"),
Comment thread
dechamps marked this conversation as resolved.
osVersionInfoEx.dwMajorVersion, osVersionInfoEx.dwMinorVersion,
osVersionInfoEx.dwBuildNumber, osVersionInfoEx.szCSDVersion );
fprintf( fp, "Processor architecture: %s\n", processorArchitecture );
Expand Down Expand Up @@ -405,9 +406,9 @@ int main(int argc, char* argv[])
if( argc >= 2 ){
deviceIndex = -1;
if( sscanf( argv[1], "%d", &deviceIndex ) != 1 )
usage(dsoundHostApiInfo);
usage(dsoundHostApiIndex);
if( deviceIndex < 0 || deviceIndex >= Pa_GetDeviceCount() || Pa_GetDeviceInfo(deviceIndex)->hostApi != dsoundHostApiIndex ){
usage(dsoundHostApiInfo);
usage(dsoundHostApiIndex);
}
}

Expand Down
6 changes: 3 additions & 3 deletions test/patest_leftright.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#define M_PI (3.14159265)
#endif
#define TABLE_SIZE (200)
#define BALANCE_DELTA (0.001)
#define BALANCE_DELTA (0.001f)

typedef struct
{
Expand Down Expand Up @@ -161,11 +161,11 @@ int main(void)
for( i=0; i<4; i++ )
{
printf("Hear low sound on left side.\n");
data.targetBalance = 0.01;
data.targetBalance = 0.01f;
Pa_Sleep( 1000 );

printf("Hear high sound on right side.\n");
data.targetBalance = 0.99;
data.targetBalance = 0.99f;
Pa_Sleep( 1000 );
}

Expand Down
9 changes: 5 additions & 4 deletions test/patest_wmme_find_best_latency_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,17 @@
* license above.
*/

#define _WIN32_WINNT 0x0501 /* for GetNativeSystemInfo */

#include <stdio.h>
#include <time.h>
#include <math.h>

#define _WIN32_WINNT 0x0501 /* for GetNativeSystemInfo */
#include <windows.h> /* required when using pa_win_wmme.h */
#include <mmsystem.h> /* required when using pa_win_wmme.h */

#include <conio.h> /* for _getch */

#include <tchar.h>

#include "portaudio.h"
#include "pa_win_wmme.h"
Expand Down Expand Up @@ -105,7 +106,7 @@ static void printWindowsVersionInfo( FILE *fp )

memset( &osVersionInfoEx, 0, sizeof(OSVERSIONINFOEX) );
osVersionInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
GetVersionEx( &osVersionInfoEx );
GetVersionEx( (LPOSVERSIONINFO) &osVersionInfoEx );


if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ){
Expand Down Expand Up @@ -206,7 +207,7 @@ static void printWindowsVersionInfo( FILE *fp )


fprintf( fp, "OS name and edition: %s %s\n", osName, osProductType );
fprintf( fp, "OS version: %d.%d.%d %S\n",
_ftprintf( fp, TEXT("OS version: %d.%d.%d %s\n"),
osVersionInfoEx.dwMajorVersion, osVersionInfoEx.dwMinorVersion,
osVersionInfoEx.dwBuildNumber, osVersionInfoEx.szCSDVersion );
fprintf( fp, "Processor architecture: %s\n", processorArchitecture );
Expand Down