Update of /cvsroot/audacity/lib-src/portaudio-v19/src/os/win
In directory
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29383/lib-src/portaudio-v19/src/os/win
Modified Files:
pa_win_util.c pa_win_waveformat.c
Log Message:
Update portaudio-v19 to current portaudio SVN version, r1414
Index: pa_win_waveformat.c
===================================================================
RCS file:
/cvsroot/audacity/lib-src/portaudio-v19/src/os/win/pa_win_waveformat.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- pa_win_waveformat.c 1 Jan 2009 22:31:28 -0000 1.9
+++ pa_win_waveformat.c 25 May 2009 21:40:17 -0000 1.10
@@ -47,30 +47,26 @@
#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
#endif
-#if !defined(WAVE_FORMAT_IEEE_FLOAT)
-#define WAVE_FORMAT_IEEE_FLOAT 0x0003
-#endif
-
-static GUID pawin_ksDataFormatSubtypePcm =
+static GUID pawin_ksDataFormatSubtypeGuidBase =
{ (USHORT)(WAVE_FORMAT_PCM), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa,
0x00, 0x38, 0x9b, 0x71 };
-static GUID pawin_ksDataFormatSubtypeIeeeFloat =
- { (USHORT)(WAVE_FORMAT_IEEE_FLOAT), 0x0000, 0x0010, 0x80, 0x00, 0x00,
0xaa, 0x00, 0x38, 0x9b, 0x71 };
-
+int PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat )
+{
+ if( sampleFormat == paFloat32 )
+ return PAWIN_WAVE_FORMAT_IEEE_FLOAT;
+
+ return PAWIN_WAVE_FORMAT_PCM;
+}
void PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat,
- int numChannels, PaSampleFormat sampleFormat, double sampleRate
)
+ int numChannels, PaSampleFormat sampleFormat, int
waveFormatTag, double sampleRate )
{
WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;
int bytesPerSample = Pa_GetSampleSize(sampleFormat);
unsigned long bytesPerFrame = numChannels * bytesPerSample;
- if( sampleFormat == paFloat32 )
- waveFormatEx->wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
- else
- waveFormatEx->wFormatTag = WAVE_FORMAT_PCM;
-
+ waveFormatEx->wFormatTag = waveFormatTag;
waveFormatEx->nChannels = (WORD)numChannels;
waveFormatEx->nSamplesPerSec = (DWORD)sampleRate;
waveFormatEx->nAvgBytesPerSec = waveFormatEx->nSamplesPerSec *
bytesPerFrame;
@@ -81,12 +77,13 @@
void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat,
- int numChannels, PaSampleFormat sampleFormat, double sampleRate,
+ int numChannels, PaSampleFormat sampleFormat, int
waveFormatTag, double sampleRate,
PaWinWaveFormatChannelMask channelMask )
{
WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;
int bytesPerSample = Pa_GetSampleSize(sampleFormat);
unsigned long bytesPerFrame = numChannels * bytesPerSample;
+ GUID guid;
waveFormatEx->wFormatTag = WAVE_FORMAT_EXTENSIBLE;
waveFormatEx->nChannels = (WORD)numChannels;
@@ -100,13 +97,11 @@
waveFormatEx->wBitsPerSample;
*((DWORD*)&waveFormat->fields[PAWIN_INDEXOF_DWCHANNELMASK]) =
channelMask;
+
+ guid = pawin_ksDataFormatSubtypeGuidBase;
+ guid.Data1 = (USHORT)waveFormatTag;
+ *((GUID*)&waveFormat->fields[PAWIN_INDEXOF_SUBFORMAT]) = guid;
- if( sampleFormat == paFloat32 )
- *((GUID*)&waveFormat->fields[PAWIN_INDEXOF_SUBFORMAT]) =
- pawin_ksDataFormatSubtypeIeeeFloat;
- else
- *((GUID*)&waveFormat->fields[PAWIN_INDEXOF_SUBFORMAT]) =
- pawin_ksDataFormatSubtypePcm;
}
Index: pa_win_util.c
===================================================================
RCS file: /cvsroot/audacity/lib-src/portaudio-v19/src/os/win/pa_win_util.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- pa_win_util.c 31 Dec 2008 15:38:36 -0000 1.8
+++ pa_win_util.c 25 May 2009 21:40:17 -0000 1.9
@@ -51,6 +51,10 @@
#include "pa_util.h"
+#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC
version 6 and above */
+#pragma comment( lib, "winmm.lib" )
+#endif
+
/*
Track memory allocations to avoid leaks.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs