¡@

Home 

2014/10/15 ¤U¤È 10:14:18

iphone Programming Glossary: soundfileurl

iPhone App : recording audio in mp3

http://stackoverflow.com/questions/10549023/iphone-app-recording-audio-in-mp3

NSString tempDir NSTemporaryDirectory NSString soundFilePath tempDir stringByAppendingPathComponent @ sound.m4a NSURL soundFileURL NSURL fileURLWithPath soundFilePath NSDictionary recordSettings NSDictionary dictionaryWithObjectsAndKeys NSNumber numberWithInt..

Record and send/stream sound from iOS device to a server continously

http://stackoverflow.com/questions/11686884/record-and-send-stream-sound-from-ios-device-to-a-server-continously

ipad audio recording share improve this question look at this in this tutorial the sound recorded will be saved at soundFileURL then you will just have to create an nsdata with that content and then send it to your server. hope this helped. EDIT I.. docsDir dirPaths objectAtIndex 0 NSString soundFilePath docsDir stringByAppendingPathComponent @ tempsound.caf NSURL soundFileURL NSURL fileURLWithPath soundFilePath NSDictionary recordSettings NSDictionary dictionaryWithObjectsAndKeys NSNumber numberWithInt.. numberWithFloat 44100.0 AVSampleRateKey nil NSError error nil audioRecorder AVAudioRecorder alloc initWithURL soundFileURL settings recordSettings error error audioRecorder.delegate self if error NSLog @ error @ error localizedDescription else..

record input coming from bluetooth headset in iPhone

http://stackoverflow.com/questions/18226255/record-input-coming-from-bluetooth-headset-in-iphone

using avaudiorecorder after this. There seems to be something else I am missing in here. Code for audio recorder NSURL soundFileURL NSURL fileURLWithPath AUDIO_FILE NSDictionary recordSettings NSDictionary dictionaryWithObjectsAndKeys NSNumber numberWithInt.. numberWithFloat 44100.0 AVSampleRateKey nil NSError error nil audioRecorder AVAudioRecorder alloc initWithURL soundFileURL settings recordSettings error error if error NSLog @ error @ error localizedDescription else audioRecorder prepareToRecord.. now play a quick sound we put in the bundle bomb.wav CFBundleRef mainBundle CFBundleGetMainBundle CFURLRef soundFileURLRef SystemSoundID soundFileObject soundFileURLRef CFBundleCopyResourceURL mainBundle CFSTR bomb CFSTR wav NULL NSError error..

Play MP3 Files with iPhone SDK

http://stackoverflow.com/questions/1973902/play-mp3-files-with-iphone-sdk

mainBundle pathForResource @ songname ofType @ mp3 NSURL newURL NSURL alloc initFileURLWithPath soundFilePath self.soundFileURL newURL newURL release AVAudioSession sharedInstance setDelegate self AVAudioSession sharedInstance setCategory AVAudioSessionCategoryAmbient.. sharedInstance setActive YES error activationError AVAudioPlayer newPlayer AVAudioPlayer alloc initWithContentsOfURL soundFileURL error nil self.appSoundPlayer newPlayer newPlayer release appSoundPlayer prepareToPlay appSoundPlayer setVolume 1.0 appSoundPlayer..

iphone, how to play sound even in silent or mute mode?

http://stackoverflow.com/questions/2749066/iphone-how-to-play-sound-even-in-silent-or-mute-mode

filePath @ AlarmClockBell.caf Util restoreResourceFile filePath filePath Util getFileFullPathFromSysDoc filePath NSURL soundFileURL NSURL fileURLWithPath filePath NSError error AVAudioPlayer audioPalyer AVAudioPlayer alloc initWithContentsOfURL soundFileURL.. NSURL fileURLWithPath filePath NSError error AVAudioPlayer audioPalyer AVAudioPlayer alloc initWithContentsOfURL soundFileURL error error if nil audioPalyer AppTrace3 self @ Faild to play soundFileURL error return FALSE audioPalyer prepareToPlay.. AVAudioPlayer alloc initWithContentsOfURL soundFileURL error error if nil audioPalyer AppTrace3 self @ Faild to play soundFileURL error return FALSE audioPalyer prepareToPlay audioPalyer setVolume 5 audioPalyer setDelegate self audioPalyer.numberOfLoops..

iPhone/iPad - Loop Background Music?

http://stackoverflow.com/questions/3631353/iphone-ipad-loop-background-music

You can use the AVAudioPlayer NSString soundFilePath NSBundle mainBundle pathForResource @ mySound ofType @ mp3 NSURL soundFileURL NSURL fileURLWithPath soundFilePath AVAudioPlayer player AVAudioPlayer alloc initWithContentsOfURL soundFileURL error nil.. NSURL soundFileURL NSURL fileURLWithPath soundFilePath AVAudioPlayer player AVAudioPlayer alloc initWithContentsOfURL soundFileURL error nil player.numberOfLoops 1 infinite player play and you can jump through by setting the currentTime player.currentTime..

AVAudioRecorder won't record IF movie was previously recorded & played

http://stackoverflow.com/questions/4148123/avaudiorecorder-wont-record-if-movie-was-previously-recorded-played

stop audioRecorder release audioRecorder nil NSError err nil audioRecorder AVAudioRecorder alloc initWithURL soundFileURL settings recordSetting error err soundFileURL release recordSetting release if audioRecorder err NSLog @ recorder initWithURL.. nil NSError err nil audioRecorder AVAudioRecorder alloc initWithURL soundFileURL settings recordSetting error err soundFileURL release recordSetting release if audioRecorder err NSLog @ recorder initWithURL @ d @ err domain err code err userInfo description.. YES lastObject NSString soundFilePath documentsPath stringByAppendingPathComponent @ recording.caf NSURL soundFileURL NSURL alloc initFileURLWithPath soundFilePath NSError err nil if audioPlayer audioPlayer release audioPlayer nil audioPlayer..