core-audio

extAudioFile data... am I getting the right stuff?

I am using the EXTAudioFileReadTest app provided in the Core Audio SDK documentation and I'm trying to get all of the floating point values from the mData buffer so that I can draw a waveform with them. Currently, I'm printing out the floating point values for single channel and this is what I'm getting in the console: 2010-09-10 19:2...

Trying to identify problem with core audio vs iPhone background execution

I have an audio app in the store. It works fine with versions of the iPhone OS before iOS 4.0. I am working on a new version, starting by bringing the app into compliance with the new iOS multitasking capabilities. (I have iOS 4.0 on my iPhone, and have upgraded to the latest xCode and SDK.) The result has been a show-stopper. o When ...

Macintosh - Detect if any data come out of Audio Card in a span of time

MODIFIED: Hi all, I need to detect if any data sent to Audio Card during a period of time. Thanks to Philip Regan's help, I found a simple sample code about audio recording as shown in following link: http://developer.apple.com/library/mac/#samplecode/AudioQueueTools/Listings/aqrecord_cpp.html#//apple_ref/doc/uid/DTS10004380-aqrecord_...

Tick sound to be kept in memory. AVAudioPlayer? SystemSounds? Core Audio?

I'm trying to play a very small audio file - it's roughly 0.05s in length, and it's an uncompressed .wav file. Rgiht now, I'm using AVAudioPlayer to play the sound. I intend to play the sound with high rapidity alongside a spinner, a la The Price Is Right or Wheel of Fortune. If I instantiate the AVAudioPlayer with a loop count of 100...

Core Audio AudioFIleReadPackets... looking for raw audio

I'm trying to get raw audio data from a file (i'm used to seeing floating point values between -1 and 1). I'm trying to pull this data out of the buffers in real time so that I can provide some type of metering for the app. I'm basically reading the whole file into memory using AudioFileReadPackets. I've create a RemoteIO audio unit to...

Iphone offline render of avasset track-- how to get packet size?

Does anybody know how to pull the max packet size from an AVAssetTrack? Or an AVAsset in general? I'm trying to set up an offline rendering audio queue by reading directly from the ipod assets, and I'm stuck trying to figure out how big to make my render buffer. Thanks! Will ...

iphone: (audio) posting message to kill mediaserverd

Hi guys, i'm playing several sounds using AudioServices AudioServicesPlaySystemSound ( aSystemSoundID ); when i test the project on the iphone (3g) attached to the machine i got this message: 2010-09-16 17:29:29.672 myProject[6528:6def] [17:29:29.672 <0x85d400>] PlaySound posting message to kill mediaserverd (5958) [Swi...

iPhone: AudioBufferList init and release

What are the correct ways of initializing (allocating memory) and releasing (freeing) an AudioBufferList with 3 AudioBuffers? (I'm aware that there might be more than one ways of doing this.) I'd like to use those 3 buffers to read sequential parts of an audio file into them and play them back using Audio Units. ...

play the sound from mic using the AUGraph

hi guys, when i'am using the AUGraph to realize playing sound from the mic, i have a problem, in the device(iphone 3g), i can only hear from the right side of the headset, but it is well in the simulator, i can hear from both of the side of the headset. here are the code i use to connect the input to the output: AUGraphConnectNodeInp...

How to convert WAV audio files for Core Audio playback?

I'm using Core Audio / OpenAL to play CAF audio files. From Apple I know that the best file format is this: Core Audio File Format (CAFF), mono, 16-bit @ 44,1 kHz So I launched Soundtrack Pro 3 and saved an WAV file as an "Core Audio File" with 44,1 kH, 16-bit integer. When I play it back, it is strongly distorted and has a horrible q...

How do you play a section of audio using an audioqueue?

Working from the speakhere sample code I have managed to specify the start time by setting mCurrentPacket. How can I set the end time? I figure its to do with the amount of frames you buffer but I can't seem to get it working. ...

AudioUnit: access ComponentKernel properties from CocoaView

Hi, I would like to access my AudioUnit Component Kernel members from an action method defined in the cocoa view of my AudioUnit Component : - (IBAction)iaParam1Changed:(id)sender { float floatValue = [sender floatValue]; NSAssert(AUParameterSet(mParameterListener, sender, &mParameter[0], (Float32)floatValue, 0) == noErr, @"[MyA...

Extracting Amplitude Data from Linear PCM on the iPhone

I'm having difficulty extracting amplitude data from linear PCM on the iPhone stored in a audio.caf. My questions are: Linear PCM stores amplitude samples as 16-bit values. Is this correct? How is amplitude stored in packets returned by AudioFileReadPacketData()? When recording mono linear PCM, isn't each sample, (in one frame, in one...

iOS multitasking for an Audio Recording application

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

How to use AVAudioplayer plyer impementation without leak

hi made application in which i used avaudioplayer for playing background sound. but i get leak in my project when first time sounds come. can any one guide me how to implement avaudioplayer without leak. ...

record in mp3 format in iphone sdk

Hello all, I am searching over this from last 2 days but still haven't find anything helpful for this. I want to record audio in mp3 format using core audio. Right now i'm recording in LinearPCM caf format. Does someone knows how to record in mp3 format or an alternative is to convert caf to mp3. Thanks ...

Best Framework for Audio

I am making an application for iPhone/ipod Touch. In that application I am recording the voice of a human storing it in a file in NSTemporaryDirectory() and then playing it. So far I have used AVAudioPlayer and AVAudioRecorder but after some time when I record it simultaneously it plays the sound I don't know why? And more over my applic...

How can an Audio Unit detect start and stop of its host?

Hi, How can an Audio Unit component detect start and stop of an Audio Unit host? Within the component's Kernel Process(), I tried with the CallHostTransportState(...) method, which returns whether the host is playing or not, therefore I can detect a first start; but the Process() is not called anymore when the host stops, so I can't de...

How do I check if the iPod supports audio recording?

How do I check if the iPod supports audio recording using Cocoa API? ...

how to stop audio playing if user leaves the view

I have an audio file that plays when a user clicks on one view. my problem is that if they move to another view the audio continues to play. I would like the audio to stop if the user is no longer on that view. is this done in the viewDidUnload method? here's the code that plays the audio after a 15sec delay: -(void)startPlaying { ...