MusicKit
0.0.0
|
00001 00002 // 00003 // $Id: SndStreamInput.h 3687 2010-07-14 19:35:23Z leighsmith $ 00004 // 00005 // Original Author: Leigh M. Smith <leigh@leighsmith.com> 00006 // 00007 // Copyright (c) 2010, The MusicKit Project. All rights reserved. 00008 // 00009 // Permission is granted to use and modify this code for commercial and 00010 // non-commercial purposes so long as the author attribution and copyright 00011 // messages remain intact and accompany all relevant code. 00012 // 00014 00015 #ifndef SNDSTREAMINPUT_H 00016 #define SNDSTREAMINPUT_H 00017 00018 #import <Foundation/Foundation.h> 00019 #import <SndKit/SndKit.h> 00020 00021 // How many samples of the latency we save. 00022 00023 #define MAX_LATENCY_TIMES 1000 00024 00035 @interface SndStreamInput : SndStreamClient 00036 { 00038 BOOL isReceivingInput; 00039 00040 // Latency statistics. 00041 long outputLatencyTimes[MAX_LATENCY_TIMES]; 00042 long inputLatencyTimes[MAX_LATENCY_TIMES]; 00043 int latencyIndex; 00044 } 00045 00051 - init; 00052 00059 - (BOOL) startReceivingInput; 00060 00066 - (void) stopReceivingInput; 00067 00072 - (BOOL) isReceivingInput; 00073 00083 - (float) averageLatencyForOutput: (BOOL) forOutput; 00084 00085 @end 00086 00092 @protocol StreamRecorderDelegate <SndStreamClientDelegate> 00093 00102 - didStartReceivingInput: sender; 00103 00114 - didFinishReceivingInput: sender; 00115 00116 @end 00117 00118 #endif // SNDSTREAMINPUT_H