江苏快三开奖结果

Cpper
C/C++高級工程師 Android高級軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語言 程序猿

置頂隨筆

gaudio是一個基于C/C++混合編程的跨平臺音頻庫,當前支持windows32操作系統和linux32位操作系統

修改記錄
1.2013.04.01
    初次發布
2.2013.04.10
    完成對wav格式采樣頻率8000-48000,采樣格式4,8,16,24,32的支持     
3.2013.05.01
    a.版本提升為1.4.0.8
    b.修改一個退出異常
    c.支持二源混音
    d.使用載入插件的方式提供對wav播放的支持
    e.增加對au格式的支持
    f.增加echo音效
    g.增加bassboost音效
    h.增加函數gaudio_address_get
    i.增加使用例子:echo/mixer/stream/boost
    j.把設置,獲取音源三維空間信息的函數調整為: gaudio_source_set_float3,gaudio_source_get_float3
    k.修改解碼器結構為回調模式
4.2013.05.10
    a.版本提升為1.6.8.0
    b.優化部分代碼
    c.增加speedchanger音效
    d.增加音頻翻轉(g168)
    e.增加音頻聲道交換(g168)
    f.增加聲道合并(g168)
    g.增加speedchanger/invert測試用例
    h.增加vc調用靜態鏈接庫libgaudio.lib
    i.增加調制音效和測試例子
    j.修改解碼器框架
    k.修改獲取音頻采樣編碼格式不正確的問題
    l.解決seek定位不準的問題
    m.增加音效鏈測試例子
    n.增加函數gaudio_set_long,gaudio_get_long
    o.修改stream例子
    p.支持壓縮mpc音頻格式
    q.支持ogg/vorbis格式
    r.修改獲取采樣格式錯誤的bug
    t.增加接口說明文檔    
5.2013.06.10
    a.版本提升為1.7.2.0
    b.gaudio_source_set_error_callback回調函數增加音源參數
    c.gaudio_source_set_finish_callback回調函數增加音源參數
    d.移除gaudio_get_version函數
    e.gaudio_effect_setcallback函數調整為gaudio_effect_set_callback
    f.使用插件式的音頻驅動模式 - gwinmm
    g.gaudio代碼優化
    h.增加音頻源碼率的獲取
    i.增加feature范例
    j.完善文檔
    k.增加對mp3的支持
    l.移除invert/modulator/bassboost例子
    m.增加balance
6.2013.07.07
    a.版本提升到1.8.0.2
    b.增加對交換文件aiff的支持
    c.修改音頻驅動插件實現
    d.增加移相器音效
    e.修改部分API接口使用的long為int32_t以方便移植
    f.增加code::blocks測試工程
    g.增加msvc2008測試工程
    h.增加函數接口gaudio_source_create_from_buffer2以播放raw音頻數據
    i.把各個音效參數提到單獨文件
    j.簡化wav解碼
    k.修改幾處內存泄漏
    l.增加音頻回錄功能,輸出格式MP2,MP3,APE,WV,AAC,WAV,AU,AIFF,VOC,CAF,OGG
    當前錄制信息:16位音頻,雙聲道,采樣頻率44100
    m.增加音頻回錄的例子recorder
    n.測試例子使用getopt和usage提示
    o.增加對tta格式的支持    
7.2013.07.28
    a.版本提升到1.9.8.6                   
    b.解決了wav,au,aiff播放進度不準的故障
    c.優化wav/au/aiff解碼性能        
    d.增加distortion音效              
    e.增加foldback distortion音效       
    f.增加distortion音效使用例子       
    g.增加聲音穿透力                      
    h.修改結構最大支持八聲道             
    i.增加portaudio插件驅動(win32&linux)  
    j.完成g168,bassbost的liux版本     
    k.完成wav,au音頻格式的linux版本      
    l.代碼增加部分注釋(未完成)            
    m.嘗試性支持linux操作系統             
    n.支持midi/mid音樂格式             
    o.解決了mixer混音退出報錯的問題
    p.skip id3v2    
8.2013.08.16
    a.版本提升到2.0.0.1                    
    b.變量宏增加AUDIO_ENUM前綴
    c.增加非標準插件gsndfile支持flac/ogg/au/wav/aiff/voc/caf/..基于(sndfile)
    d.改用mpg123解碼mp3
    e.支持FFT頻譜
9.2013.09.08
    a.版本提升到2.0.6.0
    b.修改CROSSFEED宏和相關    
    c.引入200號插件支持s3m/mod/it/xm音頻格式
    d.整理測試用例
    e.增加autowah音效
    f.增加驅動檢測
