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-24-2008, 12:59 PM   #2 (permalink)
bhearn
New Member
 
Join Date: Aug 2008
Posts: 125
bhearn is on a distinguished road
Default

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!
bhearn is offline   Reply With Quote
 

» Advertisements
» Online Users: 689
20 members and 669 guests
13dario13, ADY, AlanR917, Alex40, burntsoap, carlandrews, dcool, doffing81, Droverson, estherkt98, matador1978, MysticLine, ncc1701e, pierresinne, ryantcb, SamorodovAlex, SLIC, Thompson22, vpros, Xaphann
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,419
Threads: 94,016
Posts: 402,536
Top Poster: BrianSlick (7,978)
Welcome to our newest member, estherkt98
Powered by vBadvanced CMPS v3.1.0

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