core-audio

CoreAudio AudioFileStream

I use a modified version of AudioFileStreamExample (/Developer/Examples/CoreAudio/Services/AudioFileStreamExample/afsclient.cpp) to play streamed audio. My problem is now that if I try to stop the audio playback, the playback thread is blocked until MyAudioQueueOutputCallback is called. How can I stop it without waiting for the MyAudioQu...

Converting audio to CAF format for playback on iPhone using OpenAL

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

How can I record AMR audio format on the iphone?

A voice recorder doesn't need uncompressed Linear PCM audio. Compressed AMR would do fine. The iPhone framework built for recording audio is simple enough, but the only examples I've found for setting up the audio format (which come from Apple) use LinearPCM. I've tried various other combinations of values, but can't seem to get anyth...

SpeakHere sample can't play sound which loads from internet

I'd like to play sound file which loaded from internet, so I tried to start from iPhone SDK SpeakHere sample. I recorded the sound, then saved and uploaded to the internet, I could download that file and play without problem from sound tools. But when I tried to play that URL from SpeakHere, I am getting error Program received signal: “...

aurioTouch sample app's audio playback/thru not working?

According to Apple's description, the aurioTouch sample app is suppose to "get the audio input and copy it to the output", which I think means that the app will playback/thru any sound the iPhone's mike picks up through the iPhone's speakers. When I loaded the app onto my iPhone (updated to 2.2), however, the playthru feature does not s...

Polyphonic sound playback

I need audio playback with these features: good performance (for game), pitch control, and ability to layer the same sample multiple times at the same time (polyphony). What would be a quick way to get this on the iphone sdk? Here's what I found out so far: There's no available libraries or sample code that does this, please show me ...

Tone Generation in Cocoa Touch

I need to generate a tone that I can manipulate frequency and wave. The overall goal is to create a basic piano. Does anyone know how I can achieve this? My development platform is the iPhone 2.x ...

Open Source sound engine

When I started using SoundEngine (from CrashLanding and TouchFighter), I had read about a few people recommending not to use it, for it was, according to them, not stable enough. Still it was the only solution I knew of to play sounds with pitch and position control without learning C++ and OpenAL, so I ignored the warnings and went on w...

How can I fix the sound in my iPhone app for iPhone OS 2.2?

The sound for my iPhone app worked fine when I was running iPhone OS 2.0. I updated to OS 2.2 and now the sound only works with headphones. How can I make the sounds work for both headphones and the speaker again? ...

ExtAudioFileOpenUrl giving EXC_BAD_ACCESS

Hello all, I have created a sample application using the iPhone SDK that uses ExtAudioFileOpenURL from the AudioToolBox framework. I have a test.mp3 audio file in my app's document folder. When I tried to open this audio file using this API I received EXEC_BAD_ACCESS. I couldn't figure out why. Here is a code snippet: NSArray *arr = N...

NSSound on the iphone

I've been looking for a while how to play sound on the iphone, and I think it's something along the lines of: [[NSSound soundNamed:@"cat.mp3"] play]; But the NSSound is on the AppKit ... any suggestions ? I know there is a really simple answer to this, but today my searches are not rendering any result ... ...

Text to speech on iPhone

Hi Is there any way we can convert text to speech in an iPhone app? Is it possible using the SDK? Thanks Are there any third-party TTS engines available for the iPhone? (AFAIK Acapela is not yet released) ...

iPhone SDK:Saving a streamed audio file to Documents folder

Hi I want to save an audio file to the Documents folder of my application while one of the classes in my app is streaming it. How can I do this? Is it possible to save the streamed audio directly to an mp3? (if the audio file being streamed is an mp3 or I have to use caf?) Thanks. Edit: What if I am running the save in another threa...

How to use afconvert to convert from .caf to .mp3 format?

Hello everybody. I am using the afconvert command line utility to convert an audio file from .caf to .mp3 format. I have used afconvert: afconvert -f 'MPG3 ' -d '.mp3' -v input.caf output.mp3 But this gives me the following error: Input file: input.caf, 19008 frames Error: ExtAudioFileSetProperty ('cfmt') failed ('fmt?') I have al...

How do I record and play back sound on the iPhone?

In my app I've got certain buttons which use the following code: SystemSoundID beep; CFStringRef beepPath = (CFStringRef) [NSString stringWithFormat: @"%@/SoundFile.aif", [[NSBundle mainBundle] bundlePath]]; AudioServicesCreateSystemSoundID (CFURLCreateWithFileSystemPath (NULL, beepPath, kCFURLPOSIXPathStyle, false), &beep); CFRelease(...

iPhone SDK: Record time of buttons in a sequence to play back

I've got an app in development where you press a button to play a sound using System beep. Instead of recording the output, I was thinking of recording the timing of when the buttons were pressed, so when the user presses a 'Play' button, the buttons are pressed in the same timing the user has pressed them, so it acts like the iPhone ha...

Simple metronome - Play an AIF every x number of milliseconds

I've had a look at the metronome sample given by Apple, however, the sample is too complicated and includes things not needed in my project. Is there a simple way to make a system sound play every x number of milliseconds? ...

CoreAudio: Why does ExtAudioFileCreateWithURL return 0xFFFFFFCE ?

It's meant to return an OSType, but instead I'm just getting -50. Does anyone have any idea what error this represents? I can't find it anywhere. A code snippet for context (the error is so ambiguous I don't know what snippet to paste, here's pretty much everything): ExtAudioFileRef cafFile; AudioStreamBasicDescription cafDesc; cafDes...

extracting mp3 file duration using AudioQueueServices

I have implemented a streaming mp3 player using AudioQueueServices, that downloads mp3s over an NSURLConnection. Playback, pausing, and seeking work great, however I can't figure out how to extract the duration of the audio from the mp3 files while they are still being downloaded. I'd like to be able to pull the info from the id3 tags...

Problem with iPhone application that plays Sound

I've developed an iPhone application that plays Sound. However, when I play a sound in the simulator, the console shows the lines below (also shown in this screenshot). [12:07:07.505 <0xb0185000>] could not find audio decoder component 64766938 for registration [12:07:07.506 <0xb0185000>] could not find audio decoder component 6D7300...