Changeset 22704
- Timestamp:
- 02/26/2008 09:46:03 PM (9 months ago)
- Files:
-
- trunk/Source/AdiumSound.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/AdiumSound.m
r22418 r22704 307 307 } 308 308 309 @end 310 311 static OSStatus systemOutputDeviceDidChange(AudioHardwarePropertyID property, void *refcon) 312 { 313 #pragma unused(property) 314 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 315 316 AdiumSound *self = (id)refcon; 317 NSCAssert1(self, @"AudioHardware property listener function %s called with nil refcon, which we expected to be the AdiumSound instance", __PRETTY_FUNCTION__); 318 319 NSEnumerator *soundsEnum = [[self allSounds] objectEnumerator]; 320 QTMovie *movie; 309 - (void)systemOutputDeviceDidChange 310 { 311 NSEnumerator *soundsEnum = [[self allSounds] objectEnumerator]; 312 QTMovie *movie; 313 321 314 while ((movie = [soundsEnum nextObject])) { 322 315 //QTMovie gets confused if we're playing when we do this, so pause momentarily. … … 340 333 [movie setRate:savedRate]; 341 334 } 342 335 } 336 337 @end 338 339 static OSStatus systemOutputDeviceDidChange(AudioHardwarePropertyID property, void *refcon) 340 { 341 #pragma unused(property) 342 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 343 344 AdiumSound *self = (id)refcon; 345 NSCAssert1(self, @"AudioHardware property listener function %s called with nil refcon, which we expected to be the AdiumSound instance", __PRETTY_FUNCTION__); 346 347 [self performSelectorOnMainThread:@selector(systemOutputDeviceDidChange) 348 withObject:nil 349 waitUntilDone:NO]; 343 350 [pool release]; 344 351 345 352 return noErr; 346 353 }