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 
     43extern "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*/ 
     54LPGUID 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*/ 
     63LPGUID 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  
    198198/* DirectSound specific data. */ 
    199199 
    200200/* Output */ 
     201    LPGUID               pOutputGuid; 
    201202    LPDIRECTSOUND        pDirectSound; 
    202203    LPDIRECTSOUNDBUFFER  pDirectSoundOutputBuffer; 
    203204    DWORD                outputBufferWriteOffsetBytes;     /* last write position */ 
     
    213214    double               dsw_framesWritten; 
    214215    double               framesPlayed; 
    215216/* Input */ 
     217    LPGUID               pInputGuid; 
    216218    LPDIRECTSOUNDCAPTURE pDirectSoundCapture; 
    217219    LPDIRECTSOUNDCAPTUREBUFFER   pDirectSoundInputBuffer; 
    218220    INT                  bytesPerInputFrame; 
     
    14761478                goto error; 
    14771479            } 
    14781480 
     1481            stream->pOutputGuid = winDsHostApi->winDsDeviceInfos[outputParameters->device].lpGUID; 
     1482            if( stream->pOutputGuid == NULL ) 
     1483            { 
     1484               stream->pOutputGuid = (GUID *) &DSDEVID_DefaultPlayback; 
     1485            } 
    14791486 
    14801487            hr = paWinDsDSoundEntryPoints.DirectSoundCreate( winDsHostApi->winDsDeviceInfos[outputParameters->device].lpGUID, 
    14811488                        &stream->pDirectSound, NULL ); 
     
    15221529                goto error; 
    15231530            } 
    15241531 
     1532            stream->pInputGuid = winDsHostApi->winDsDeviceInfos[inputParameters->device].lpGUID; 
     1533            if( stream->pInputGuid == NULL ) 
     1534            { 
     1535               stream->pInputGuid = (GUID *)&DSDEVID_DefaultCapture; 
     1536            } 
     1537 
    15251538            hr = paWinDsDSoundEntryPoints.DirectSoundCaptureCreate( winDsHostApi->winDsDeviceInfos[inputParameters->device].lpGUID, 
    15261539                        &stream->pDirectSoundCapture,   NULL ); 
    15271540            if( hr != DS_OK ) 
     
    21832196} 
    21842197 
    21852198 
     2199/***********************************************************************************/ 
     2200LPGUID PaWinDS_GetStreamInputGUID( PaStream* s ) 
     2201{ 
     2202    PaWinDsStream *stream = (PaWinDsStream*)s; 
    21862203 
     2204   return stream->pInputGuid; 
     2205} 
     2206 
     2207 
     2208/***********************************************************************************/ 
     2209LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s ) 
     2210{ 
     2211    PaWinDsStream *stream = (PaWinDsStream*)s; 
     2212 
     2213    return stream->pOutputGuid; 
     2214}