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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mixengine.h

?? symbian 下的helix player源代碼
?? H
字號:
/* ***** BEGIN LICENSE BLOCK *****
 * Source last modified: $Id: mixengine.h,v 1.8.16.2 2004/07/09 02:08:04 hubbe Exp $
 * 
 * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.
 * 
 * The contents of this file, and the files included with this file,
 * are subject to the current version of the RealNetworks Public
 * Source License (the "RPSL") available at
 * http://www.helixcommunity.org/content/rpsl unless you have licensed
 * the file under the current version of the RealNetworks Community
 * Source License (the "RCSL") available at
 * http://www.helixcommunity.org/content/rcsl, in which case the RCSL
 * will apply. You may also obtain the license terms directly from
 * RealNetworks.  You may not use this file except in compliance with
 * the RPSL or, if you have a valid RCSL with RealNetworks applicable
 * to this file, the RCSL.  Please see the applicable RPSL or RCSL for
 * the rights, obligations and limitations governing use of the
 * contents of the file.
 * 
 * Alternatively, the contents of this file may be used under the
 * terms of the GNU General Public License Version 2 or later (the
 * "GPL") in which case the provisions of the GPL are applicable
 * instead of those above. If you wish to allow use of your version of
 * this file only under the terms of the GPL, and not to allow others
 * to use your version of this file under the terms of either the RPSL
 * or RCSL, indicate your decision by deleting the provisions above
 * and replace them with the notice and other provisions required by
 * the GPL. If you do not delete the provisions above, a recipient may
 * use your version of this file under the terms of any one of the
 * RPSL, the RCSL or the GPL.
 * 
 * This file is part of the Helix DNA Technology. RealNetworks is the
 * developer of the Original Code and owns the copyrights in the
 * portions it created.
 * 
 * This file, and the files included with this file, is distributed
 * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
 * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
 * ENJOYMENT OR NON-INFRINGEMENT.
 * 
 * Technology Compatibility Kit Test Suite(s) Location:
 *    http://www.helixcommunity.org/content/tck
 * 
 * Contributor(s):
 * 
 * ***** END LICENSE BLOCK ***** */

#ifndef _AFMTCVT_H_
#define _AFMTCVT_H_

#include "hxtypes.h"
#include "hxresult.h"

#include "hlxclib/string.h" // memcpy/memset

// define the "native audio data type"
// on memory- and resource-constrained devices, use 16-bit processing
#if defined(_PALMOS) || defined(_SYMBIAN)
typedef INT16 tAudioSample ;

#if defined(HELIX_FEATURE_GAINTOOL) || defined(HELIX_FEATURE_CROSSFADE)
#error "gain tool and crossfader do not work on 16-bit data types yet"
#endif

#else // all other platforms use 32-bit processing
typedef INT32 tAudioSample ;
#endif

#define NBITS_PER_AUDIOSAMPLE (sizeof(tAudioSample)<<3)

// derive your class from this. This will be used as a callback to convert samples from
// the renderer input queues into the HXAudioSvcMixEngine source buffer
class CAudioSvcSampleConverter
{
public:
    // As a client of the MixEngine, you need to implement this function. Its
    // purpose is to fill a mixengine-owned buffer with samples representing the
    // time between llStartTime and llStartTime + nSamples.
    // If you have data for all the buffer, convert it all and return 1.
    // If you have partial data, convert what you have, and silence out the rest. Return 1.
    // If you have no data at all, just return 0. You may silence the buffer, but don't have to.

    virtual BOOL ConvertIntoBuffer(tAudioSample* buffer, UINT32 nSamples, INT64 llStartTimeInSamples) = 0;

protected:
    // using these utility functions.
    static void cvt8 (const void *in, tAudioSample* out, int nSamples)
    {
        for (int i=0; i < nSamples; i++) out[i] = (((const UINT8*)in)[i] - 128) << (NBITS_PER_AUDIOSAMPLE-8) ;
    }
    static void cvt16(const void *in, tAudioSample* out, int nSamples)
    {
        for (int i=0; i < nSamples; i++) out[i] = ((const INT16*)in)[i] << (NBITS_PER_AUDIOSAMPLE-16) ;
    }
    static void cvt32(const void *in, tAudioSample* out, int nSamples)
    {
        if (NBITS_PER_AUDIOSAMPLE == 32)
            memcpy(out, in, nSamples * sizeof(*out));
        else
            for (int i=0; i < nSamples; i++) out[i] = (INT16)(((const INT32*)in)[i] >> (NBITS_PER_AUDIOSAMPLE-16)) ;
    }
    static void silence(tAudioSample* out, int nSamples)
    {
        memset(out, 0, nSamples * sizeof(*out)) ;
    }
} ;

