iPhone/iPad Audio Unit 2012/05/19

iPhone/iPad开发札记2012/03/05 1. conference编译错误,如下: *min/max macro related.  /Developer325/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:610:34: error 阅读详情


1. 使用Audio Unit采集声音 (耗时2:30小时)

* 似乎不推荐

There are two other main design patterns for audio units hosting. To record or analyze audio, create an input-only app with a render callback function. The callback function is invoked by your application, and it in turn invokes the render method of the Remote I/O unit’s input element. However, in most cases, a better choice for an app like this is to use an input audio queue object (of type AudioQueueRef instantiated using the AudioQueueNewInputfunction), as explained in Audio Queue Services Programming Guide. Using an audio queue object provides a great deal more flexibility because its render callback function is not on a realtime thread.


Q:似乎若真要做,似乎意思是没有call back把captured audio传过来,需要自己实现类似机制?


* 设置input element的output scope,render callback function:没有用!

    // for output ? call back render 

  AURenderCallbackStruct callback_struct;

callback_struct.inputProc = renderCallback;

callback_struct.inputProcRefCon =self;

ASSERT_OK(AudioUnitSetProperty(audioUnit, 

                                   kAudioUnitProperty_SetRenderCallback,//

                                  //kAudioOutputUnitProperty_SetInputCallback,

                                   kAudioUnitScope_Output,// output callback handler 

                                  1, // for input bus ( bus/element 1) 

                                   &callback_struct, 

                                  sizeof(callback_struct)));


注:callback未被执行!

* 另一种可能性:

在output element的input scope callback中去拿到这个数据???

与此同时,disable output element的output scope?



科技中介服务机构如何高效完成技术成果的筛选与匹配服务?.docx 科技中介服务机构如何高效完成技术成果的筛选与匹配服务? 立即下载

相关推荐

coppeliasim+gym+sac机械臂到位实验

urdf文件

iphone/iPad 搞定Audio Unit 2012/05/13

1. 研究MixherHost  * render callback呼叫duration = 11 ms  2012-05-13 09:27:32.884 MixerHost[1576:7c03] into render callback: bus no = 0 2012-05-13 09:27:32.884 MixerHost[1576:7c03] into render callba

printf1998的专栏 4056

产业园区如何通过数智工具精准识别企业技术需求,提高服务匹配效率?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

iPhone/iPad搞定Audio Unit声音 2012/05/15

1. 处理样本大小由160变成186的问题 搞定!(12:30) #include using namespace std;  class AudioBufferHandler { public:     AudioBufferHandler(int intpuSize, int outputSize);     void putAudioDa

printf1998的专栏 891

TruckSim与Simulink联合仿真中的车轮转角精确控制策略

本文深入探讨了TruckSim与Simulink联合仿真中实现车轮转角精确控制的关键策略。针对多轴车辆路径跟踪时转角指令失灵的常见问题,核心在于正确配置TruckSim转向轴的外部输入模式(Advanced Settings),并确保仿真接口的稳定搭建。文章详细解析了从单轴到多轴协同转向的配置方法,并提供了提升MPC路径跟踪精度的实战技巧与调试经验。

weixin_29035147的博客 367

5分钟搞定!用FunASR在本地快速部署达摩院Paraformer语音识别模型

本文提供了一份快速部署指南,教你如何在5分钟内利用FunASR工具包在本地电脑上启动达摩院Paraformer语音识别模型。Paraformer作为一款非自回归端到端模型,以其推理速度快、识别精度高的特点,结合FunASR的一键式模型加载和统一API,让开发者能轻松构建本地语音识别系统,极大降低了前沿AI技术的应用门槛。

q9w8e7r6t5的博客 604

iPhone/iPad 2012/05/14 take care of Audio Unit

1. something could be done:  * check volume code.  * double check stream format  * try moving buf code outside of render callback * double check sample rate code  * double check audio s

printf1998的专栏 1072

零成本实现飞牛 OS 内网穿透:CloudFlare 隧道搭建全攻略

