Lefora Free Forum
login join
Loading
448 views

how to get sound

Page 1
1–2
novice - member
27 posts

I am trying to make a alarm clock program, and for that I need to output sound when the alam clock goes off at the desired time. How do I get sound, I am going to start off with a single buzzing sound. 

?
288 posts

Here's the sound documentation:  http://developer.apple.com/mac/library/documentation/cocoa/conceptual/Sound/Sound.html

In Aaron Hillegass book, "Cocoa Programming for Mac OSX", he has an example of using the SoundSynthesizer.  This is about page 90 of the book.  The code's in:  Solutions-Cocoa-3rd/05_TargetAction/SpeakLine and you can download it from:  http://bignerdranch.com/solutions/Cocoa-3rd.tgz

You could use a variant of that code to actually speak the time when the alarm goes off with a voice of your choosing.  So if you want your iPad to sing to you when it's time to wake up - you've got the tools.

__________________
Page 1
1–2

Locked Topic


You must be a member to post in this forum

Join Now!