亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pa_win_ds.c

?? 一個(gè)開源的sip源代碼
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
/* * $Id: pa_win_ds.c 1116 2006-09-06 15:47:03Z rossb $ * Portable Audio I/O Library DirectSound implementation * * Authors: Phil Burk, Robert Marsanyi & Ross Bencina * Based on the Open Source API proposed by Ross Bencina * Copyright (c) 1999-2006 Ross Bencina, Phil Burk, Robert Marsanyi * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files * (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * 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. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR * 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 hostaip_src    @todo implement paInputOverflow callback status flag        @todo implement paNeverDropInput.    @todo implement host api specific extension to set i/o buffer sizes in frames    @todo implement initialisation of PaDeviceInfo default*Latency fields (currently set to 0.)    @todo implement ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable    @todo audit handling of DirectSound result codes - in many cases we could convert a HRESULT into        a native portaudio error code. Standard DirectSound result codes are documented at msdn.    @todo implement IsFormatSupported    @todo check that CoInitialize() CoUninitialize() are always correctly        paired, even in error cases.    @todo call PaUtil_SetLastHostErrorInfo with a specific error string (currently just "DSound error").    @todo make sure all buffers have been played before stopping the stream        when the stream callback returns paComplete    old TODOs from phil, need to work out if these have been done:        O- fix "patest_stop.c"*/#include <stdio.h>#include <string.h> /* strlen() */#include "pa_util.h"#include "pa_allocation.h"#include "pa_hostapi.h"#include "pa_stream.h"#include "pa_cpuload.h"#include "pa_process.h"#include "pa_win_ds_dynlink.h"#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */#pragma comment( lib, "dsound.lib" )#pragma comment( lib, "winmm.lib" )#endif/* provided in newer platform sdks and x64 */#ifndef DWORD_PTR#define DWORD_PTR DWORD#endif#define PRINT(x) PA_DEBUG(x);#define ERR_RPT(x) PRINT(x)#define DBUG(x)   PRINT(x)#define DBUGX(x)  PRINT(x)#define PA_USE_HIGH_LATENCY   (0)#if PA_USE_HIGH_LATENCY#define PA_WIN_9X_LATENCY     (500)#define PA_WIN_NT_LATENCY     (600)#else#define PA_WIN_9X_LATENCY     (140)#define PA_WIN_NT_LATENCY     (280)#endif#define PA_WIN_WDM_LATENCY       (120)#define SECONDS_PER_MSEC      (0.001)#define MSEC_PER_SECOND       (1000)/* prototypes for functions declared in this file */#ifdef __cplusplusextern "C"{#endif /* __cplusplus */PaError PaWinDs_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );#ifdef __cplusplus}#endif /* __cplusplus */static void Terminate( struct PaUtilHostApiRepresentation *hostApi );static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,                           PaStream** s,                           const PaStreamParameters *inputParameters,                           const PaStreamParameters *outputParameters,                           double sampleRate,                           unsigned long framesPerBuffer,                           PaStreamFlags streamFlags,                           PaStreamCallback *streamCallback,                           void *userData );static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,                                  const PaStreamParameters *inputParameters,                                  const PaStreamParameters *outputParameters,                                  double sampleRate );static PaError CloseStream( PaStream* stream );static PaError StartStream( PaStream *stream );static PaError StopStream( PaStream *stream );static PaError AbortStream( PaStream *stream );static PaError IsStreamStopped( PaStream *s );static PaError IsStreamActive( PaStream *stream );static PaTime GetStreamTime( PaStream *stream );static double GetStreamCpuLoad( PaStream* stream );static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );static signed long GetStreamReadAvailable( PaStream* stream );static signed long GetStreamWriteAvailable( PaStream* stream );/* FIXME: should convert hr to a string */#define PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr ) \    PaUtil_SetLastHostErrorInfo( paDirectSound, hr, "DirectSound error" )/************************************************* DX Prototypes **********/static BOOL CALLBACK CollectGUIDsProc(LPGUID lpGUID,                                     LPCTSTR lpszDesc,                                     LPCTSTR lpszDrvName,                                     LPVOID lpContext );/************************************************************************************//********************** Structures **************************************************//************************************************************************************//* PaWinDsHostApiRepresentation - host api datastructure specific to this implementation */typedef struct PaWinDsDeviceInfo{    GUID                             guid;    GUID                            *lpGUID;    double                           sampleRates[3];} PaWinDsDeviceInfo;typedef struct{    PaUtilHostApiRepresentation inheritedHostApiRep;    PaUtilStreamInterface    callbackStreamInterface;    PaUtilStreamInterface    blockingStreamInterface;    PaUtilAllocationGroup   *allocations;    /* implementation specific data goes here */    PaWinDsDeviceInfo       *winDsDeviceInfos;} PaWinDsHostApiRepresentation;/* PaWinDsStream - a stream data structure specifically for this implementation */typedef struct PaWinDsStream{    PaUtilStreamRepresentation streamRepresentation;    PaUtilCpuLoadMeasurer cpuLoadMeasurer;    PaUtilBufferProcessor bufferProcessor;/* DirectSound specific data. *//* Output */    LPDIRECTSOUND        pDirectSound;    LPDIRECTSOUNDBUFFER  pDirectSoundOutputBuffer;    DWORD                outputBufferWriteOffsetBytes;     /* last write position */    INT                  outputBufferSizeBytes;    INT                  bytesPerOutputFrame;    /* Try to detect play buffer underflows. */    LARGE_INTEGER        perfCounterTicksPerBuffer; /* counter ticks it should take to play a full buffer */    LARGE_INTEGER        previousPlayTime;    UINT                 previousPlayCursor;    UINT                 outputUnderflowCount;    BOOL                 outputIsRunning;    /* use double which lets us can play for several thousand years with enough precision */    double               dsw_framesWritten;    double               framesPlayed;/* Input */    LPDIRECTSOUNDCAPTURE pDirectSoundCapture;    LPDIRECTSOUNDCAPTUREBUFFER   pDirectSoundInputBuffer;    INT                  bytesPerInputFrame;    UINT                 readOffset;      /* last read position */    UINT                 inputSize;        MMRESULT         timerID;    int              framesPerDSBuffer;    double           framesWritten;    double           secondsPerHostByte; /* Used to optimize latency calculation for outTime */    PaStreamCallbackFlags callbackFlags;    /* FIXME - move all below to PaUtilStreamRepresentation */    volatile int     isStarted;    volatile int     isActive;    volatile int     stopProcessing; /* stop thread once existing buffers have been returned */    volatile int     abortProcessing; /* stop thread immediately */} PaWinDsStream;/************************************************************************************** Duplicate the input string using the allocations allocator.** A NULL string is converted to a zero length string.** If memory cannot be allocated, NULL is returned.**/static char *DuplicateDeviceNameString( PaUtilAllocationGroup *allocations, const char* src ){    char *result = 0;        if( src != NULL )    {        size_t len = strlen(src);        result = (char*)PaUtil_GroupAllocateMemory( allocations, (long)(len + 1) );        if( result )            memcpy( (void *) result, src, len+1 );    }    else    {        result = (char*)PaUtil_GroupAllocateMemory( allocations, 1 );        if( result )            result[0] = '\0';    }    return result;}/************************************************************************************** DSDeviceNameAndGUID, DSDeviceNameAndGUIDVector used for collecting preliminary** information during device enumeration.*/typedef struct DSDeviceNameAndGUID{    char *name; // allocated from parent's allocations, never deleted by this structure    GUID guid;    LPGUID lpGUID;} DSDeviceNameAndGUID;typedef struct DSDeviceNameAndGUIDVector{    PaUtilAllocationGroup *allocations;    PaError enumerationError;    int count;    int free;    DSDeviceNameAndGUID *items; // Allocated using LocalAlloc()} DSDeviceNameAndGUIDVector;static PaError InitializeDSDeviceNameAndGUIDVector(        DSDeviceNameAndGUIDVector *guidVector, PaUtilAllocationGroup *allocations ){    PaError result = paNoError;    guidVector->allocations = allocations;    guidVector->enumerationError = paNoError;    guidVector->count = 0;    guidVector->free = 8;    guidVector->items = (DSDeviceNameAndGUID*)LocalAlloc( LMEM_FIXED, sizeof(DSDeviceNameAndGUID) * guidVector->free );    if( guidVector->items == NULL )        result = paInsufficientMemory;        return result;}static PaError ExpandDSDeviceNameAndGUIDVector( DSDeviceNameAndGUIDVector *guidVector ){    PaError result = paNoError;    DSDeviceNameAndGUID *newItems;    int i;        /* double size of vector */    int size = guidVector->count + guidVector->free;    guidVector->free += size;    newItems = (DSDeviceNameAndGUID*)LocalAlloc( LMEM_FIXED, sizeof(DSDeviceNameAndGUID) * size * 2 );    if( newItems == NULL )    {        result = paInsufficientMemory;    }    else    {        for( i=0; i < guidVector->count; ++i )        {            newItems[i].name = guidVector->items[i].name;            if( guidVector->items[i].lpGUID == NULL )            {                newItems[i].lpGUID = NULL;            }            else            {                newItems[i].lpGUID = &newItems[i].guid;                memcpy( &newItems[i].guid, guidVector->items[i].lpGUID, sizeof(GUID) );;            }        }        LocalFree( guidVector->items );        guidVector->items = newItems;    }                                    return result;}/*    it's safe to call DSDeviceNameAndGUIDVector multiple times*/static PaError TerminateDSDeviceNameAndGUIDVector( DSDeviceNameAndGUIDVector *guidVector )

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区久激情瑜伽| 欧洲亚洲精品在线| 欧美午夜片在线看| 日本不卡中文字幕| 亚洲免费电影在线| 亚洲精品在线观看网站| 99久久精品国产毛片| 美女一区二区三区在线观看| 中文字幕一区二区三区四区不卡 | 91视频观看视频| 午夜精品一区二区三区三上悠亚| 亚洲精品在线网站| 欧美特级限制片免费在线观看| 中文字幕一区二区三区精华液| 成人激情图片网| 麻豆精品精品国产自在97香蕉| 麻豆91在线播放| 日本韩国精品在线| 日韩女同互慰一区二区| 日韩一区二区三区高清免费看看| 日韩情涩欧美日韩视频| 久久综合九色综合久久久精品综合 | 国产精品国产三级国产aⅴ入口| 国产成人精品免费一区二区| 午夜免费欧美电影| 蜜桃视频在线一区| 国内精品写真在线观看| 久久精品国产精品青草| 国内精品在线播放| 蜜臀av性久久久久蜜臀av麻豆| 日韩国产精品大片| 久久99国产精品麻豆| 另类小说视频一区二区| 蜜臀久久99精品久久久画质超高清 | 成人欧美一区二区三区小说| 久久综合色一综合色88| 欧美极品另类videosde| 中文字幕日韩一区| 亚洲成人免费影院| 精品在线观看免费| 成人av电影在线| 欧洲一区二区三区在线| 欧美日韩和欧美的一区二区| 亚洲精品一区二区三区福利| 久久亚洲综合色| 一色桃子久久精品亚洲| 中文字幕视频一区| 亚洲不卡一区二区三区| 欧美日韩国产一级二级| 99久久777色| 美女在线视频一区| 91在线国内视频| 欧美久久久久中文字幕| 久久久久久久久久美女| 亚洲一区二区视频| 国产精品亚洲专一区二区三区| 欧美最新大片在线看| 精品国产精品网麻豆系列| 亚洲免费视频成人| 高清beeg欧美| 色婷婷亚洲精品| 久久综合国产精品| 亚洲成av人片一区二区梦乃| 不卡一区中文字幕| 日韩一区二区电影网| 国产欧美一区二区精品婷婷| 一区二区三区在线看| 国产乱子伦视频一区二区三区 | 国产精品一区二区在线播放 | 成人一区二区三区在线观看| 欧美性受极品xxxx喷水| 国产午夜精品久久久久久久| 日韩国产精品久久久久久亚洲| 日本二三区不卡| 欧美激情一二三区| 国产成人免费高清| 久久综合九色综合97婷婷女人 | 麻豆成人免费电影| 色婷婷亚洲综合| 美国av一区二区| 日韩欧美精品在线| 国产精品久久久久久户外露出| 国产91精品一区二区麻豆亚洲| 日本vs亚洲vs韩国一区三区 | 成人动漫中文字幕| 精品久久人人做人人爽| 天堂成人国产精品一区| 欧美三级视频在线播放| 亚洲视频图片小说| 国产东北露脸精品视频| 久久久亚洲综合| 91女厕偷拍女厕偷拍高清| 精品动漫一区二区三区在线观看| 精品一区二区三区在线视频| 日韩女优视频免费观看| 九九视频精品免费| 中文字幕亚洲一区二区va在线| 91在线视频在线| 亚洲在线成人精品| 精品国产电影一区二区| 国产福利不卡视频| 亚洲精品成人少妇| 日韩一区二区中文字幕| 国产一区在线视频| 中文字幕一区二区三区乱码在线 | 国产精品美女久久久久av爽李琼 | 五月综合激情网| 欧美性生交片4| 亚洲一区二区在线观看视频| 欧美在线影院一区二区| 久久99国产精品免费| 国产欧美一区二区精品秋霞影院 | 亚洲午夜久久久久久久久久久 | 欧美私人免费视频| 美女诱惑一区二区| 国产91精品欧美| 亚洲精品视频观看| 在线观看成人小视频| 亚洲三级视频在线观看| 99久久婷婷国产综合精品电影| 亚洲国产成人午夜在线一区| 91网站最新网址| 国产精品久久777777| 色婷婷综合久久久中文字幕| 亚洲免费av高清| 欧美女孩性生活视频| 天堂蜜桃91精品| 日本一区二区成人在线| 91在线观看成人| 日本女人一区二区三区| 久久久.com| 欧美精品久久99久久在免费线| 国内精品不卡在线| 亚洲欧美日韩国产综合在线| 日韩欧美一级片| 91视视频在线直接观看在线看网页在线看| 日韩国产欧美在线观看| 精品国产一区久久| 91黄色免费观看| 国产不卡视频在线观看| 亚洲高清久久久| 亚洲欧洲精品一区二区三区不卡 | 久久电影网站中文字幕| 国产精品欧美综合在线| 2021中文字幕一区亚洲| 日韩一级大片在线| 精品国产sm最大网站免费看| 欧美日韩免费观看一区二区三区| 午夜欧美2019年伦理| 亚洲午夜免费福利视频| 亚洲欧洲av一区二区三区久久| 日韩免费高清av| 日韩欧美国产一区二区三区| 在线观看一区二区视频| 欧美性淫爽ww久久久久无| 色香蕉久久蜜桃| 久久久久久久电影| 日韩一区二区三区在线观看| 91视频你懂的| 欧美区视频在线观看| 一区二区三区欧美| 欧美日韩国产一级| 精品卡一卡二卡三卡四在线| 国产成a人亚洲精| 丝袜亚洲精品中文字幕一区| 久久婷婷久久一区二区三区| 欧美亚洲一区二区在线观看| 午夜国产精品一区| 中文字幕人成不卡一区| 欧美一区二区三区小说| 91电影在线观看| 久久99精品网久久| 五月天婷婷综合| 99久久伊人久久99| 91免费小视频| 欧美日韩卡一卡二| 久久久久99精品国产片| 2023国产一二三区日本精品2022| 综合欧美亚洲日本| 青娱乐精品视频| 国产精品一区专区| 色屁屁一区二区| 欧美成人欧美edvon| 中文字幕亚洲不卡| 日韩精品午夜视频| 91啦中文在线观看| 精品成人私密视频| 亚洲成在人线在线播放| 亚洲日本在线看| 成人蜜臀av电影| 26uuu另类欧美| 日韩精品色哟哟| 91丨九色丨蝌蚪丨老版| 精品国产乱码久久久久久牛牛| 亚洲欧洲av在线| 国产一区视频网站| 日韩一区二区三区四区| 国产精品视频你懂的| 成人激情午夜影院| 国产亚洲精品久|