10.2015.12.10 版本2.2.1.0
支持常見音頻格式和音效,使用超級方便
下載在這里:/Files/gaimor/gaudio-sdk-2.2.1.0.zip

    
 
posted @ 2013-07-11 22:49 ccsdu2009 閱讀(5404) | 評論 (2)編輯 收藏

2019年9月19日

import QtQuick 2.11

Rectangle 
{
    width
: 640
    height: 480
    color: "#0ff90f"

    Flipable {
            id: flip
            width: 300
            height: 300
            anchors.centerIn: parent

            property bool flipped: false

            front: Image{
                anchors.fill: parent
                source: "file:///C:/Users/Administrator/Desktop/11111/2099720.png"

                transform: Rotation{
                    origin.x: flip.width / 2
                    origin.y: flip.height / 2
                    axis.x: 0
                    axis.y: 1
                    axis.z: 0
                    angle: 180
                
}
            }

            back: Image
{
                anchors.fill
: parent
                source: "file:///C:/Users/Administrator/Desktop/11111/2099720.png"
            
}

            transform: Rotation
{
                id
: rotation
                origin.x: flip.width / 2
                origin.y: flip.height / 2
                axis.x: 0
                axis.y: 1
                axis.z: 0
                angle: 0
            
}

            states:State
{
                PropertyChanges {
                    target
: rotation
                    angle: 180
                
}
                when:flip.flipped
            }

            transitions: Transition
{
                NumberAnimation{
                    target
:rotation
                    properties: "angle"
                    duration: 240
                
}
            }

            MouseArea 
{
                anchors.fill
: parent
                onClicked:  flip.flipped = !flip.flipped
            
}
        }
}
posted @ 2019-09-19 18:22 ccsdu2009 閱讀(55) | 評論 (0)編輯 收藏
 
import QtQuick 2.11

Rectangle 
{
    width
: 640
    height: 480
    color: "#0909ff"

    Flipable {
            id: flip
            width: 300
            height: 300
            anchors.centerIn: parent

            property bool flipped: false

            front:Image{
                anchors.fill: parent
                source: "file:///C:/Users/Administrator/Desktop/11111/2099720.png"
            
}

            back:Image
{
                anchors.fill
: parent
                source: "file:///C:/Users/Administrator/Desktop/11111/2099720-flip.png"
            
}

            transform: Rotation
{
                id
: rotation
                origin.x: flip.width / 2
                origin.y: flip.height / 2
                axis.x: 0
                axis.y: 1
                axis.z: 0
                angle: 0
            
}

            states:State
{
                PropertyChanges {
                    target
: rotation
                    angle: 180
                
}
                when:flip.flipped
            }

            transitions: Transition
{
                NumberAnimation{
                    target
:rotation
                    properties: "angle"
                    duration: 240
                
}
            }

            MouseArea 
{
                anchors.fill
: parent

                onClicked:  flip.flipped = !flip.flipped

            
}
        }
}
posted @ 2019-09-19 17:33 ccsdu2009 閱讀(53) | 評論 (0)編輯 收藏
 
    int result = av_seek_frame(ffmpeg->formatCtx, -1,
        (ffmpeg->formatCtx->start_time + time) * AV_TIME_BASE,
        AVSEEK_FLAG_BACKWARD);
time單位為秒
posted @ 2019-09-19 09:51 ccsdu2009 閱讀(38) | 評論 (0)編輯 收藏

2019年9月18日

import QtQuick 2.5
import QtQuick.Layouts 1.3
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4

Rectangle 
{
    width
: 640
    height: 480
    color: "#333333"

    Button {
        id: button
        text: "Button"
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.top: parent.top
        anchors.topMargin: 6

        onClicked: {
            var count = layout.count
            if(layout.currentIndex == count - 1)
                layout.currentIndex = 0
            else
                layout.currentIndex ++
        
}
    }

    StackLayout 
{
        id
: layout
        anchors.top: button.bottom
        anchors.topMargin: 6
        anchors.horizontalCenter: parent.horizontalCenter
        width: 480
        height: 320
        currentIndex: 1
        Rectangle {
            color: 'teal'
            implicitWidth: 200
            implicitHeight: 200
        
}
        Rectangle 
{
            color
: 'plum'
            implicitWidth: 300
            implicitHeight: 200
        
}
        Rectangle 
{
            color
: '#c90909'
            implicitWidth: 300
            implicitHeight: 200
        
}
        Rectangle 
{
            color
: 'green'
            implicitWidth: 300
            implicitHeight: 200
        
}
        Rectangle 
{
            color
: 'grey'
            implicitWidth: 300
            implicitHeight: 200
        
}
    }
}
posted @ 2019-09-18 11:49 ccsdu2009 閱讀(51) | 評論 (0)編輯 收藏
 