一、引言:突破内网限制的最优解当你的内网环境中部署了飞牛 OS 系统(无论是老旧电脑还是 NAS 设备),想要实现公网访问时,传统方案往往面临两大痛点:公网 IP 申请困难且成本高DDNS 动态解析配置复杂专业内网穿透工具存在付费门槛今天为大家带来零成本解决方案:通过免费域名搭配 CloudFlare 隧道技术,无需公网 IP 即可轻松实现飞牛 OS 服务的公网访问。全程操作可视化,新手也能快速上手!二、前期准备:必备工具清单(1)域名准备。

Honmaple的博客 7491

iPhone/iPad 2012/05/12 搞定Audio Unit

1. 总结一下 I/O Unit有两个element(bus),每一个都有input及output两个scope input element的input scope,直接与mic hardware相连,不用配置 output element的output scope,直接与speaker hardware相连,不用配置 在我的应用中,只需要配置output element的input sc

printf1998的专栏 1940

Android音频学习(十四)——加载音频设备

loadHwModule 是 Android 音频系统的核心初始化函数,负责加载音频硬件抽象层(HAL)的模块实现。它建立 AudioPolicyService 与底层硬件的桥梁,将配置文件(audio_policy_config.xml)中的标签<module>定义转化为可操作的硬件对象,加载的是音频硬件模块(HAL实现),每个模块对应一种音频设备类型,以动态库的形式存在,负责与底层音频硬件交互。

miemie2014的博客 1731

Proxmox(pve)集群(4)存储(1)配置分布式存储ceph

它使用一种称为CRUSH(Controlled Replication Under Scalable Hashing)算法的数据分布算法来将数据均匀地分布在多个存储节点上,并确保数据的冗余和容错。它负责管理数据的分布、冗余和自动修复。PVE支持本地存储、LVM、NFS、iSCSI、CephFS、RBD、ZFS等存储方式,我这里使用两种存储方式,一种是通过ceph实现分布式存储,一种是通过truenas实现集中式存储。自我管理和自动恢复:Ceph具有自我管理的特性,可以动态地调整和优化存储集群的配置。

Monster✺◟(∗❛ัᴗ❛ั∗)◞✺的博客 2623

UC故事+iPhone/iPad Audio Unit 2012/05/17

1. Audio Unit 换VOIP Audio Unit,完全无声,不知什么原因。 Q:render callback没有被执行?   2.

printf1998的专栏 584

2026.1.9:最新VSCode集成claude插件完美解决方案,跳过登录界面,使用国内Kimi K2进行计费

本文介绍了如何安装配置Claude插件并连接Kimi K2 API的详细步骤:1)搜索安装Claude插件;2)进入设置关闭登录提示;3)在settings.json中添加API配置,包括ANTHROPIC_AUTH_TOKEN(需替换为Kimi API Key)和ANTHROPIC_BASE_URL;4)通过Kimi官网获取API Key。完成配置后即可正常使用该插件。文中配有完整的操作截图指引。

拥抱具身智能,昇腾Ascend C 8719

UC故事与iPhone/iPad Audio Unit 2012/05/16

1. 故障与诊断 客户端无法入会   从日志上看,tcp握手成功,随后又被关闭了。 一般都是通讯设备把连接reset掉了,让电信商自查防火墙之类的设置,是否发现了我们的通讯协议里有违禁的特征字。然后把连接断掉了。   让电信用户确认一下,本地是否使用了TP-Link等家用/SOHO之类的宽带路由器,支持多台PC共享上网。 如果是这个情况,建议尝试暂不使用路由器,让一台PC机和ADSL

printf1998的专栏 514

C++ Qt6 QtQuick/QML入门进阶与项目实战视频教程

