mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
update
This commit is contained in:
parent
c104f81e85
commit
c893ccd3bd
@ -68,7 +68,7 @@ void QQtCustomEffectProgressBar::paintEvent(QPaintEvent*)
|
||||
//-height/2 height/2
|
||||
painter.translate ( width / 2, height / 2 );
|
||||
|
||||
/*更改刻度 设置的是放大的倍数 */
|
||||
/*更改刻度 设置的是缩放的倍数 */
|
||||
/*有利于在绘制的时候,统一绘制数据*/
|
||||
/*矢量放大,不失真*/
|
||||
//-100, 100
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "qqtwavaudiomanager.h"
|
||||
#include "qqtwavaudiomanager.h"
|
||||
|
||||
/*
|
||||
* 解析方法1 C语言
|
||||
@ -574,6 +574,7 @@ void QQtWavAudioInput::slotTimeout()
|
||||
{
|
||||
//1s 字节数 = 采样率 * 采样深度(位宽)* 通道数 / 8
|
||||
//mTimerInterval ms 字节数 = 1s 字节数 / (1000/mTimerInterval)
|
||||
//每个音符 字节数 = 采样深度(位宽)* 通道数 / 8;
|
||||
int frameSize = mSampleRate * mSampleSize * mChannelCount / 8 / ( 1000 / mTimerInterval );
|
||||
QByteArray tempBytes;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifndef QQTWAVAUDIOMANAGER_H
|
||||
#ifndef QQTWAVAUDIOMANAGER_H
|
||||
#define QQTWAVAUDIOMANAGER_H
|
||||
|
||||
#include <QObject>
|
||||
@ -144,12 +144,15 @@ public:
|
||||
|
||||
~QQtWavAudioManager();
|
||||
|
||||
//设置输入或者输出wav文件
|
||||
void setInputSourceFile ( const QString& localFile );
|
||||
QString inputSourceFile();
|
||||
void setOutputSourceFile ( const QString& localFile );
|
||||
QString outputSourceFile();
|
||||
|
||||
//获取输入文件的音频流格式
|
||||
const QAudioFormat& inputAudioFormat();
|
||||
//获取输出音频流的音频格式,可以设置,输出保存的时候使用。
|
||||
QAudioFormat& outputAudioFormat();
|
||||
|
||||
//每次修改SourceFile,这些都会改变。
|
||||
@ -158,9 +161,13 @@ public:
|
||||
int inputFileDataSize();
|
||||
int inputFileTailSize();
|
||||
|
||||
|
||||
QQtWavAudioInput* inputManager();
|
||||
//如果输入,从这里读取帧
|
||||
QIODevice* inputDevice();
|
||||
|
||||
QQtWavAudioOutput* outputManager();
|
||||
//如果输出,从这里写入帧,提前设置好格式哦...
|
||||
QIODevice* outputDevice();
|
||||
|
||||
void startInput();
|
||||
@ -169,6 +176,7 @@ public:
|
||||
void startOutput();
|
||||
void stopOutput();
|
||||
|
||||
//这两个是方便函数,一般都用这几个进行读写,不使用上边的。
|
||||
QByteArray readAll();
|
||||
QByteArray read ( qint64 maxlen );
|
||||
void write ( const QByteArray& bytes );
|
||||
|
Loading…
x
Reference in New Issue
Block a user