// forward and other definitions

struct COEFF ;
class RAExactResampler ;
typedef struct GAIN_STATE GAIN_STATE ;
typedef struct XFADER_STATE XFADER_STATE ;
typedef struct LIMSTATE LIMSTATE ;

typedef struct UpMixMachine  tUpMixMachine ;

class HXAudioSvcMixEngine
{
public:
    HXAudioSvcMixEngine() ;
    ~HXAudioSvcMixEngine() ;

    // set the parameters. You can call this (and change the parameters) in operation,
    // but it will reset the time line.
    HX_RESULT Init(INT32 sampleRateIn, INT32 sampleRateOut, INT32 nChannelsIn, INT32 nChannelsOut) ;

    // set the output bytes per sample. Set it to 2 for 16-bit output, 4 for 32-bit
    // output. Note that this does not influence the datatype of internal computations.
    HX_RESULT SetOutputBytesPerSample(UINT32 bps) ;

    // Set the sample converter. The mix engine uses the sample converter to read
    // new samples.
    HX_RESULT SetSampleConverter(CAudioSvcSampleConverter *pCvt) ;

    // set the volume/gain. This is in tenth of a dB. 0 == unity gain, 6dB = twice as loud, -6dB = half as loud
    // set bImmediate if you want the gain change to be immediate
    // (if you don't know what this means, then you don't want it to be immediate)
    HX_RESULT SetVolume(INT32 tenthOfDB, BOOL bImmediate = FALSE) ;

    // use this to convert from "Helix Volume Scale" to tenth of dB.
    static INT32 HXVolume2TenthOfDB(INT32 vol) ;

    enum
    {
        VOLUME_SILENT = -200 * 10 // -200 dB is as good as silent.
    } ;

    // set the downmix matrix. There are default downmix matrices, so you don't need to 
    // call this function. In fact, it is not yet spec'ed out.
    // SetDownmixMatrix() ;

    // This will issue a series of Convert::ConvertIntoBuffer() callbacks,
    // and will return with a full buffer of resampled/channel converted/mixed data.
    HX_RESULT MixIntoBuffer(
        void* pPlayerBuf,
        UINT32 ulBufSizeInBytes,
        BOOL&    bIsMixBufferDirty
    ) ;

    // guess what.
    enum eCrossfadeDirection
    {
      FADE_IN  = 0,
      FADE_OUT = 1
    } ;

    // This will register a cross fade. The cross fade will be unregistered only
    // when ResetTimeline() is called or when the fade is done.
    // the time stamps are in units of samples of the output signal.
    HX_RESULT SetCrossFade(
        enum eCrossfadeDirection inOut, // 0 for fade in, 1 for fade out.
        INT64 llStarttimeInSamples,
        INT64 llEndtimeInSamples
    ) ;

    // reset the time line. Call this whenever the next call to MixIntoBuffer()
    // will have a time stamp that is non-contiguous with the previous mix.
    // This should only be the case after Seek/Resume
    HX_RESULT ResetTimeLineInMillis(INT64 millis) ;

    // the time of the next mix, in ms.
    INT64 GetNextMixTimeMillis(void) const;

    // ask the mixer which range of input samples it will request in a mix operation
    // of size nBytesToMix.
    void GetMixRange(UINT32 nBytesToMix, INT64& llStart, INT64& llEnd) const;

protected:
    // the sample converter we call back into
    CAudioSvcSampleConverter *m_pCvt ;

private:
    // we process audio in batches, so that we don't have to dynamically
    // allocate memory and can work inside of the cache. This is the number
    // of samples we process at any one time.
    enum
    {
        BATCHSIZE = 2048
    } ;

    // helper functions
    void releaseResources() ;
    HX_RESULT SetupResamplerAndBuffers(void) ;
    HX_RESULT SetupUpDownmix(void) ;

    // timekeeping & other variables
    INT64 m_llTimestamp_1, m_llTimestamp_3 ; // time on input & output

    UINT32 m_ulSampleRate_1_2, m_ulSampleRate_3_4 ;
    UINT32 m_nChannels_1, m_nChannels_2_3, m_nChannels_4 ;
    UINT32 m_ulChunkSize_1,m_ulChunkSize_3 ;
    UINT32 m_ulBytesPerSample ; // bytes per sample on the output

