Search Results

Search found 36 results on 2 pages for 'audiotoolbox'.

Page 2/2 | < Previous Page | 1 2 

  • AVAudioPlayer Output to Speaker Problem

    - by Max
    After searching around for how to send AVAudioPlayer output to the iPhone's speaker, I found this: http://stackoverflow.com/questions/1064846/iphone-audio-playback-force-through-internal-speaker Despite setting the category correctly to AVAudioSessionCategoryPlayAndRecord, this solution doesn't seem to be working for me and won't even let the build compile, giving me this error: "_AudioSessionSetProperty", referenced from: ... ... ld: symbol(s) not found collect2: ld returned 1 exit status Am I not including something? I'm importing AudioToolbox, AVFoundation, and CoreAudio. My class implements AVAudioSessionDelegate, AVAudioRecorderDelegate, AVAudioPlayerDelegate, and UITextFieldDelegate. Any help would be greatly appreciated!

    Read the article

  • use more then one sound in my iphone application using cocos2d

    - by Rana
    avc = [[MPAVController sharedInstance] avController]; //avc is AVController NSString *path = [[NSBundle mainBundle] pathForResource:@"Sound" ofType:@"wav"]; id feeder = [[MPArrayQueueFeeder alloc] initWithPaths:[NSArray arrayWithObject:path]]; [avc setQueueFeeder:feeder]; [avc play:nil]; [feeder release]; NSTimer *sound = [NSTimer scheduledTimerWithTimeInterval:(9.0) target:self selector:@selector(Gamesoundplay) userInfo:nil repeats:YES]; Hear i use tow framework for playing sound. 1. MediaPlayer.framework 2. AudioToolbox.framework I success to play the background sound with repeat after lodding the game. I also want to play sound after clicking some button action without stop the previous background sound.But when i click the other button that time background sound is stop and start again after time intereval ( 9.0 sec ) which i mention for repeated the sound time line. If anyone do this work then help me to complete my application.

    Read the article

  • Play a beep that loop and change the frequency/speed

    - by Bono
    Hi all, I am creating an iphone application that use audio. I want to play a beep sound that loop indefinitely. I found an easy way to do that using the upper layer AVAudioPlayer and the numberOfLoops set to "-1". It works fine. But now I want to play this audio and be able to change the rate / speed. It may works like the sound played by a car when approaching an obstacle. At the beginning the beep has a low frequency and this frequency accelerate till reaching a continuous sound biiiiiiiiiiiip ... It seems this is not feasible using the high layer AVAudioPlayer, but even looking at AudioToolBox I found no solution. Does anybody have informations about how to do that? Thanks a lot for helping me!

    Read the article

  • ipod touch crashing after uploading app to device

    - by MaKo
    hi, I installed a new device (the second out of the 100), on xcode, an iPod touch but when I upload the app, the iPod crashes, apple logo shows, and gets frozen for a while, and then resusitates, in the xcode, I get the message on console: The Debugger has exited due to signal 15 (SIGTERM). I tried a simple app I made, and it loaded it, (some bouncing ball) after starting again, but tried the same with another app that plays some sounds and it shows normally, but doesnt play the sounds, questions: how to fix this issue? (in MyApp-info.plist, in bundle identifier, I have: com.yourcompany.${PRODUCT_NAME:rfc1034identifier} havent changed this, is this a problem?? 1.b. I used that conf to upload to an iPad with no problem?? Do the apps play normally sounds *.m4a, in the simulator it works!, not in the iPod, is this due to the crash or not? Thank you,, edit Im using AudioToolbox framework, the question after 1.b is 2 in my editor, but appears as 1 in the post??

    Read the article

  • iPhone audio Filter Question

    - by Joe
    Okay, I am going to try to make this totally not a "plz send teh codez kthxbai" I am considering an app which takes sound (eventually an audio track) and applies an audio filter to it. So I can play sounds with AudioServicesPlaySystemSound via AudioToolbox framework just fine. What I need is a very simple example of how I might take a sound and apply (for instance) midrange boost etc. Actually the kind of alteration is irrelevant -- if I can get my head around how the alteration is done I can figure out the rest. I am just finding both docs and examples of altering audio in code to be very scarce. Thanks for any help!

    Read the article

  • AVFoundation: Video to OpenGL texture working - How to play and sync audio?

    - by j00hi
    I've managed to load a video-track of a movie frame by frame into a OpenGL texture with AVFoundation. I followed the steps described in the answer here: iOS4: how do I use video file as an OpenGL texture? and took some code from the GLVideoFrame sample from WWDC2010 which can be downloaded here: http://bit.ly/cEf0rM How do I play the audio-track of the movie synchronously to the video. I think it would not be a good idea to play it in a separate player, but to use the audio-track of the same AVAsset. AVAssetTrack* audioTrack = [[asset tracksWithMediaType:AVMediaTypeAudio] objectAtIndex:0]; I retrieve a videoframe and it's timestamp in the CADisplayLink-callback via CMSampleBufferRef sampleBuffer = [self.readerOutput copyNextSampleBuffer]; CMTime timestamp = CMSampleBufferGetPresentationTimeStamp( sampleBuffer ); where readerOutput is of type AVAssetReaderTrackOutput* How to get the corresponding audio-samples? And how to play them? Edit: I've looked around a bit and I think, best would be to use AudioQueue from the AudioToolbox.framework using the approach described here: AVAssetReader and Audio Queue streaming problem There is also an audio-player in the AVFoundation: AVAudioPlayer. But I don't know exactly how I should pass data to it's initWithData-initializer which expects NSData. Furthermore I don't think it's the best choice for my case because a new AVAudioPlayer-instance would have to be created for every new chunk of audio samples, as I understand it. Any other suggestions? What's the best way to play the raw audio samples which i get from the AVAssetReaderTrackOutput?

    Read the article

  • iOS 5.0 AVAudioPlayer Error loading audio clip: The operation couldn’t be completed. (OSStatus error -50.)

    - by Jason Catudal
    So I'm trying to test out the audio player on the iPhone, and I went off Troy Brant's iOS book. I have the Core Audio, Core Foundation, AudioToolbox, and AVFoundation frameworks added to my project. The error message I get is in the subject field. I read like 20 pages of Google search results before resorting to asking here! /sigh. Thanks if you can help. Here's my code, pretty much verbatim out of his book: NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:@"Yonah" ofType:@"caf"]; NSLog(@"%@", soundFilePath); NSURL *fileURL = [NSURL URLWithString:soundFilePath]; NSError *error; audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:&error]; if (!error) { audioPlayer.delegate = self; //audioPlayer.numberOfLoops = -1; [audioPlayer play]; } else { NSLog(@"Error loading audio clip: %@", [error localizedDescription]); } EDIT: Holy Shinto. I figured out what it was. I changed NSURL *fileURL = [NSURL URLWithString:soundFilePath]; to NSURL *fileURL = [NSURL fileURLWithPath:soundFilePath]; to the latter and I was getting a weird error, weirder than the one in the subject BUT I googled that and I changed my OS input device from my webcam to my internal microphone and guess what, it worked under the fileURLWithPath method. I'll be. Damned.

    Read the article

  • EXC_BREAKPOINT when starting iPhone app

    - by pgb
    A user of our app sent me the following crash log: Incident Identifier: 59D4D5E7-570A-4047-A679-3016B2A226C4 CrashReporter Key: d8284d671ee22ad17511360ce73409ebfa8b84bb Process: .... [63] Path: /var/mobile/Applications/.... Identifier: ... Version: ??? (???) Code Type: ARM (Native) Parent Process: launchd [1] Date/Time: 2010-03-08 17:00:15.437 -0800 OS Version: iPhone OS 2.2.1 (5H11a) Report Version: 103 Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x00000001, 0xe7ffdefe Crashed Thread: 0 Thread 0 Crashed: 0 dyld 0x2fe01060 dyld_fatal_error + 0 1 dyld 0x2fe088d4 dyld::_main(mach_header const*, unsigned long, int, char const**, char const**, char const**) + 3064 2 dyld 0x2fe0196c dyldbootstrap::start(mach_header const*, int, char const**, long) + 884 3 dyld 0x2fe01048 _dyld_start + 32 Thread 0 crashed with ARM Thread State: r0: 0x2fe23ca0 r1: 0x00000000 r2: 0x2fe23ca0 r3: 0x00000000 r4: 0x2ffff4e0 r5: 0x2ffff4bc r6: 0x2fe005c0 r7: 0x2ffffb00 r8: 0x00000004 r9: 0x2fe57cf0 r10: 0x2fe236c8 r11: 0x00000009 ip: 0x0000018d sp: 0x2ffff5b8 lr: 0x2fe088dc pc: 0x2fe01060 cpsr: 0x00000010 Binary Images: 0x2fe00000 - 0x2fe22fff dyld ??? (???) <f6a50d5f57a676b54276d0ecef46d5f0> /usr/lib/dyld My app uses OpenFeint and PinchMedia analytics. For PinchMedia, I'm linking using their provided .a file, and for OpenFeint, I'm compiling their code (as per their guidelines). The frameworks / libs I'm linking are: UIKit.framework (Weak) MapKit.framework (Weak) Foundation.framework CoreGraphics.framework OpenAL.framework AudioToolbox.framework libsqlite3 SystemConfiguration.framework CoreLocation.framework PinchMedia analytics Security.framework QuartzCore.framework CFNetwork.framework My base SDK is iPhone 3.0, and my Base OS Deployment Target is 2.2.1. There are two things I find weird: The app crashes even before the main method is invoked. The crash log looks exactly like the one posted here: http://stackoverflow.com/questions/2368689/objective-c-iphone-app-exc-breakpoint-sigtrap The user that sent me this crash is using a 2nd gen iPod Touch with OS 2.2.1. I wasn't able to reproduce the issue, but based on the comments in iTunes, it seems that more people is having the same issue.

    Read the article

  • How to show AdMob ads in real iPhone device?

    - by iPhoney
    I want to integrate AdMob ads in my iPhone app. I'm using IB way to add the view and follow AdMob's pdf guide: 1. Add AdMob group(AdMobView.h,AdMobDelegateProtocol.h,libAdMob.a) 2. Add required frameworks(AudioToolbox,MediaPlayer,MessageUI,QuartzCore) 3. Add TouchJSON group 4. Add IBSupport group(AdViewController.h,AdViewController.m) 5. Add a 320*48 UIView in IB, add NSObject and change its class to AdViewController, link AdViewController's view to the 320*48 UIView and link AdViewController's viewController to current view controller. Now the iPhone simulator can show ads from AdMob, but when I test it on real device, I get the error "AdMob: Did fail to receive ad". I've tried to add test device's UDID to testDevices array, but still get the same error. - (NSArray *)testDevices { return [NSArray arrayWithObjects: ADMOB_SIMULATOR_ID, DEVICE_UDID, nil]; } Is there any problem in the above steps? Does anybody know why can't I get the ads in real device? By the way, what should be changed to build for real for-sale app, not just for test?

    Read the article

  • iPhone - Memory Management - Using Leaks tool and getting some bizarre readings.

    - by Robert
    Hey all, putting the finishing touches on a project of mine so I figured I would run through it and see if and where I had any memory leaks. Found and fixed most of them but there are a couple of things regarding the memory leaks and object alloc that I am confused about. 1) There are 2 memory leaks that do not show me as responsible. There are 8 leaks attributed to AudioToolbox with the function being RegisterEmbeddedAudioCodecs(). This accounts for about 1.5 kb of leaks. The other one is detected immediately when the app begins. Core Graphics is responsible with the extra info being open_handle_to_dylib_path. For the audio leak I have looked over my audio code and to me it seems ok. self.musicPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:songFilePath] error:NULL]; [musicPlayer prepareToPlay]; [musicPlayer play] is called later on in a function. 2) Is it normal for there to be a spike in Object Allocation whenever a new view or controller is presented? My total memory usage is very, very low except for whenever I present a view controller. It spikes then immediately goes back down. I am guessing that this is just the phone handling all the information for switching or something. Blegh. Wall of text. Thanks in advance to anyone who helps! =)

    Read the article

  • Help creating custom iPhone Classes

    - by seanny94
    This should be a simple question, but I just can't seem to figure it out. I'm trying to create my own class which will provide a simpler way of playing short sounds using the AudioToolbox framework as provided by Apple. When I import these files into my project and attempt to utilize them, they just don't seem to work. I was hoping someone would shed some light on what I may be doing wrong here. simplesound.h #import <Foundation/Foundation.h> @interface simplesound : NSObject { IBOutlet UILabel *statusLabel; } @property(nonatomic, retain) UILabel *statusLabel; - (void)playSimple:(NSString *)url; @end simplesound.m #import "simplesound.h" @implementation simplesound @synthesize statusLabel; - (void)playSimple:(NSString *)url { if (url = @"vibrate") { AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); statusLabel.text = @"VIBRATED!"; } else { NSString *paths = [[NSBundle mainBundle] resourcePath]; NSString *audioF1ile = [paths stringByAppendingPathComponent:url]; NSURL *audioURL = [NSURL fileURLWithPath:audioFile isDirectory:NO]; SystemSoundID mySSID; OSStatus error = AudioServicesCreateSystemSoundID ((CFURLRef)audioURL,&mySSID); AudioServicesAddSystemSoundCompletion(mySSID,NULL,NULL,simpleSoundDone,NULL); if (error) { statusLabel.text = [NSString stringWithFormat:@"Error: %d",error]; } else { AudioServicesPlaySystemSound(mySSID); } } static void simpleSoundDone (SystemSoundID mySSID, void *args) { AudioServicesDisposeSystemSoundID (mySSID); } } - (void)dealloc { [url release]; } @end Does anyone see what I'm trying to accomplish here? Does anyone know how to remedy this code that is supposedly wrong?

    Read the article

< Previous Page | 1 2