core-audio

Delay when using AudioQueueStart()

I am using the Audio Queue services to record audio on the iPhone. I am having a latency issue though when starting recording. Here is the code (approx): OSStatus status = AudioQueueNewInput( &recordState.dataFormat, // 1 AudioInputCallback, // 2 &recordState, // 3 CFRunLoopGetCurrent(), // 4 kCFRunLoopCommonModes, // 5 0,...

Real-time Pitch Shifting on the iPhone

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 ...

Amr Encoder for Iphone

Hi , I was trying to find an AMR Encoder for Iphone That I can integrate with my Voice recording application. Thanks, ...

How do I integrate an Audio Unit to an app

How do I integrate an audio unit into an application. I may not be familiar with the concept of components. I can open them in AUlab but I want to use it with a main. ...

Xcode, Core Audio: How do I route the audio from the lineout to an application?

Hi, I need to make a Mac app that grabs the audio going to the lineout and renders it into memory. Is it possible to do this with core audio and if so is it at a high enough level to do this simply or do I need to do like soundflower and create a virtual sound device. Do you know any reference where I can get do this myself. ...

HAL - how to monitor audio output on a mac

There is an application called wiretap available at http://www.ambrosiasw.com/utilities/wiretap/ This application can record the system audio. I would like to be able to do the same in my program. Any insights on what I need to do this? I am familiar with Core Audio but havent found anything on how to do this. would this help getti...

AVAudioPlayer resetting currently playing sound and playing it from beginning

I'm having an issue using AVAudioPlayer where I want to reset a player if it's currently playing and have it play again. I try the following with no luck: The sound plays once but then the second time i select the button it stops the sound, the third time starts the sound up again. //Stop the player and restart it if (player.playing) ...

How do I get the filesystem path for a resource on iPhone?

On the iPhone I need to get the path for the resource. OK, done that, but when it comes to CFURLCreateFromFileSystemRepresentation thing, I just don't know how to solve this. Why does this error occur? Any solution or workaround would be highly appreciated. Thank you in advance. I have taken a look at the following examples in order to ...

What is the setup proceedure for an AUConverter for use in an Core Audio AUGraph

I want to convert from pcm 44100khz 16bit signed 2 channel interleaved (packed) format to 44100khz floats 2 channel non-interleaved (2 buffers) format for use in an AUGraph. I have been messing with it for a few days. whats the best way to set up an AUConverter to do this ...

How can I detect if headphones are connected to an iPod touch G1?

There are many articles on how to detect if a microphone is connected to an iPod touch G2 via AudioSessionGetProperty / kAudioSessionProperty_AudioInputAvailable, but I have not seen any articles related to detection of headphones connected to an iPod touch G1. To review: iPod touch G2 hardware differs from iPod touch G1 hardware in the...

Reading audio buffer data with AudioQueue

I am attempting to read audio data via AudioQueue. When I do so, I can verify that the bit depth of the file is 16-bit. But when I get the actual sample data, I'm only seeing values from -128 to 128. But I'm also seeing suspicious looking interleaved data, which makes me pretty sure that I'm just not reading the data correctly. So to be...

Is there a way to render IPhone mic input directly into memory without working with files?

I see that the IPhone core audio does not include audioDevice objects to render audio input directly into RAM. I hear people talking about using files to do this(like speak here) but I am thinking there must be a way to do this otherwise. Your thoughts would be appreciated. ...

Mac libraries for audio processing/sound file splitting

I'm working on a quick application for my church to assist their recording of services. As of right now, they record the service with protools (LE 6.5 to be specific), run a compressor, normalizer, and limiter to the track, and export it as a wav. Prior to me helping them, they used another tool to split that audio file into 5 minute s...

Recommended Apple iPhone Audio Recording Settings and what file extension to use

I would like to get your recommendation on what settings to use for audio recording using AVAudioRecorder. Below is the settings I am using currently. Also, what file extension should I save it as so users on Mac or Windows can play it without difficulties? Right now I am saving the file out as .caf [settings setValue:[NSNumber n...

How to get the uncompressed file size of an MP3 file using CoreAudio API

Using CoreAudio, I am able to get the sampleRate (frames per second) and the file size, but in order to get the "total" time of the song, I need to know the Real file size of that compressed mp3. AudioStreamBasicDescription asbd; UInt32 asbdSize = sizeof(asbd); // get the stream format. err = AudioFileStreamGetProperty(inAudioF...

How can my iPhone program play m4p media?

I can use Core Audio to play m4a but not m4p. Do you have any idea what method I should use in this case? thank you! ...

Playing audio files on the iPhone

I've made a simple app, where I have a list of songs. The user taps a list entry and the song begins playing. I've lifted the SoundEffect class from Apple's sample projects (e.g. Metronome, BubbleLevel). It seems to work fine with the following code: // declare in the .h file SoundEffect *audio; // setup - when controller loads audi...

How do I synthesize sounds with CoreAudio on iPhone/Mac

I'd like to play a synthesised sound in an iPhone. Instead of using a pre-recorded sound and using SystemSoundID to play an existing binary, I'd like to synthesise it. Partially, that's because I want to be able to play the sound continuously (e.g. when the user's finger is on the screen) instead of a one-off sound sample. If I wanted t...

Play sound using AudioQueue in iPhone

Hi, I am totaly newbie in developing audio based application. I have explored AV foundation to play and record audio. And it plays fine for the pre-recorded file. But, I want to synthesize sounds(of different frequency) and play it like piano app. Is it possible with AudioQueue? Please provide me some tutorial, links or code base. ...

AudioQueueOfflineRender returning empty data

I'm having problems using AudioQueueOfflineRender to decode AAC data. When I examine the buffer after the call, it is always filled with empty data. I made sure the input buffer is valid and packet descriptions are provided. I searched and found that a few others have had the same problem: http://lists.apple.com/archives/Coreaudio-api/...