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 08-14-2009, 06:11 PM   #20 (permalink)
ghost
Registered Member
 
Join Date: Aug 2008
Posts: 268
ghost is on a distinguished road
Default

Quote:
Originally Posted by bhearn View Post
This code works for me:


Code:
SystemSoundID train;

AudioServicesCreateSystemSoundID(CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("train2"), CFSTR("wav"), NULL), &train);

AudioServicesPlaySystemSound(train);
It did take a fair amount of fiddling and googling to get it to work the first time!
I'm running this and I can't get any sound output from my simulator OR iphone. There are no errors or warning though. Maybe my wav file is bad? How can I check that?
ghost is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,024
Threads: 93,868
Posts: 401,934
Top Poster: BrianSlick (7,964)
Welcome to our newest member, davincic
Powered by vBadvanced CMPS v3.1.0

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