• 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] multiple beepage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RS] multiple beepage


  • Subject: Re: [RS] multiple beepage
  • From: Michael Watson <email@hidden>
  • Date: Fri, 22 Dec 2006 09:53:18 -0500

sleep() blocks the thread. NSTimer is the way to go.


-- m-s

On 22 Dec, 2006, at 09:46, Tommy Nordgren wrote:


On 22 dec 2006, at 14.35, Roland Silver wrote:

How do I NSBeep N times, with a short but distinct interval of silence between beeps?

--Roland Silver <email@hidden>


_______________________________________________

#include <Carbon/Carbon.h>

void beep_n (int n)
{
	int i;
	for (i = 0; i < n; i++) {
		SysBeep(1);
		if ( i < n-1)sleep (SOMEDELAYTIME);
	}
}
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
40bungie.org


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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] multiple beepage (From: Roland Silver <email@hidden>)
 >Re: [RS] multiple beepage (From: Tommy Nordgren <email@hidden>)

  • Prev by Date: Re: [RS] multiple beepage
  • Next by Date: Re: "fixed" line width?
  • Previous by thread: Re: [RS] multiple beepage
  • Next by thread: Build doesn't update help
  • Index(es):
    • Date
    • Thread