-
大小: 41.75MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-06-17
- 语言: 其他
- 标签: QMediaPlayer ffmpeg
资源简介
1.此工具是qt 基于QAudioRecorder实现的录音以及基于QMediaPlayer实现的录音播放,使用ffmpeg解析音频并且带音频波形图实现,可根据需要选择输入、输出音频设备,音频文件格式、音频编码格式、音频频率以及音频通道数。
2.目前音频文件时保存为wav格式的,编解器使用的是PCM,可根据需要选择不同的音频格式和编解码器,目前还未支持压缩音频。播放音频使用的QMediaPlayer,解码音频使用ffmpeg,工具里面包含ffmpeg第三方库。
3.播放端实现音频波形图,目前只支持一个音频通道和两个音频通道的波形图,都是64位的,在windows和linux下都测试可用。
代码片段和文件信息
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or alternatively in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively you may use this file under the terms of the BSD license
** as follows:
**
** “Redistribution and use in source and binary forms with or without
** modification are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** “AS IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT
** LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL
** SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT
** LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE
** DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.“
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include “audiolevel.h“
#include
AudioLevel::AudioLevel(QWidget *parent)
: QWidget(parent)
{
setMinimumHeight(15);
setMaximumHeight(50);
}
void AudioLevel::setLevel(qreal level)
{
if (m_level != level) {
m_level = level;
update();
}
}
void AudioLevel::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event);
QPainter painter(this);
// draw level
qreal widthLevel = m_level * width();
painter.fillRect(0 0
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3144 2020-09-25 10:35 audiorecorder\audiolevel.cpp
文件 2879 2019-01-15 13:20 audiorecorder\audiolevel.h
文件 19324 2020-09-10 10:02 audiorecorder\audiorecorder.cpp
文件 4031 2020-09-10 10:00 audiorecorder\audiorecorder.h
文件 954 2020-09-25 10:47 audiorecorder\audiorecorder.pro
文件 23905 2020-09-25 10:34 audiorecorder\audiorecorder.pro.user
文件 5465 2020-09-25 10:34 audiorecorder\audiorecorder.ui
文件 3318 2020-08-20 10:46 audiorecorder\buttondelegate.cpp
文件 739 2020-08-19 15:42 audiorecorder\buttondelegate.h
文件 1207 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\ac3_parser.h
文件 1354 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\adts_parser.h
文件 212307 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\avcodec.h
文件 2570 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\avdct.h
文件 3111 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\avfft.h
文件 10942 2020-08-10 04:29 audiorecorder\ffmpeg\include\libavcodec\bsf.h
文件 16370 2020-08-10 04:29 audiorecorder\ffmpeg\include\libavcodec\codec.h
文件 3847 2020-08-10 04:29 audiorecorder\ffmpeg\include\libavcodec\codec_desc.h
文件 15240 2020-08-10 04:29 audiorecorder\ffmpeg\include\libavcodec\codec_id.h
文件 7090 2020-08-10 04:29 audiorecorder\ffmpeg\include\libavcodec\codec_par.h
文件 2853 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\d3d11va.h
文件 4044 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\dirac.h
文件 3715 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\dv_profile.h
文件 2361 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\dxva2.h
文件 1650 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\jni.h
文件 3450 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\mediacodec.h
文件 23373 2020-08-10 04:29 audiorecorder\ffmpeg\include\libavcodec\packet.h
文件 3763 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\qsv.h
文件 2297 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\vaapi.h
文件 5796 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\vdpau.h
文件 4785 2019-06-13 23:19 audiorecorder\ffmpeg\include\libavcodec\version.h
............此处省略185个文件信息
相关资源
- 音频功率放大器设计手册 第四版 49
- Springer Handbook of Speech Processing
- 7.1声道音频测试音2
- pcm音频重采样
- 混音指南 中文版PDF
- 数字音频技术(第6版).((美)Ke
- DirectShow获取视频和音频数据
- g721 g711 g729 g723 g722 音频编码解码及分
- QACT 高通音频调试工具
- 数据结构预算法之美音频35-56
- 使用DirectShow采集摄像头并对视音频进
- 数据结构预算法之美音频1-35
- 中科大研究生综合英语听力音频及题
- 音频隐写和工具
-
雷霆音频Cuba
se高级机架全能版.exe - 数字音频技术(第6版).pdf
- 音频信号分析仪
- 包含啸叫的音源用于音频啸叫处理实
- 数字音视频技术及应用
- 利用ffmpeg进行视音频信息提取
- 开心音乐随心听千千音乐随心听 v3.
- IELTS 剑桥雅思15+音频
- dtmf双音多频音频分析软件
- Cool edit 2.1中文破解版 + 所有插件
- 测试用的pcm音频数据
- 模拟电子技术课程设计实验报告.doc
- 快闪PPT的背景音效 PPT没有声音的可以
- 各种音、视频格式资源
- FFmpeg安装包,
- 基于短距离无线光通信的音频传输系
评论
共有 条评论