• 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
While setting the volume of a QuickTimeFile the sound gets distorted
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

While setting the volume of a QuickTimeFile the sound gets distorted


  • Subject: While setting the volume of a QuickTimeFile the sound gets distorted
  • From: email@hidden
  • Date: Tue, 2 Jan 2007 09:33:47 +0100

Hello there,

I have a strange problem while setting the volume of a QuickTime-File (the sound gets distorted). I created a background music file with GarageBand, exported it, opened the .m4a file and cutted with QuickTime-Player so that it loops perfectly. Then I saved it as .mov- file.

In my program I open it like this:

- (id)init
{
	NSBundle *bundle = [NSBundle mainBundle];
	NSString *path;

if((self = [super init]) != nil)
backgroundMusic = [[NSMovie alloc] initWithURL:[NSURL fileURLWithPath:[bundle pathForResource:@"background" ofType:@"mov"]] byReference: YES];

return self;
}


This is triggered, when I use the (continiously sending) slider:

- (IBAction)setVolume:(id)sender
{
	float musicVolume = [musicSlider floatValue];

	SetMovieVolume([gameMusic QTMovie], musicVolume);
}

I use the following for stopping and starting the music:

Stop:
SetMovieActive([backgroundMusic QTMovie], NO);
StopMovie([backgroundMusic QTMovie]);

Start:
SetMovieActive([backgroundMusic QTMovie], YES);
GoToBeginningOfMovie([backgroundMusic QTMovie]);
StartMovie([backgroundMusic QTMovie]);

What is wrong with that?

Thanks Jens
email@hidden

PS: When I use the [[backgroundMusic QTMovie] setVolume:musicVolume]; always the debugger comes up with errors...

_______________________________________________

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


  • Follow-Ups:
    • Re: While setting the volume of a QuickTimeFile the sound gets distorted
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: Problem with WebKit Download Delegate
  • Next by Date: Re: Regarding Trash programming...
  • Previous by thread: New to Cocoa, needs help understanding various topics (delegates, connections in Interface Builder, ect...)
  • Next by thread: Re: While setting the volume of a QuickTimeFile the sound gets distorted
  • Index(es):
    • Date
    • Thread