• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: RS: basic sound tool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RS: basic sound tool


  • Subject: Re: RS: basic sound tool
  • From: "I. Savant" <email@hidden>
  • Date: Sat, 7 Jul 2007 20:49:43 -0400

On Jul 7, 2007, at 7:24 PM, Roland Silver wrote:
Is there a basic sound tool, in the form of a C-function or Objective-C method, that causes sound to be emitted from the Mac loudspeaker (for example, for definiteness, a 440 Hz sine wave, for 1 sec)?


  NSBeep()? ;-)

Seriously, though, you might want to check out CoreAudio for such specific frequency generation.

As to hitting a specific audio output device, it's possible, but you should defer to the user's preference, since the audio device you selected for output may not even be powered on / plugged in / whatever.

Also, assuming only the default audio output, if they've got something plugged into the headphone jack, you won't hit the internal speaker. I'm not sure it's possible to bypass this particular roadblock with software.

--
I.S.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >RS: basic sound tool (From: Roland Silver <email@hidden>)

  • Prev by Date: Re: Totally stumped on extern NSString
  • Next by Date: Re: Totally stumped on extern NSString
  • Previous by thread: RS: basic sound tool
  • Next by thread: Totally stumped on extern NSString
  • Index(es):
    • Date
    • Thread