    UINT32 m_nOutputSamplesLeft_3 ;
    UINT32 m_ulBufferSize_3 ;
    tAudioSample *m_pBuffer_1, *m_pBuffer_3 ; // buffer pre- and post resampler

    // resampler
    RAExactResampler *m_pResampler ;
    UINT32 m_ulResamplerPhase ;

    // XFader
    INT64 m_llFadeStart ;
    UINT32 m_ulXFadeSamples ;
    BOOL m_bPastXFade ; // set to TRUE if we have passed the X-Fade point.

    enum eCrossfadeDirection m_eCrossFadeDirection ;
    XFADER_STATE *m_pXFader ;

    // gain tool
    GAIN_STATE *m_pGaintool ;

    // limiter
    LIMSTATE *m_pLimiter ;

    // downmix/upmix
    enum { HEADROOM = 3 } ;
    int m_slev, m_clev ;
    UINT32 upmix(const tAudioSample *pIn, INT32 *pOut, const tUpMixMachine *pUpmixMachine, int nSamples, BOOL isDirty) ;
    UINT32 upmix(const tAudioSample *pIn, INT16 *pOut, const tUpMixMachine *pUpmixMachine, int nSamples, BOOL isDirty) ;
    const tUpMixMachine *m_upmixMachine ; // how to "up"-mix the audio

    void downmix2_1(tAudioSample *pBuffer, int nSamples) ;
    void downmix5_1(tAudioSample *pBuffer, int nSamples) ;
    void downmix4_2_stereo(tAudioSample *pBuffer, int nSamples) ;
    void downmix4_2_matrix(tAudioSample *pBuffer, int nSamples) ;
    void downmix5_2_stereo(tAudioSample *pBuffer, int nSamples) ;
    void downmix5_2_matrix(tAudioSample *pBuffer, int nSamples) ;
    void downmix6_1(tAudioSample *pBuffer, int nSamples) ;
    void downmix6_2_stereo(tAudioSample *pBuffer, int nSamples) ;
    void downmix6_2_matrix(tAudioSample *pBuffer, int nSamples) ;
    void downmix6_5(tAudioSample *pBuffer, int nSamples) ;

    typedef void (HXAudioSvcMixEngine::*tDownmixfunc)(tAudioSample *pBuffer, int nSamples) ;
    tDownmixfunc m_pfDownmix ; // function to downmix the audio
} ;

