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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-17-2010, 07:02 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 88
Default Click Sound

I have tried the method suggested here:http://www.iphonedevsdk.com/forum/ip...ton-click.html (Post #6)

However, I get an error with the code:
Code:
OSStatus error = AudioServicesCreateSystemSoundID((CFURLRef)pathToSound, &theSound);
Giving me the following in terminal: Undefined symbols:
Code:
  "_AudioServicesCreateSystemSoundID", referenced from:
      -[MainViewController typeNumber:] in MainViewController.o
  "_AudioServicesPlaySystemSound", referenced from:
      -[MainViewController typeNumber:] in MainViewController.o
The code is in a view controller IBAction. What's wrong?
qwertyp is offline   Reply With Quote
Old 02-17-2010, 07:03 PM   #2 (permalink)
Ascending Mt. SDK
 
Join Date: Dec 2009
Posts: 64
Default

Quote:
Originally Posted by qwertyp View Post
I have tried the method suggested here:http://www.iphonedevsdk.com/forum/ip...ton-click.html (Post #6)

However, I get an error with the code:
Code:
OSStatus error = AudioServicesCreateSystemSoundID((CFURLRef)pathToSound, &theSound);
Giving me the following in terminal: Undefined symbols:
Code:
  "_AudioServicesCreateSystemSoundID", referenced from:
      -[MainViewController typeNumber:] in MainViewController.o
  "_AudioServicesPlaySystemSound", referenced from:
      -[MainViewController typeNumber:] in MainViewController.o
The code is in a view controller IBAction. What's wrong?
Did you import the AudioToolKit framework?
gbaldwin9 is offline   Reply With Quote
Old 02-17-2010, 07:04 PM   #3 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 88
Default

Quote:
Originally Posted by gbaldwin9 View Post
Did you import the AudioToolKit framework?
Code:
#include <AudioToolbox/AudioToolbox.h>
That? Yes, in my .h file.
qwertyp is offline   Reply With Quote
Old 02-17-2010, 07:14 PM   #4 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 916
Default

You need to also import the framework, the easiest way is go to the frameworks folder in xcode, ctrl click one of the frameworks that already there and choose "reveal in finder". It will show you a folder with all the available frameworks and you can just drag the audiotoolbox in to the frameworks folder in xcode. Make sure to uncheck the box to automatically copy the resources or whatever it says.
lukeca is offline   Reply With Quote
Old 02-17-2010, 07:14 PM   #5 (permalink)
Obj-C Learner
 
Join Date: Apr 2009
Location: Manchester, UK
Posts: 1,030
Send a message via MSN to ZunePod Send a message via Yahoo to ZunePod
Default

Quote:
Originally Posted by qwertyp View Post
Code:
#include <AudioToolbox/AudioToolbox.h>
That? Yes, in my .h file.
But did you import it?
ZunePod is offline   Reply With Quote
Old 02-17-2010, 07:20 PM   #6 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 88
Default

Quote:
Originally Posted by lukeca View Post
You need to also import the framework, the easiest way is go to the frameworks folder in xcode, ctrl click one of the frameworks that already there and choose "reveal in finder". It will show you a folder with all the available frameworks and you can just drag the audiotoolbox in to the frameworks folder in xcode. Make sure to uncheck the box to automatically copy the resources or whatever it says.
Added framework, still same error. I also changed the #include to #import, but no luck.
qwertyp is offline   Reply With Quote
Old 02-18-2010, 04:43 PM   #7 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 88
Default

Bump. Anyone?
qwertyp is offline   Reply With Quote
Old 11-19-2010, 02:13 AM   #8 (permalink)
Registered Member
 
Join Date: Nov 2010
Posts: 10
Default

Did you find a solution to your problem ? I am having a similar issue and I would like to know how you sorted this out.
sebastien is offline   Reply With Quote
Reply

Bookmarks

Tags
click, sound

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 277
18 members and 259 guests
2WeeksToGo, ADY, apatsufas, dacapo, Dani77, Fritzer, ghost, HDshot, headkaze, iDifferent, mer10, mystic.purple, Rudy, smethorst, stoneage, superg, tathaastu, Zool
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,878
Threads: 89,224
Posts: 380,732
Top Poster: BrianSlick (7,129)
Welcome to our newest member, olga2000
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:42 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0