Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-23-2010, 02:00 PM   #1 (permalink)
SpaceGhost
Registered Member
 
Join Date: Feb 2010
Posts: 3
SpaceGhost is on a distinguished road
Default Looping and paning my sound!

I searched the forum but couldn't get a great answer. I'm a real beginner to programming so this question is probably easily answered.

Code:
	SystemSoundID ssid;
	NSString *paths=[[NSBundle mainBundle]resourcePath];
	NSString *audioFile=[paths stringByAppendingPathComponent :@"sound.caf"];
	NSURL *audioURL=[NSURL fileURLWithPath:audioFile isDirectory:NO];
	OSStatus error=AudioServicesCreateSystemSoundID((CFURLRef)audioURL, &ssid);
	if(error){NSLog(@"Audio error");}
	else{AudioServicesPlaySystemSound(ssid);}
This is the code snippet I'm using to generate sound, my sound is a 20 second caf file that I'd like to loop. How do I loop it? And can I pan it also? Is this a good way to implement sound in my app?

Thanks guys!
SpaceGhost is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,526
Threads: 94,044
Posts: 402,621
Top Poster: BrianSlick (7,978)
Welcome to our newest member, iThoms
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:08 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.