core-audio

core audio offline rendering GenericOutput

独自空忆成欢 提交于 2019-11-27 00:43:04
Anybody successfully done offline rendering using core-Audio.? I had to mix two audio files and apply reverb(used 2 AudioFilePlayer,MultiChannelMixer,Reverb2 and RemoteIO). Got it working. and i could save it while its previewing(on renderCallBack of RemoteIO). I need to save it without playing it (offline). Thanks in advance. Offline rendering Worked for me using GenericOutput AudioUnit. I am sharing the working code here. core-audio framework seems a little though. But small-small things in it like ASBD, parameters ...etc are making these issues. try hard it will work. Don't give-up :-).

Converting audio to CAF format for playback on iPhone using OpenAL

狂风中的少年 提交于 2019-11-26 23:45:36
问题 I am using the SoundEngine sample code from Apple in the CrashLanding sample to play back multiple audio files. Using the sample caf files included with CrashLanding everything works fine but when I try and use my own samplesconverted to CAF using afconvert all I get is a stony silence ;) Does anyone have settings for afconvert that will produce a CAF file capable of being played back through OpenAL? 回答1: afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf References: Apple's Multimedia

How to set an title of the currently playing audio in iPhone lock screen?

蹲街弑〆低调 提交于 2019-11-26 22:42:24
问题 When you play a music, the music title is shown below the time in the lock screen. I have also seen how TuneIn radio does that by showing the name of the currently playing radio station. How do you do that? 回答1: Read the documentation: MPNowPlayingInfoCenter And here is an example code that will work on iOS 5 and it will not crash on older versions of iOS. Class playingInfoCenter = NSClassFromString(@"MPNowPlayingInfoCenter"); if (playingInfoCenter) { MPNowPlayingInfoCenter *center =

Can anybody help me in recording iPhone output sound through Audio Unit

﹥>﹥吖頭↗ 提交于 2019-11-26 22:40:40
问题 this is my code : i use this code to record the iPhone output audio by using Audio Unit then saving the output in output.caf but the output.caf file is empty any body have idea about what shall i do ? the output audio file is empty this is intializing the audio unit -(void) initializaeOutputUnit { OSStatus status; // Describe audio component AudioComponentDescription desc; desc.componentType = kAudioUnitType_Output; desc.componentSubType = kAudioUnitSubType_RemoteIO; desc.componentFlags = 0;

Record and play audio Simultaneously

你。 提交于 2019-11-26 20:32:59
Any one help to me to record and play audio Simultaneously in Iphone. 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. You can get a use from AVFoundation framework. It has AVAudioPlayer to play audio files and AVAudioRecorder to record. You have to bear in mind that Recorder will record with the use of mic only. So with the

Drawing waveform with AVAssetReader

心已入冬 提交于 2019-11-26 17:59:49
I reading song from iPod library using assetUrl (in code it named audioUrl) I can play it many ways, I can cut it, I can make some precessing with this but... I really don't understand what I gonna do with this CMSampleBufferRef to get data for drawing waveform! I need info about peak values, how I can get it this (maybe another) way? AVAssetTrack * songTrack = [audioUrl.tracks objectAtIndex:0]; AVAssetReaderTrackOutput * output = [[AVAssetReaderTrackOutput alloc] initWithTrack:songTrack outputSettings:nil]; [reader addOutput:output]; [output release]; NSMutableData * fullSongData = [

Forcing iPhone Microphone as Audio Input

喜欢而已 提交于 2019-11-26 16:44:52
问题 I am developing an iOS application (targetted specifically for iPhone, at the moment) that requires the application to record audio only from iPhone internal microphone (even when headphone/headset is plugged in), and playback at headphone (let's assumed headphone is plugged in for now). I am wondering if this is currently possible with the available APIs? If so, can anyone please shed some light on how do I go about doing this? Thanks! 回答1: I believe the answer to this question to be 'no'. I

Write Audio To Disk From IO Unit

ⅰ亾dé卋堺 提交于 2019-11-26 16:21:33
问题 Rewriting this question to be a little more succient. My problem is that I cant successfully write an audio file to disk from a remote IO Unit. The steps I took were to Open an mp3 file and extract its audio to buffers. I set up an asbd to use with my graph based on the properties of the graph. I setup and run my graph looping the extracted audio and sound successfully comes out the speaker! What I'm having difficulty with is taking the audio samples from the remote IO callback and writing

Real-time Pitch Shifting on the iPhone

别说谁变了你拦得住时间么 提交于 2019-11-26 15:23:18
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. you can use dirac-2 from dsp dimension for pitch shifting on the iphone. quote: - "DIRAC2 is available as both a commercial object library offering unlimited sample rates and phase locked multichannel support and as a free single channel, 44.1

Playing back audio using AVAudioPlayer iOS 7

一个人想着一个人 提交于 2019-11-26 14:56:05
问题 I'm struggling to follow Apple's documentation regarding playing back a small .wav file using the AVAudioPlayer class. I'm also not sure what toolboxes I need for basic audio playback. So far I have imported: AVFoundation.framework CoreAudio.framework AudioToolbox.framework Here is my code .h and .m : #import <UIKit/UIKit.h> #import <AVFoundation/AVFoundation.h> @interface ViewController : UIViewController <AVAudioPlayerDelegate> - (IBAction)playAudio:(id)sender; @end #import "ViewController