While setting the volume of a QuickTimeFile the sound gets distorted
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