• 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: Sound Level
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sound Level


  • Subject: Re: Sound Level
  • From: Esteban Uribe <email@hidden>
  • Date: Mon, 7 Apr 2003 08:41:15 -0700

Hi,

On Monday, April 7, 2003, at 05:46 AM, Lorenzo wrote:

Hi, how to control the sound level of the Mac, and
ho to control the sound level of my Cocoa application?

NSSound is not the answer. So please, what?


I've been using Quicktime and NSMovie to do this.

Something like the following:

NSMovie *soundPlayer = [[NSMovie alloc] initWithURL:[NSURL fileURLWithPath:soundAtPath] byReference:YES];

//kFullVolume is max sound volume at 1.0, mute would be 0.0, anything else is between
SetMovieVolume([soundPlayer QTMovie], kFullVolume);
StartMovie([soundPlayer QTMovie]);
if(IsMovieDone([soundPlayer QTMovie])) {
StopMovie([soundPlayer QTMovie]);
[soundPlayer release];
}

-Esteban
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Sound Level
      • From: Lorenzo <email@hidden>
References: 
 >Sound Level (From: Lorenzo <email@hidden>)

  • Prev by Date: NSBrowser delegate
  • Next by Date: Re: Table view which doesn't update
  • Previous by thread: Sound Level
  • Next by thread: Re: Sound Level
  • Index(es):
    • Date
    • Thread