C++ Qt这些年在PC客户端、嵌入式、汽车座舱仪表等领域应用很广泛,例如剪映专业版、微信4.0、亿图脑图、Steam、美图秀秀、腾讯会议、钉钉(部分模块)等都是使用C++ QWidget/QML开发。特别是QML这种声明式UI开发更加快捷,QML的界面开发效率相对于QWidget更快速,界面效果更好,QtQuick/QML在Qt6版本也逐渐完善了,使用QML进行客户端开发是个不错的选择。

琅嬛福地 4487

如何对正射影像DOM(卫星影像、无人机航拍影像)进行拼接、合并以及去黑边(附 Global Mapper Pro 24.0 安装包(中文注册版))

为什么要对正射影像DOM进行拼接?影像去黑边、影像拼接的操作和步骤。

从地图看世界的专栏 4298

iPhone/iPad开发札记 2012/03/09 音频

1. 后续工作 * 解决按hear钮按下后,event处理时间太长 * 解决有时听不见声音的问题 * 整理代码 * 声音采集 2. 听不见声音 error in console:  notification: Invalid mode encountered. The stream is corrupted. notification: More t

printf1998的专栏 2651

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

iPhone/iPad开发札记2012/03/11 -2 Audio Unit

1. Reading  "Audio Unit Hosting Guide for iOS" /  "Audio Unit Processing Graph Service References" / - for managing the graph ( a collection of units ) "Audio Component Services Reference" / - for

printf1998的专栏 2188

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

iPhone/iPad开发札记 2012/03/10 音频:录音与混音

1. reading my code for recording  * MyInputBufferHandler  Q: 这里有Enqueue Buffer动作,这样,这个buffer有机会重新fill    A: YES!. callback中总会有enqueue动作的,无论recording还是playback.  Q: 参数含义 voidAQRecorder

printf1998的专栏 1766

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

iPhone/iPad开发扎记 2012/02/18

1. 几个问题: Q:从Session拿到的音频数据的格式?codec?     A:通过一个C语言库方法readAudioData(...) 2012/03/12 Q:Session如何提供多路音频的?     A: readAudioData(...)中有参数可以选择 Q:captured audio data如何传给Session?     A:通过C库s

printf1998的专栏 1562

iPhone/iPad札记2012/03/11 - 1 音频,混音

1. conference音频问题总结 * 音频双向都通过,但不稳定,时好时坏(录音只成功过一次,播放曾有过连续工作20-30分钟一切正常的记录,但重启系统后就出现问题)     Q Action: to see how often the callback would be called ?         A: playing: 10 ms, recording 3ms  *

printf1998的专栏 1391

iPhone/iPad开发札记 2012/03/08 音频

1. MixerHost  * setupAudioSession  这个方法可以 commented out ! Q: Why 不影响使用playing过程 ?比如sample rate/catetory之类? * understanding ASBD  /*!     @struct         AudioStreamBasicDescription

printf1998的专栏 1318

iPhone/iPad开发札记2012/03/12 Audio Unit

1. MixerHost  * AudioBufferList  Declaration: struct AudioBufferList {   UInt32      mNumberBuffers;   AudioBuffer mBuffers[1];}; Q:WHY AudioBuffer[1]? WHY NOT AudioBuffer *? seems the same

printf1998的专栏 1150

iPhone/iPad开发扎记2012/02/19

### To play *.pcm file from Jiarong  1. play system sound  * 9:50 am. can play system sound now. ( 1:30 hours )  Summary:  # must have a "-" for methods # adding a resources file ( tap.cif )

printf1998的专栏 949

iPhone/iPad开发扎记2012/02/20

在执行以下语句的时候,出现错误: int result =readAudioDataPackets(THIS->GetCurrentPacket(), &numBytes, inCompleteAQBuffer->mAudioData); GDB: Program received signal: "EXC_BAD_ACCESS".  Q: BUFFER 似乎没有分配

printf1998的专栏 768
上一篇: UC故事+iPhone/iPad Audio Unit 2012/05/17
下一篇: 读书时间 C++ Standard Lib 2012/05/19
printf1998
博客等级 码龄16年 14粉丝 196原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值