audiotoolbox

background music stops after 3/4 runs in iphone app

I am playing sounds in loop in my app. So it should continue playing through out the app. but sometimes it stops after playing sound for 3/4 times.I don't understand whats happening. I am using audio-toolbox framework for playing sound. creating audio queue and then playing sounds in loop. I am also playing sound from ipod library using...

Playing wav files with AudioServices in iPhone

Hi All, I am trying to play two .wav files in my appllication, but i am only able to play the first wav file , the second file is not at all playing. I have added the AudioToolbox framework. In my .h file i have included the Audiotoolbox.h file and has the following declarations //Beep Sound SystemSoundID soundFileObject; SystemSou...

AudioServicesPlaySystemSound not playing sounds

hi All, I am playing a small .wav file using the AudioToolBox. AudioServicesPlaySystemSound (soundFileObject); But sometimes it is not playing. What is the reason ??? Thanks ...

AVAudioPlayer not unloading cached memory after each new allocation

I am seeing in Instruments that when I play a sound via the standard "AddMusic" example method that Apple provides, it allocates 32kb of memory via the prepareToPlay call (which references the AudioToolBox framework's Cache_DataSource::ReadBytes function) each time a new player is allocated (i.e. each time a different sound is played). ...

iphone: Help with AudioToolbox Leak: Stack trace/code included here...

Part of this app is a "Scream" button that plays random screams from cast members of a TV show. I have to bang on the app quite a while to see a memory leak in Instruments, but it's there, occasionally coming up (every 45 seconds to 2 minutes.) The leak is 3.50kb when it occurs. Haven't been able to crack it for several hours. Any help ...

Simple sound effect loop using AudioToolKit

I've created a few sounds for use in my game. I can play them at certain events without issue: // create sounds CFBundleRef mainBundle; mainBundle = CFBundleGetMainBundle(); _soundFileShake = CFBundleCopyResourceURL(mainBundle, CFSTR("shake"), CFSTR("wav"), NULL); AudioServicesCreateSystemSoundID(_soundFileShake, &_soundIdShake); // l...

Application crashes at AudioToolbox thread on a stressed iPod Touch, fw 3.1.3

Hello all, I encountered an AudioToolbox crash in my application. Here's the crash log, http://paste.uni.cc/20775 And I'm using AudioToolbox + OpenAL to play music (m4a) and sound (wav). It happens only on stressed device. So I can't tell what's wrong with it. The crash log didn't report not enough memory, but instead of that, ...

How do you select audio input device in core audio?

I am writing a program that needs to deal with multiple audio inputs. I am currently using AudioQueues to get the input, but this is only from the default input device. Is there any way to either: Select which input device the AudioQueues use. Change the default input device. I know that I can use kAudioHardwarePropertyDevices in C...

How do I make an array of SystemSoundIDs? Using AudioToolbox framework

I'm used to creating sounds like this: NSString *explosionsoundpath = [[NSBundle mainBundle] pathForResource:@"explosion" ofType:@"caf"]; CFURLRef explosionurl = (CFURLRef ) [NSURL fileURLWithPath:explosionsoundpath]; AudioServicesCreateSystemSoundID (explosionurl, &explosion1a); AudioServicesCreateSystemSoundID (explosionurl, &explosio...

How can I resolve this build warning involving a missing i386 architecture file?

I am getting the following build warning: ld: warning: in /Users/syalam/Documents/git/stocktwits-iphone/AudioToolbox.framework/AudioToolbox, missing required architecture i386 in file How can I resolve? ...

Convert Recorded sound in iphone from one format to another say wav to mp3

Hi, I am trying to record some audio and convert them to other sound formats. I am using AVAudioRecorder class to record and these are the recording settings I used.. NSDictionary *recordSetting = [[NSMutableDictionary alloc] init]; [recordSetting setValue:[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey];//kAudioF...

iPhone audio frameworks

Hello, Does AVFoundation Framework internally speak to AudioToolbox Framework? Because AudioToolbox holds all these services Audio Converter Services Audio File Services Audio File Stream Services Audio Format Services Audio Queue Services Audio Session Services Audio Unit Processing Graph Services Extended Audio File Services System ...

objective c audio toolbox volume setting and balance problem

Hi guys, I'm trying to use kAudioHardwareServiceDeviceProperty_VirtualMasterVolume; to set the volume of the device. The docs says that "If the device has individual channel volume controls, this property applies to those identified by the device's preferred multichannel layout, or the preferred stereo pair if the device is stereo only...

Why does this Audio Unit RemoteIO initialisation work on iPhone but not in simulator?

I am using the Audio Unit services to set up an output rendering callback so I can mix together synthesized audio. The code I have seems to work perfectly on the devices I have (iPod Touch, iPhone 3G, and iPad) but fails to work on the simulator. On the simulator, the AudioUnitInitialise function fails and returns a value of -10851 (kA...

Sound balance keeps jumping

I'm using AudioHardwareServiceSetPropertyData to set the master volume. I'm using the following: AudioObjectPropertyAddress propertyAOPA; propertyAOPA.mElement = kAudioObjectPropertyElementMaster; propertyAOPA.mScope = kAudioDevicePropertyScopeOutput; The problem I'm facing now is that, the sound volume can be set properly in my app, ...

Convert code to function

Hello everyone i need to convert this code to a function with 2 parameters in this case the first parameter is News and the second one aif can u do this ?? -(IBAction)news { CFURLRef soundFileURLRef; SystemSoundID soundFileObject; CFBundleRef mainBundle; mainBundle = CFBundleGetMainBundle (); // Get the URL to the sound file t...

using remoteio together with AudioServicesPlaySystemSound

hello we are trying to use remoteio for audio recording in conjunction with the AudioServicesPlaySystemSound function for audio playback. the problem is that whenever remoteio is running the playback volume drops significantly. it seems like if some final mixing takes place behind the scene but we do not no how to change this behavior. ...

Can I play loops using Audio Toolbox?

hello all, in my app i use AudioToolbox framework and i need to play a loop can i ? this is the AVAudioplayer code that goes slowly with 2 touches simultaneously - (AVAudioPlayer *)getNoteFromFilename:(NSString *)name andoftype:(NSString *)type{ NSString *soundPath = [[NSBundle mainBundle] pathForResource:name ...

Audiotoolbox Sound Volume Issue

I have some Audiotoolbox sounds. I created a sound in a UIViewController A. Using AudioServices functions, I play them, and it's fine. When I change the system sound volume via device (with my finger), the sound's volume behaves just fine and changes accordingly. But then I alloc another UIViewController B and add its view as a subvie...

Audio Processing: Playing with volume level

I want to read a sound file from application bundle, copy it, play with its maximum volume level(Gain value or peak power, I'm not sure about the technical name of it), and then write it as another file to the bundle again. I did the copying and writing part. Resulting file is identical to input file. I use AudioFileReadBytes() and Audi...