第3月第15天 afconvert lame
1.
//CAF 转换成MP3 (可以)
afconvert -f mp4f -d aac -b 128000 /Users/amarishuyi/Desktop/sound1.caf/Users/amarishuyi/Desktop/sound1.mp3
http://www.togaware.com/linux/survivor/Audio_Processing.html
http://blog.csdn.net/ysy441088327/article/details/7388351
2.lame
#include <stdio.h>
#include <lame/lame.h> int main(void)
{
int read, write; FILE *pcm = fopen("file.pcm", "rb");
FILE *mp3 = fopen("file.mp3", "wb"); const int PCM_SIZE = ;
const int MP3_SIZE = ; short int pcm_buffer[PCM_SIZE*];
unsigned char mp3_buffer[MP3_SIZE]; lame_t lame = lame_init();
lame_set_in_samplerate(lame, );
lame_set_VBR(lame, vbr_default);
lame_init_params(lame); do {
read = fread(pcm_buffer, *sizeof(short int), PCM_SIZE, pcm);
if (read == )
write = lame_encode_flush(lame, mp3_buffer, MP3_SIZE);
else
write = lame_encode_buffer_interleaved(lame, pcm_buffer, read, mp3_buffer, MP3_SIZE);
fwrite(mp3_buffer, write, , mp3);
} while (read != ); lame_close(lame);
fclose(mp3);
fclose(pcm); return ;
}
http://stackoverflow.com/questions/2495420/is-there-any-lame-c-wraper-simplifier-working-on-linux-mac-and-win-from-pure
第3月第15天 afconvert lame的更多相关文章
- 第31月第15天 -fembed-bitcode
1. 确保打包的时候使用的是fembed-bitcode, 而不是fembed-bitcode-maker fembed-bitcode-maker:只是简单的标记一下在archive出来的二进制中b ...
- 第25月第15天 udacity cs253
1.cs253 https://classroom.udacity.com/courses/cs253 webapp2 Install WebOb, Paste and webapp2¶ We nee ...
- 第16月第15天 glut
1. https://tokoik.github.io/opengl/libglut.html https://github.com/wistaria/wxtest/tree/master/C htt ...
- 第12月第15天 mysqlx boost reswift
1. INSTALL PLUGIN mysqlx SONAME 'mysqlx.so' https://yq.aliyun.com/articles/38288 2. boost boost::sha ...
- 第5月第15天 php email
1. <?php require_once "Mail.php"; $from = "luckyeggs<fuping304@163.com>" ...
- 第9月第15天 设计模式 adapter mvc
1. 有一道iOS面试题,iOS中都有什么设计模式?很少有答案说包括adapter. gof 书中adapter模式有以下内容: 实现: ... b ) 使 用 代 理 对 象 在这种方法中, T r ...
- 第8月第15天 app支持后台播放
1. AVAudioSession *audioSession = [AVAudioSession sharedInstance]; //默认情况下扬声器播放 [audioSession setCat ...
- 15分钟在笔记本上搭建 Kubernetes + Istio开发环境
11月13~15日,KubeCon 上海大会召开,云原生是这个秋天最火热的技术.很多同学来问如何上手 Kubernetes和Istio 服务网格开发.本文将帮助你利用Docker CE桌面版,15分钟 ...
- Vue 2.5 发布了:15篇前端热文回看
Vue 2.5 发布了:15篇前端热文回看 2017-11-02 前端大全 (点击上方公众号,可快速关注) 本文精选了「前端大全」2017 年 10 月的 15 篇热门文章.其中有职场分享.技术分享和 ...
随机推荐
- UNITY 移动到指定位置的写法
//move towards a target at a set speed. private void MoveTowardsTarget() { //the speed, in units per ...
- 011商城项目:图片服务器的安装---nginx
这个是电商的项目,不是传统项目,所以给图片单独架一台服务器. 我们看上图: 用户上传图片时上传到Tomcat1或者Tomcat2.然后Tomcat1和Tomcat2通过FTP服务把图片上传到图片服务器 ...
- CWMP开源代码研究5——CWMP程序设计思想
声明:本文涉及的开源程序代码学习和研究,严禁用于商业目的. 如有任何问题,欢迎和我交流.(企鹅号:408797506) 本文介绍自己用过的ACS,其中包括开源版(提供下载包)和商业版(仅提供安装包下载 ...
- [LeetCode] Valid Word Square 验证单词平方
Given a sequence of words, check whether it forms a valid word square. A sequence of words forms a v ...
- [LeetCode] Decode String 解码字符串
Given an encoded string, return it's decoded string. The encoding rule is: k[encoded_string], where ...
- [LeetCode] Duplicate Emails 重复的邮箱
Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Emai ...
- 抱歉!15:44-16:39阿里云RDS故障造成全站不能正常访问
非常非常抱歉!2016年3月7日15:44-16:39,由于阿里云RDS(云数据库)故障,造成全站不能正常访问,给您带来了很大很大的麻烦,恳请您的谅解! 故障是在15:44开始出现的,应用日志中出现大 ...
- neo4j关闭和开启密码访问权限
本例:neo4j-enterprise-2.3.1版本 neo4j默认安装是开启访问密码验证 可以发现,在conf/下的neo4j-server.properties配置文件 # Require (o ...
- 全局变量都是window对象的属性
var x = "haha"; var test = function(){ alert(this.x); } 上述,则会弹出 haha的值. 因为在JavaScript的变量作 ...
- Atomikos实现多数据源的事物管理
之前试过使用Spring动态切换数据库,通过继承AbstractRoutingDataSource重写determineCurrentLookupKey()方法,来决定使用那个数据库.在开启事务之前, ...