core-audio

Trim audio with iOS

血红的双手。 提交于 2019-11-26 13:54:37
问题 I want to implement a feature that lets the user trim an audio file (.caf) which he perviously recorded. The recording part already works, but how can i add a trimming feature similar to the one in the Voicememos app. Is there an api for the audio trimmer apple uses? Any help would be great... 回答1: How about using the AVFoundation? Import the audio file into an AVAsset (composition etc), then you can export it - setting preferred time + duration - to a file. I wrote a stock function awhile

AudioObjectGetPropertyData to get a list of input devices

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 13:19:02
问题 How do I utilize AudioObjectGetPropertyData in OS X to retrieve a list of the system's input devices? I currently have the following dummy code for retrieving a global list of devices: AudioDeviceID devices[12]; UInt32 arraySize = sizeof(devices); AudioObjectPropertyAddress thePropertyAddress = { kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster }; AudioObjectGetPropertyData(kAudioObjectSystemObject, &thePropertyAddress, 0, NULL, &arraySize,

Get Hz frequency from audio stream on iPhone

北慕城南 提交于 2019-11-26 12:55:36
问题 What would be the best way to get Hz frequency value from audio stream(music) on iOS? What are the best and easiest frameworks provided by Apple to do that. Thanks in advance. 回答1: Questions like this are asked a lot here on SO. (I've answered a similar one here) so I wrote a little tutorial with code that you can use even in commercial and closed source apps. This is not necessarily the BEST way, but it's a way that many people understand. You will have to modify it based on what you mean by

iOS multitasking for an Audio Recording application

自古美人都是妖i 提交于 2019-11-26 12:07:39
问题 I am writing an application that records audio. I am looking into the feasibility of supporting multitasking while doing audio recordings (in the background). The answer seems to be a no from what I\'ve read so far, especially since the program is meant to release any system resources being used when switched out. So I am wondering, is it possible to let the user switch to another application in iOS while my application continues to capture audio in the background? 回答1: You can. Skype does

Recording to AAC from RemoteIO: data is getting written but file unplayable

依然范特西╮ 提交于 2019-11-26 10:56:33
问题 I have been trying to record from a RemoteIO unit directly to AAC in a renderCallback in iOS 5 on an iPad 2. I have seen conflicting info saying it is not possible & that it is possible (in the comments here). My reason for wanting to do it is because recording to PCM requires so much disk space for a recording of any length - even if it is later converted to AAC. I\'m about ready to give up though. I\'ve scraped through Google, SO, the Core Audio book and the Apple Core-Audio mailing list &

Record and play audio Simultaneously

时光总嘲笑我的痴心妄想 提交于 2019-11-26 07:38:17
问题 Any one help to me to record and play audio Simultaneously in Iphone. 回答1: You can play and record simultaneously on iOS devices (except the 1st gen Touch) using either the Audio Unit RemoteIO or the Audio Queue API. These are lower level APIs where you have to handle the incoming buffers of outgoing and incoming PCM samples yourself. See Apple's aurioTouch sample app for example code. 回答2: You can get a use from AVFoundation framework. It has AVAudioPlayer to play audio files and

Text to speech on iPhone [closed]

僤鯓⒐⒋嵵緔 提交于 2019-11-26 06:31:54
Is there any way we can convert text to speech in an iPhone app? Is it possible using the SDK? I don't think iPhone SDK provides any TTS facility internally. You should use a third party TTS engine or write one yourself. The Flite speech synthesis engine can be run on an iPhone, ref http://artofsystems.blogspot.com/2009/02/speech-synthesis-on-iphone-with-flite.html OpenEars also does text-to-speech on the iPhone (note: I'm the developer). willium I'm probably bumping a dead thread but the Flite text-to-speech engine worked wonders for me! Hope it helps! Here's another text to speech: https:/

Real-time Pitch Shifting on the iPhone

一世执手 提交于 2019-11-26 04:24:07
问题 I have a children\'s iPhone application that I am writing and I need to be able to shift the pitch of a sound sample using Core Audio. Does anyone have any example code I could look at where this is done. There are many music and game apps in the app store that do this so I know I am not the first one. However, I cannot find any examples of it being done. 回答1: you can use dirac-2 from dsp dimension for pitch shifting on the iphone. quote: - "DIRAC2 is available as both a commercial object

Text to speech on iPhone [closed]

六眼飞鱼酱① 提交于 2019-11-26 01:57:30
问题 Is there any way we can convert text to speech in an iPhone app? Is it possible using the SDK? 回答1: I don't think iPhone SDK provides any TTS facility internally. You should use a third party TTS engine or write one yourself. 回答2: The Flite speech synthesis engine can be run on an iPhone, ref http://artofsystems.blogspot.com/2009/02/speech-synthesis-on-iphone-with-flite.html 回答3: OpenEars also does text-to-speech on the iPhone (note: I'm the developer). 回答4: I'm probably bumping a dead thread