//  -*-objc-*-
//  Calando - Volume Fading for OS X
//  Copyright (C) 2007  Greg Heartsfield

#import <Cocoa/Cocoa.h>
#import <CoreAudio/CoreAudio.h>

typedef struct {
  Boolean hasVolume;
  Boolean canSetVolume;
  Float32 theVolume;
  Boolean canMute;
  Boolean isMuted;
  Boolean canPlayThru;
  Boolean playThruIsSet;
} MTCoreAudioVolumeInfo;

id notifyFinishedObject;

@interface VolumeFader : NSObject {
  Float32 finalVolume;
  int fadeDuration;
  bool finished;
  bool fadeShouldStop;
}

- (void)setNotifyFinished:(id)object;

- (void)fadeSystemVolume:(Float32)volume withSecondsDuration:(int)duration;

- (void)setFinalVolume:(Float32)volume;

- (void)setSecondsDuration:(int)duration;

- (Float32)getFinalVolume;

- (int)getSecondsDuration;

- (void)stopFade;

- (bool)isFadeRunning;

@end