import QtQuick 2.5
import QtQuick.Layouts 1.2
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4

Rectangle 
{
    id
: circularProgressBar
    width: 60
    height: 60

    color: "#333333"
    property real currentValue: 86
    property bool textVisible: true
    property bool canClick: false

    Canvas {
        id: canvas
        anchors.fill: parent
        antialiasing: true

        property color primaryColor: "transparent"
        property color secondaryColor: "lightblue"

        property real centerWidth: width / 2
        property real centerHeight: height / 2
        property real radius: Math.min(canvas.width-10, canvas.height-10) / 2

        property real minimumValue: 0
        property real maximumValue: 100
        property alias currentValue : circularProgressBar.currentValue

        property string text: "0"
        property real angle: (currentValue - minimumValue) / (maximumValue - minimumValue) * 2 * Math.PI
        property real angleOffset: -Math.PI / 2

        property real rotate: 0.0

        onPrimaryColorChanged: requestPaint()
        onSecondaryColorChanged: requestPaint()
        onMinimumValueChanged: requestPaint()
        onMaximumValueChanged: requestPaint()
        onCurrentValueChanged: requestPaint()
        onRotateChanged: requestPaint()

        onPaint: {
            var ctx = getContext("2d")
;
            ctx.save();

            ctx.clearRect(0, 0, canvas.width, canvas.height);

            ctx.translate(width/2,height/2)
            ctx.rotate(rotate*Math.PI/180.0)
            ctx.translate(-width/2,-height/2)

            ctx.beginPath();
            ctx.lineWidth = 10;
            ctx.strokeStyle = primaryColor;
            ctx.arc(canvas.centerWidth,
                    canvas.centerHeight,
                    canvas.radius,
                    angleOffset + canvas.angle,
                    angleOffset + 2*Math.PI);
            ctx.stroke();

            ctx.beginPath();
            ctx.lineWidth = 3;
            ctx.strokeStyle = canvas.secondaryColor;
            ctx.arc(canvas.centerWidth,
                    canvas.centerHeight,
                    canvas.radius,
                    canvas.angleOffset,
                    canvas.angleOffset + canvas.angle);
            ctx.stroke();

            ctx.restore();
        
}

        MouseArea 
{
            id
: mouseArea
            anchors.fill: parent
            visible: circularProgressBar.canClick
            onClicked: canvas.clicked()
            onPressedChanged: canvas.requestPaint()
        
}

        Timer
{
            id
: timer
            interval: 150
;
            running
: true
            repeat: true
;
            onTriggered
: {
                canvas.rotate += 5
            
}
        }
    }
}
posted @ 2019-09-18 10:59 ccsdu2009 閱讀(41) | 評論 (0)編輯 收藏

2019年9月17日

import QtQuick 2.11
import QtQuick.Controls 2.4

Rectangle
{
    width
:640
    height:480
    color:"#cfcfc0"

    anchors.margins: 6

    property bool load1: true

    Button
    {
        id:button
        text: "Button"
        anchors.horizontalCenter: parent.horizontalCenter
        onClicked:
        {
            if(area.visible)
                fadeOut.start()
            else
                fadeIn.start()
        
}
    }

    PropertyAnimation
    
{
        id
: fadeOut
        target: area
        duration: 300
        property: "opacity"
        from: 1.0
        to: 0.0

        onStopped: area.visible = false
    
}

    PropertyAnimation
    
{
        id
: fadeIn
        target: area
        duration: 300
        property: "opacity"
        from: 0.0
        to: 1.0

        onStarted: area.visible = true
    
}

    Rectangle
    
{
        id
: area
        width: parent.width - 12
        height: parent.height - button.height - 12
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.topMargin: 6
        anchors.top: button.bottom
        visible: false
        color: "#9900ff00"
    
}
}
posted @ 2019-09-17 16:06 ccsdu2009 閱讀(41) | 評論 (0)編輯 收藏
 
上層MouseArea需要接受右鍵事件,如下
    MouseArea {
        anchors.fill
: parent
        acceptedButtons: Qt.LeftButton | Qt.RightButton
    
}
posted @ 2019-09-17 11:18 ccsdu2009 閱讀(28) | 評論 (0)編輯 收藏
 
import QtQuick 2.11
import QtQuick.Controls 2.4

