Ticket #19: ds.diff
| File ds.diff, 4.9 KB (added by leland_lucius, 2 years ago) |
|---|
-
audacity/lib-src/portaudio-v19/include/pa_win_ds.h
diff -wruN orig/audacity/lib-src/portaudio-v19/include/pa_win_ds.h audacity/lib-src/portaudio-v19/include/pa_win_ds.h
old new 1 #ifndef PA_WIN_DS_H 2 #define PA_WIN_DS_H 3 /* 4 * $Id: pa_win_ds.h 1013 2006-05-15 04:01:31Z rossb $ 5 * PortAudio Portable Real-Time Audio Library 6 * DirectSound specific extensions 7 * 8 * Copyright (c) 1999-2000 Ross Bencina and Phil Burk 9 * 10 * Permission is hereby granted, free of charge, to any person obtaining 11 * a copy of this software and associated documentation files 12 * (the "Software"), to deal in the Software without restriction, 13 * including without limitation the rights to use, copy, modify, merge, 14 * publish, distribute, sublicense, and/or sell copies of the Software, 15 * and to permit persons to whom the Software is furnished to do so, 16 * subject to the following conditions: 17 * 18 * The above copyright notice and this permission notice shall be 19 * included in all copies or substantial portions of the Software. 20 * 21 * Any person wishing to distribute modifications to the Software is 22 * requested to send the modifications to the original developer so that 23 * they can be incorporated into the canonical version. 24 * 25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 28 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 29 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 30 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 31 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 * 33 */ 34 35 /** @file 36 @brief DirectSound-specific PortAudio API extension header file. 37 */ 38 39 40 #include "portaudio.h" 41 42 #ifdef __cplusplus 43 extern "C" 44 { 45 #endif /* __cplusplus */ 46 47 48 /** Retrieve the GUID of the input device. 49 50 @param stream The stream to query. 51 52 @return A pointer to the GUID, or NULL if none. 53 */ 54 LPGUID PaWinDS_GetStreamInputGUID( PaStream* s ); 55 56 57 /** Retrieve the GUID of the output device. 58 59 @param stream The stream to query. 60 61 @return A pointer to the GUID, or NULL if none. 62 */ 63 LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s ); 64 65 #ifdef __cplusplus 66 } 67 #endif /* __cplusplus */ 68 69 #endif /* PA_WIN_DS_H */ -
audacity/lib-src/portaudio-v19/src/hostapi/dsound/pa_win_ds.c
diff -wruN orig/audacity/lib-src/portaudio-v19/src/hostapi/dsound/pa_win_ds.c audacity/lib-src/portaudio-v19/src/hostapi/dsound/pa_win_ds.c
old new 198 198 /* DirectSound specific data. */ 199 199 200 200 /* Output */ 201 LPGUID pOutputGuid; 201 202 LPDIRECTSOUND pDirectSound; 202 203 LPDIRECTSOUNDBUFFER pDirectSoundOutputBuffer; 203 204 DWORD outputBufferWriteOffsetBytes; /* last write position */ … … 213 214 double dsw_framesWritten; 214 215 double framesPlayed; 215 216 /* Input */ 217 LPGUID pInputGuid; 216 218 LPDIRECTSOUNDCAPTURE pDirectSoundCapture; 217 219 LPDIRECTSOUNDCAPTUREBUFFER pDirectSoundInputBuffer; 218 220 INT bytesPerInputFrame; … … 1476 1478 goto error; 1477 1479 } 1478 1480 1481 stream->pOutputGuid = winDsHostApi->winDsDeviceInfos[outputParameters->device].lpGUID; 1482 if( stream->pOutputGuid == NULL ) 1483 { 1484 stream->pOutputGuid = (GUID *) &DSDEVID_DefaultPlayback; 1485 } 1479 1486 1480 1487 hr = paWinDsDSoundEntryPoints.DirectSoundCreate( winDsHostApi->winDsDeviceInfos[outputParameters->device].lpGUID, 1481 1488 &stream->pDirectSound, NULL ); … … 1522 1529 goto error; 1523 1530 } 1524 1531 1532 stream->pInputGuid = winDsHostApi->winDsDeviceInfos[inputParameters->device].lpGUID; 1533 if( stream->pInputGuid == NULL ) 1534 { 1535 stream->pInputGuid = (GUID *)&DSDEVID_DefaultCapture; 1536 } 1537 1525 1538 hr = paWinDsDSoundEntryPoints.DirectSoundCaptureCreate( winDsHostApi->winDsDeviceInfos[inputParameters->device].lpGUID, 1526 1539 &stream->pDirectSoundCapture, NULL ); 1527 1540 if( hr != DS_OK ) … … 2183 2196 } 2184 2197 2185 2198 2199 /***********************************************************************************/ 2200 LPGUID PaWinDS_GetStreamInputGUID( PaStream* s ) 2201 { 2202 PaWinDsStream *stream = (PaWinDsStream*)s; 2186 2203 2204 return stream->pInputGuid; 2205 } 2206 2207 2208 /***********************************************************************************/ 2209 LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s ) 2210 { 2211 PaWinDsStream *stream = (PaWinDsStream*)s; 2212 2213 return stream->pOutputGuid; 2214 }