#endif /* _AFMTCVT_H_ */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品91亚洲二区在线观看| 国产精品一卡二| 老司机精品视频在线| 国产精品亚洲一区二区三区在线| 99精品久久只有精品| 欧美精品在线观看播放| 国产区在线观看成人精品| 亚洲精品第1页| 国产精品一区二区久久不卡| 欧美三级电影网| 国产精品国产成人国产三级| 婷婷国产v国产偷v亚洲高清| 99re这里只有精品6| 欧美变态口味重另类| 亚洲国产精品视频| 丁香一区二区三区| 日韩精品一区国产麻豆| 亚洲一区二区三区小说| 成人免费av资源| 欧美成人三级在线| 日韩在线一区二区| 精品视频免费看| 亚洲色图制服丝袜| 成人97人人超碰人人99| 久久奇米777| 99精品久久久久久| 国产丝袜在线精品| 国产综合色精品一区二区三区| 在线观看av不卡| 综合自拍亚洲综合图不卡区| 国产成人免费av在线| 久久女同互慰一区二区三区| 久久不见久久见免费视频1| 欧美人与禽zozo性伦| 亚洲成人综合在线| 欧美片在线播放| 亚洲成人综合网站| 欧美亚洲国产bt| 亚洲精品中文在线观看| 99国产精品久久久久久久久久 | 亚洲国产aⅴ成人精品无吗| www.亚洲国产| 亚洲图片激情小说| 色久综合一二码| 一区二区三区日韩精品视频| 91国偷自产一区二区使用方法| 亚洲乱码一区二区三区在线观看| 色综合久久中文综合久久97| 中文字幕在线观看一区二区| 久久97超碰国产精品超碰| 欧美成人免费网站| 激情久久五月天| 欧美国产成人精品| 色婷婷综合久色| 天堂蜜桃91精品| 欧美成人女星排名| 东方欧美亚洲色图在线| 亚洲同性同志一二三专区| 久久精品人人做| 国产精品一区二区免费不卡| 国产欧美1区2区3区| 91尤物视频在线观看| 亚洲精品国产一区二区三区四区在线| 在线视频国产一区| 蜜臀国产一区二区三区在线播放| 精品久久久三级丝袜| 粉嫩av一区二区三区在线播放| 亚洲三级电影网站| 欧美一区二区在线视频| 国产精品123| 依依成人精品视频| 欧美一二三区在线观看| 国产白丝精品91爽爽久久| 一区二区三区日韩欧美| 日韩精品一区二区三区视频 | 亚洲成人免费电影| 欧美一区二区日韩| 不卡在线观看av| 日韩精品电影在线观看| 国产农村妇女毛片精品久久麻豆 | 国产一区美女在线| 亚洲免费在线电影| 日韩欧美一二三| 97se亚洲国产综合自在线观| 日韩成人午夜精品| 久久99国产精品免费| 亚洲欧美偷拍另类a∨色屁股| 宅男在线国产精品| 国产不卡在线播放| 奇米888四色在线精品| 亚洲色图一区二区| 国产亚洲一二三区| 欧美精品少妇一区二区三区| 国产福利精品一区二区| 日本色综合中文字幕| 亚洲欧美日韩成人高清在线一区| 欧美第一区第二区| 欧美另类变人与禽xxxxx| caoporn国产精品| 国产精品一区二区久激情瑜伽| 丝袜a∨在线一区二区三区不卡| 国产拍欧美日韩视频二区| 91精品国产综合久久久久久| 91久久精品午夜一区二区| 成人精品免费看| 激情六月婷婷久久| 日本免费新一区视频| 亚洲成人免费看| 亚洲综合一区二区精品导航| 成人欧美一区二区三区1314| 国产免费成人在线视频| 久久综合资源网| 欧美精品aⅴ在线视频| 欧美午夜在线观看| 在线观看日韩高清av| 一本到一区二区三区| 99国产精品视频免费观看| 成人h版在线观看| 成人综合婷婷国产精品久久免费| 激情综合色综合久久| 精品一区二区三区视频在线观看| 全国精品久久少妇| 蜜臀国产一区二区三区在线播放| 天堂久久久久va久久久久| 性久久久久久久久久久久| 成人性色生活片| 国产主播一区二区| 国产在线精品免费| 丁香婷婷深情五月亚洲| 成人av网在线| 91小视频免费观看| 欧美视频精品在线观看| 欧美日韩日本视频| 日韩一级完整毛片| 精品国产乱子伦一区| 国产女主播一区| 亚洲免费观看高清完整版在线观看| 亚洲视频综合在线| 一区二区三区四区高清精品免费观看| 一区二区三区在线视频免费 | 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 色一情一乱一乱一91av| 色婷婷综合在线| 欧美日韩国产系列| 337p粉嫩大胆噜噜噜噜噜91av| 久久久99精品免费观看不卡| 国产精品日韩成人| 亚洲香肠在线观看| 韩日av一区二区| 不卡一二三区首页| 欧美日韩aaaaaa| 久久久久久久久久久99999| 日韩理论在线观看| 亚洲第一在线综合网站| 国产激情精品久久久第一区二区| 成人av影视在线观看| 精品视频一区二区三区免费| 2023国产精品| 亚洲靠逼com| 久久成人羞羞网站| 色吊一区二区三区| 亚洲精品一区二区精华| 亚洲狼人国产精品| 国产伦精品一区二区三区视频青涩 | 欧美电影免费观看高清完整版在线| 国产欧美日本一区二区三区| 亚洲国产精品久久人人爱蜜臀| 狠狠色综合色综合网络| 欧美在线制服丝袜| 久久精品男人天堂av| 亚洲一二三四区| 国产高清精品久久久久| 欧美精品aⅴ在线视频| 亚洲三级久久久| 国产久卡久卡久卡久卡视频精品| 欧美中文字幕一区| 国产精品久久精品日日| 久久99精品久久久久| 欧美日韩国产区一| 日韩美女视频19| 国产一区二区三区在线看麻豆| 欧美性大战久久久久久久蜜臀| 国产精品视频在线看| 美女视频第一区二区三区免费观看网站 | 日韩欧美第一区| 亚洲自拍偷拍av| 成人精品免费看| 久久精品一区蜜桃臀影院| 免费成人av资源网| 欧美伦理影视网| 一区二区三区产品免费精品久久75| 国产成人av电影免费在线观看| 欧美成人精品二区三区99精品| 亚洲一区二区三区免费视频| 91免费看视频| 亚洲欧美中日韩| 99在线精品观看| 国产清纯美女被跳蛋高潮一区二区久久w| 麻豆成人在线观看| 日韩一区二区在线观看视频播放 |