Rectangle
{
    width
:640
    height:480
    color:"#cfcfc0"

    anchors.margins: 6

    MouseArea {
        id: mouseRegion
        anchors.fill: parent
;
        acceptedButtons
: Qt.LeftButton | Qt.RightButton

        onClicked: {
            if(mouse.button == Qt.RightButton)
                contentMenu.popup()
        
}

        Menu 
{
            id
: contentMenu

            MenuItem {
                text: "Cut"
                onTriggered: {
}
            }

            MenuItem 
{
                text
: "Copy"
                onTriggered: {
}
            }

            MenuItem 
{
                text
: "Paste"
                onTriggered: {
}
            }

            MenuSeparator 
{ }

            Menu 
{
                title
: "More"
                MenuItem {
                    text: "Edit"
                
}
                MenuItem 
{
                    text
: "Select All"
                
}
            }
        }
    }
}
posted @ 2019-09-17 11:10 ccsdu2009 閱讀(49) | 評論 (0)編輯 收藏
 
 1     Button {
 2         anchors.left: button
 3         text: "菜單"
 4         anchors.leftMargin: 12
 5         onClicked: popupMenu.popup()
 6      }
 7 
 8      Menu {
 9           id : popupMenu
10           title: "&File"
11 
12           MenuItem {
13               text: "&Open"
14               onTriggered:{}
15           }
16 
17           MenuItem {
18               text: "&Save"
19               onTriggered: {}
20           }
21 
22           MenuItem {
23               text: "&Close"
24               onTriggered: Qt.quit()
25           }
26     }
posted @ 2019-09-17 11:06 ccsdu2009 閱讀(38) | 評論 (0)編輯 收藏

2019年9月16日

import QtQuick 2.5
import QtQuick.Layouts 1.2
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4

Rectangle 
{
    id
: circularProgressBar
    width: 60
    height: 60

    color: "#333333"
    property real currentValue: 0
    property bool textVisible: true
    property bool canClick: false

    Canvas {
        id: canvas
        anchors.fill: parent
        antialiasing: true

        property color primaryColor: "transparent"
        property color secondaryColor: "lightblue"

        property real centerWidth: width / 2
        property real centerHeight: height / 2
        property real radius: Math.min(canvas.width-10, canvas.height-10) / 2

        property real minimumValue: 0
        property real maximumValue: 100
        property alias currentValue : circularProgressBar.currentValue

        property string text: "0"
        property real angle: (currentValue - minimumValue) / (maximumValue - minimumValue) * 2 * Math.PI
        property real angleOffset: -Math.PI / 2

        onPrimaryColorChanged: requestPaint()
        onSecondaryColorChanged: requestPaint()
        onMinimumValueChanged: requestPaint()
        onMaximumValueChanged: requestPaint()
        onCurrentValueChanged: requestPaint()

        onPaint: {
            var ctx = getContext("2d")
;
            ctx.save();

            ctx.clearRect(0, 0, canvas.width, canvas.height);

            if(mouseArea.pressed) {
                ctx.beginPath();
                ctx.lineWidth = 10;
                ctx.fillStyle = Qt.lighter(canvas.secondaryColor,1.25);
                ctx.arc(canvas.centerWidth,
                        canvas.centerHeight,
                        canvas.radius,
                        0,
                        2*Math.PI);
                ctx.fill();

                timer.running = true;
            
}

            ctx.beginPath();
            ctx.lineWidth = 10;
            ctx.strokeStyle = primaryColor;
            ctx.arc(canvas.centerWidth,
                    canvas.centerHeight,
                    canvas.radius,
                    angleOffset + canvas.angle,
                    angleOffset + 2*Math.PI);
            ctx.stroke();

            ctx.beginPath();
            ctx.lineWidth = 3;
            ctx.strokeStyle = canvas.secondaryColor;
            ctx.arc(canvas.centerWidth,
                    canvas.centerHeight,
                    canvas.radius,
                    canvas.angleOffset,
                    canvas.angleOffset + canvas.angle);
            ctx.stroke();

            ctx.restore();
        }

        Text 
{
            id
: progressText
            anchors.centerIn: parent

            font.pixelSize: 16
            text: canvas.text
            visible: circularProgressBar.textVisible
            color: canvas.secondaryColor
        
}

        MouseArea 
{
            id
: mouseArea
            anchors.fill: parent
            visible: circularProgressBar.canClick
            onClicked: canvas.clicked()
            onPressedChanged: canvas.requestPaint()
        
}

        Timer
{
            id
: timer
            interval: 100
;
            running
: true
            repeat: true
;
            onTriggered
: {

                if(circularProgressBar.currentValue === 100) {
                    circularProgressBar.currentValue = 0
;
                    progressText.text = "0"
                
}

                circularProgressBar.currentValue += 1;
                progressText.text = circularProgressBar.currentValue.toString()+"%";
            }

        }
    }
}
posted @ 2019-09-16 16:38 ccsdu2009 閱讀(50) | 評論 (0)編輯 收藏