I am looking for how to generate the system alert sound from C on a Mac, any help would be appreciated.

Thanks,
Glenn
Glenn wrote:
I am looking for how to generate the system alert sound from C on a Mac, any help would be appreciated.

Thanks,
Glenn


Like a bell? Just print '\a'.

If you want the sound that is defined by the system for system alerts, then you need to read up on the Mac API and figure out how to determine what sound file is specified, and then use some sort of playback mechanism to play the file (or the API *might* have a function declared to do all of that for you...)
if you're programming for OS X and there isn't a need for cross-platforminess I'd recommend Objective-C over C.
elfprince13 wrote:
if you're programming for OS X and there isn't a need for cross-platforminess I'd recommend Objective-C over C.
I have mixed feelings about ObjC. On the one hand, it's an admirable attempt to objectize C. On the other hand, it such a massive kludge for something that C++ does perfectly well.
KermMartian wrote:
elfprince13 wrote:
if you're programming for OS X and there isn't a need for cross-platforminess I'd recommend Objective-C over C.
I have mixed feelings about ObjC. On the one hand, it's an admirable attempt to objectize C. On the other hand, it such a massive kludge for something that C++ does perfectly well.


its a much less kludgy attempt than C++, given that objects are real objects and not just the bastard child.
elfprince13 wrote:
its a much less kludgy attempt than C++, given that objects are real objects and not just the bastard child.


Not really. C++ objects are real objects just as much as an Obj-C object is an object or any other compiled language object is an object.

Too bad Obj-C has the worst syntax of any language ever. Even worse than MS's terrible C++ .NET crap.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement