├── .DS_Store
├── TabHoldandRecord
├── en.lproj
│ ├── InfoPlist.strings
│ ├── ViewController_iPhone.xib
│ └── ViewController_iPad.xib
├── Play.png
├── Screen.png
├── Default.png
├── Default@2x.png
├── Default-568h@2x.png
├── listing_done_btn~iphone.png
├── TabHoldandRecord-Prefix.pch
├── main.m
├── AppDelegate.h
├── ViewController.h
├── TabHoldandRecord-Info.plist
├── AppDelegate.m
├── F3BarGauge.h
├── ViewController.m
└── F3BarGauge.m
├── TabHoldandRecord.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── ashish.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
├── xcuserdata
│ └── ashish.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── TabHoldandRecord.xcscheme
└── project.pbxproj
└── README.md
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ioslovers/ATTabandHoldAudioRecord/HEAD/.DS_Store
--------------------------------------------------------------------------------
/TabHoldandRecord/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/TabHoldandRecord/Play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ioslovers/ATTabandHoldAudioRecord/HEAD/TabHoldandRecord/Play.png
--------------------------------------------------------------------------------
/TabHoldandRecord/Screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ioslovers/ATTabandHoldAudioRecord/HEAD/TabHoldandRecord/Screen.png
--------------------------------------------------------------------------------
/TabHoldandRecord/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ioslovers/ATTabandHoldAudioRecord/HEAD/TabHoldandRecord/Default.png
--------------------------------------------------------------------------------
/TabHoldandRecord/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ioslovers/ATTabandHoldAudioRecord/HEAD/TabHoldandRecord/Default@2x.png
--------------------------------------------------------------------------------
/TabHoldandRecord/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ioslovers/ATTabandHoldAudioRecord/HEAD/TabHoldandRecord/Default-568h@2x.png
--------------------------------------------------------------------------------
/TabHoldandRecord/listing_done_btn~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ioslovers/ATTabandHoldAudioRecord/HEAD/TabHoldandRecord/listing_done_btn~iphone.png
--------------------------------------------------------------------------------
/TabHoldandRecord.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TabHoldandRecord.xcodeproj/project.xcworkspace/xcuserdata/ashish.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ioslovers/ATTabandHoldAudioRecord/HEAD/TabHoldandRecord.xcodeproj/project.xcworkspace/xcuserdata/ashish.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/TabHoldandRecord/TabHoldandRecord-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'TabHoldandRecord' target in the 'TabHoldandRecord' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_4_0
8 | #warning "This project uses features only available in iOS SDK 4.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #endif
15 |
--------------------------------------------------------------------------------
/TabHoldandRecord/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TabHoldandRecord
4 | //
5 | // Created by Ashish Tripathi on 12/08/13.
6 | // Copyright (c) 2013 Ashish Tripathi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char *argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/TabHoldandRecord/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TabHoldandRecord
4 | //
5 | // Created by Ashish Tripathi on 12/08/13.
6 | // Copyright (c) 2013 Ashish Tripathi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class ViewController;
12 |
13 | @interface AppDelegate : UIResponder
14 |
15 | @property (strong, nonatomic) UIWindow *window;
16 |
17 | @property (strong, nonatomic) ViewController *viewController;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/TabHoldandRecord.xcodeproj/xcuserdata/ashish.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | TabHoldandRecord.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 759C399917B8B84500F923D2
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ATTabandHoldAudioRecord
2 | =======================
3 |
4 | This small project is an implementation of the newly tutorial introduced by the Whats app, Voxer, WeChat. Very simple and efficient tutorial.
5 |
6 | Here are the features :
7 |
8 | *Compose your own tutorial with and button for audio record and another for play.
9 | *Put a UIView for the Wave OR LED OR Pregress effect.
10 | *Implement log press gesture on button and manage functin for start and stop recording.
11 | *Choose path for recorded audio file
12 | *connect view with requre functinality
13 |
14 | Tab hold and record with voice visualization wave and LED effects
15 |
16 | This is very eassy to use all the file are available in bundle resources and this will look like
17 | https://raw.github.com/ioslovers/ATTabandHoldAudioRecord/master/TabHoldandRecord/Screen.png
18 |
19 | Copyright (c) 2013 ioslovers
20 |
--------------------------------------------------------------------------------
/TabHoldandRecord/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // TabHoldandRecord
4 | //
5 | // Created by Ashish Tripathi on 12/08/13.
6 | // Copyright (c) 2013 Ashish Tripathi. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "F3BarGauge.h"
12 | @interface ViewController : UIViewController{
13 |
14 | AVAudioPlayer *audioPlayer;
15 | AVAudioRecorder *audioRecorder;
16 | int recordEncoding;
17 | enum
18 | {
19 | ENC_AAC = 1,
20 | ENC_ALAC = 2,
21 | ENC_IMA4 = 3,
22 | ENC_ILBC = 4,
23 | ENC_ULAW = 5,
24 | ENC_PCM = 6,
25 | } encodingTypes;
26 |
27 | float Pitch;
28 | NSTimer *timerForPitch;
29 | }
30 | @property (weak, nonatomic) IBOutlet UIImageView *imageView;
31 | @property (weak, nonatomic) IBOutlet UIProgressView *progressView;
32 | @property (weak, nonatomic) IBOutlet UIButton *touchbutton;
33 | @property (weak, nonatomic) IBOutlet UIView *viewForWave;
34 | @property (weak, nonatomic) IBOutlet UIView *viewForWave2;
35 | @property (nonatomic) CFTimeInterval firstTimestamp;
36 | @property (nonatomic, strong) CAShapeLayer *shapeLayer;
37 | @property (nonatomic, strong) CADisplayLink *displayLink;
38 | @property (nonatomic, strong) IBOutlet UILabel *statusLabel;
39 | @property (retain, nonatomic) IBOutlet F3BarGauge *customRangeBar;
40 | @property (nonatomic) NSUInteger loopCount;
41 | -(IBAction) startRecording;
42 | -(IBAction) stopRecording;
43 | -(IBAction) playRecording;
44 | -(IBAction) stopPlaying;
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/TabHoldandRecord/TabHoldandRecord-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | IOSLovers.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/TabHoldandRecord/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // TabHoldandRecord
4 | //
5 | // Created by Ashish Tripathi on 12/08/13.
6 | // Copyright (c) 2013 Ashish Tripathi. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | #import "ViewController.h"
12 |
13 | @implementation AppDelegate
14 |
15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 | {
17 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
18 | // Override point for customization after application launch.
19 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
20 | self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil];
21 | } else {
22 | self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil];
23 | }
24 | self.window.rootViewController = self.viewController;
25 | [self.window makeKeyAndVisible];
26 | return YES;
27 | }
28 |
29 | - (void)applicationWillResignActive:(UIApplication *)application
30 | {
31 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
32 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
33 | }
34 |
35 | - (void)applicationDidEnterBackground:(UIApplication *)application
36 | {
37 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
39 | }
40 |
41 | - (void)applicationWillEnterForeground:(UIApplication *)application
42 | {
43 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
44 | }
45 |
46 | - (void)applicationDidBecomeActive:(UIApplication *)application
47 | {
48 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
49 | }
50 |
51 | - (void)applicationWillTerminate:(UIApplication *)application
52 | {
53 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/TabHoldandRecord.xcodeproj/xcuserdata/ashish.xcuserdatad/xcschemes/TabHoldandRecord.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/TabHoldandRecord/F3BarGauge.h:
--------------------------------------------------------------------------------
1 | //
2 | // F3BarGauge.h
3 | //
4 | // Copyright (c) 2011 by Brad Benson
5 | // All rights reserved.
6 | //
7 | // Redistribution and use in source and binary forms, with or without
8 | // modification, are permitted provided that the following
9 | // conditions are met:
10 | // 1. Redistributions of source code must retain the above copyright
11 | // notice this list of conditions and the following disclaimer.
12 | // 2. Redistributions in binary form must reproduce the above copyright
13 | // notice, this list of conditions and the following disclaimer in
14 | // the documentation and/or other materials provided with the
15 | // distribution.
16 | //
17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20 | // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21 | // COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23 | // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
24 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25 | // AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 | // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
28 | // OF SUCH DAMAGE.
29 | //
30 |
31 | //---> Pick up required headers <-----------------------------------------
32 | #import
33 |
34 |
35 | //------------------------------------------------------------------------
36 | //------------------------------------------------------------------------
37 | //------------------| F3BarGauge class definition |---------------------
38 | //------------------------------------------------------------------------
39 | //------------------------------------------------------------------------
40 | @interface F3BarGauge : UIView
41 | {
42 | @private
43 | BOOL m_fHoldPeak, // YES = hold peak value enabled
44 | m_fLitEffect, // YES = draw segments with gradient "lit-up" effect
45 | m_fReverseDirection; // YES = top-to-bottom or right-to-left
46 | float m_flValue, // Current value being displayed
47 | m_flPeakValue, // Peak value seen since reset
48 | m_flMaxLimit, // Maximum displayable value
49 | m_flMinLimit, // Minimum displayable value
50 | m_flWarnThreshold, // Warning threshold (segment color specified by m_clrWarning)
51 | m_flDangerThreshold; // Danger threshold (segment color specified by m_clrDanger)
52 | int m_iNumBars; // Number of segments
53 | UIColor *m_clrOuterBorder, // Color of outer border
54 | *m_clrInnerBorder, // Color of inner border
55 | *m_clrBackground, // Background color of gauge
56 | *m_clrNormal, // Normal segment color
57 | *m_clrWarning, // Warning segment color
58 | *m_clrDanger; // Danger segment color
59 | }
60 |
61 | @property (readwrite, nonatomic) float value;
62 | @property (readwrite, nonatomic) float warnThreshold;
63 | @property (readwrite, nonatomic) float dangerThreshold;
64 | @property (readwrite, nonatomic) float maxLimit;
65 | @property (readwrite, nonatomic) float minLimit;
66 | @property (readwrite, nonatomic) int numBars;
67 | @property (readonly, nonatomic) float peakValue;
68 | @property (readwrite, nonatomic) BOOL holdPeak;
69 | @property (readwrite, nonatomic) BOOL litEffect;
70 | @property (readwrite, nonatomic) BOOL reverse;
71 | @property (readwrite, retain) UIColor *outerBorderColor;
72 | @property (readwrite, retain) UIColor *innerBorderColor;
73 | @property (readwrite, retain) UIColor *backgroundColor;
74 | @property (readwrite, retain) UIColor *normalBarColor;
75 | @property (readwrite, retain) UIColor *warningBarColor;
76 | @property (readwrite, retain) UIColor *dangerBarColor;
77 |
78 | -(void) resetPeak;
79 |
80 |
81 |
82 | @end
83 |
--------------------------------------------------------------------------------
/TabHoldandRecord/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // TabHoldandRecord
4 | //
5 | // Created by Ashish Tripathi on 12/08/13.
6 | // Copyright (c) 2013 Ashish Tripathi. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | #import "ViewController.h"
12 | #import
13 | #import
14 | #import
15 | #import
16 |
17 | @interface ViewController ()
18 |
19 | @end
20 |
21 | @implementation ViewController
22 | //static CGFloat const kSeconds = 150.0;
23 |
24 | - (void)viewDidLoad
25 | {
26 | [super viewDidLoad];
27 | // Do any additional setup after loading the view, typically from a nib.
28 | UILongPressGestureRecognizer *gesture = [[UILongPressGestureRecognizer alloc]
29 | initWithTarget:self
30 | action:@selector(myButtonLongPressed:)];
31 | // you can control how many seconds before the gesture is recognized
32 | gesture.minimumPressDuration =0;
33 | [self.touchbutton addGestureRecognizer:gesture];
34 |
35 |
36 |
37 |
38 |
39 | }
40 | - (void)addShapeLayer
41 | {
42 | self.shapeLayer = [CAShapeLayer layer];
43 | self.shapeLayer.path = [[self pathAtInterval:2.0] CGPath];
44 | self.shapeLayer.fillColor = [[UIColor redColor] CGColor];
45 | self.shapeLayer.lineWidth = 1.0;
46 | self.shapeLayer.strokeColor = [[UIColor whiteColor] CGColor];
47 | [self.viewForWave.layer addSublayer:self.shapeLayer];
48 | }
49 |
50 | - (void)startDisplayLink
51 | {
52 | self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(handleDisplayLink:)];
53 | [self.displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
54 | }
55 |
56 | - (void)stopDisplayLink
57 | {
58 | [self.displayLink invalidate];
59 | self.displayLink = nil;
60 |
61 | }
62 |
63 | - (void)handleDisplayLink:(CADisplayLink *)displayLink
64 | {
65 | if (!self.firstTimestamp)
66 | self.firstTimestamp = displayLink.timestamp;
67 |
68 | self.loopCount++;
69 |
70 | NSTimeInterval elapsed = (displayLink.timestamp - self.firstTimestamp);
71 |
72 | self.shapeLayer.path = [[self pathAtInterval:elapsed] CGPath];
73 |
74 | // if (elapsed >= kSeconds)
75 | // {
76 | // // [self stopDisplayLink];
77 | // self.shapeLayer.path = [[self pathAtInterval:0] CGPath];
78 | //
79 | // self.statusLabel.text = [NSString stringWithFormat:@"loopCount = %.1f frames/sec", self.loopCount / kSeconds];
80 | // }
81 | }
82 |
83 | - (UIBezierPath *)pathAtInterval:(NSTimeInterval) interval
84 | {
85 | UIBezierPath *path = [UIBezierPath bezierPath];
86 |
87 | [path moveToPoint:CGPointMake(0, self.viewForWave.bounds.size.height / 2.0)];
88 |
89 | CGFloat fractionOfSecond = interval - floor(interval);
90 |
91 | CGFloat yOffset = self.viewForWave.bounds.size.height * sin(fractionOfSecond * M_PI * Pitch*8);
92 |
93 | [path addCurveToPoint:CGPointMake(self.viewForWave.bounds.size.width, self.viewForWave.bounds.size.height / 2.0)
94 | controlPoint1:CGPointMake(self.viewForWave.bounds.size.width / 2.0, self.viewForWave.bounds.size.height / 2.0 - yOffset)
95 | controlPoint2:CGPointMake(self.viewForWave.bounds.size.width / 2.0, self.viewForWave.bounds.size.height / 2.0 + yOffset)];
96 |
97 | return path;
98 | }
99 |
100 | - (void) myButtonLongPressed:(UILongPressGestureRecognizer *)gesture
101 | {
102 | if (gesture.state == UIGestureRecognizerStateBegan) {
103 | NSLog(@"Touch down");
104 |
105 | [self.touchbutton setBackgroundImage:[UIImage imageNamed:@"listing_done_btn~iphone.png"] forState:UIControlStateNormal];
106 | [self startRecording];
107 |
108 | }
109 | if (gesture.state == UIGestureRecognizerStateEnded) {
110 |
111 | NSLog(@"Long press Ended");
112 | [self stopRecording];
113 | [self.touchbutton setBackgroundImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
114 | }
115 |
116 | }
117 |
118 | -(IBAction) startRecording
119 | {
120 | self.viewForWave.hidden = NO;
121 | [self addShapeLayer];
122 | [self startDisplayLink];
123 | // kSeconds = 150.0;
124 | NSLog(@"startRecording");
125 | audioRecorder = nil;
126 | AVAudioSession *audioSession = [AVAudioSession sharedInstance];
127 | [audioSession setCategory:AVAudioSessionCategoryRecord error:nil];
128 |
129 |
130 | NSMutableDictionary *recordSettings = [[NSMutableDictionary alloc] initWithCapacity:10];
131 | if(recordEncoding == ENC_PCM)
132 | {
133 | [recordSettings setObject:[NSNumber numberWithInt: kAudioFormatLinearPCM] forKey: AVFormatIDKey];
134 | [recordSettings setObject:[NSNumber numberWithFloat:44100.0] forKey: AVSampleRateKey];
135 | [recordSettings setObject:[NSNumber numberWithInt:2] forKey:AVNumberOfChannelsKey];
136 | [recordSettings setObject:[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];
137 | [recordSettings setObject:[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey];
138 | [recordSettings setObject:[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey];
139 | }
140 | else
141 | {
142 | NSNumber *formatObject;
143 |
144 | switch (recordEncoding) {
145 | case (ENC_AAC):
146 | formatObject = [NSNumber numberWithInt: kAudioFormatMPEG4AAC];
147 | break;
148 | case (ENC_ALAC):
149 | formatObject = [NSNumber numberWithInt: kAudioFormatAppleLossless];
150 | break;
151 | case (ENC_IMA4):
152 | formatObject = [NSNumber numberWithInt: kAudioFormatAppleIMA4];
153 | break;
154 | case (ENC_ILBC):
155 | formatObject = [NSNumber numberWithInt: kAudioFormatiLBC];
156 | break;
157 | case (ENC_ULAW):
158 | formatObject = [NSNumber numberWithInt: kAudioFormatULaw];
159 | break;
160 | default:
161 | formatObject = [NSNumber numberWithInt: kAudioFormatAppleIMA4];
162 | }
163 |
164 | [recordSettings setObject:formatObject forKey: AVFormatIDKey];
165 | [recordSettings setObject:[NSNumber numberWithFloat:44100.0] forKey: AVSampleRateKey];
166 | [recordSettings setObject:[NSNumber numberWithInt:2] forKey:AVNumberOfChannelsKey];
167 | [recordSettings setObject:[NSNumber numberWithInt:12800] forKey:AVEncoderBitRateKey];
168 | [recordSettings setObject:[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];
169 | [recordSettings setObject:[NSNumber numberWithInt: AVAudioQualityHigh] forKey: AVEncoderAudioQualityKey];
170 | }
171 |
172 | // NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/recordTest.caf", [[NSBundle mainBundle] resourcePath]]];
173 | NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(
174 | NSDocumentDirectory, NSUserDomainMask, YES);
175 | NSString *docsDir = [dirPaths objectAtIndex:0];
176 | NSString *soundFilePath = [docsDir
177 | stringByAppendingPathComponent:@"recordTest.caf"];
178 |
179 | NSURL *url = [NSURL fileURLWithPath:soundFilePath];
180 |
181 |
182 | NSError *error = nil;
183 | audioRecorder = [[ AVAudioRecorder alloc] initWithURL:url settings:recordSettings error:&error];
184 | audioRecorder.meteringEnabled = YES;
185 | if ([audioRecorder prepareToRecord] == YES){
186 | audioRecorder.meteringEnabled = YES;
187 | [audioRecorder record];
188 | timerForPitch =[NSTimer scheduledTimerWithTimeInterval: 0.01 target: self selector: @selector(levelTimerCallback:) userInfo: nil repeats: YES];
189 | }else {
190 | int errorCode = CFSwapInt32HostToBig ([error code]);
191 | NSLog(@"Error: %@ [%4.4s])" , [error localizedDescription], (char*)&errorCode);
192 |
193 | }
194 |
195 | }
196 |
197 | - (void)levelTimerCallback:(NSTimer *)timer {
198 | [audioRecorder updateMeters];
199 | NSLog(@"Average input: %f Peak input: %f", [audioRecorder averagePowerForChannel:0], [audioRecorder peakPowerForChannel:0]);
200 |
201 | float linear = pow (10, [audioRecorder peakPowerForChannel:0] / 20);
202 | NSLog(@"linear===%f",linear);
203 | float linear1 = pow (10, [audioRecorder averagePowerForChannel:0] / 20);
204 | NSLog(@"linear1===%f",linear1);
205 | if (linear1>0.03) {
206 |
207 | Pitch = linear1+.20;//pow (10, [audioRecorder averagePowerForChannel:0] / 20);//[audioRecorder peakPowerForChannel:0];
208 | }
209 | else {
210 |
211 | Pitch = 0.0;
212 | }
213 | //Pitch =linear1;
214 | NSLog(@"Pitch==%f",Pitch);
215 | _customRangeBar.value = Pitch;//linear1+.30;
216 | [_progressView setProgress:Pitch];
217 | float minutes = floor(audioRecorder.currentTime/60);
218 | float seconds = audioRecorder.currentTime - (minutes * 60);
219 |
220 | NSString *time = [NSString stringWithFormat:@"%0.0f.%0.0f",minutes, seconds];
221 | [self.statusLabel setText:[NSString stringWithFormat:@"%@ sec", time]];
222 | NSLog(@"recording");
223 |
224 | }
225 | -(IBAction) stopRecording
226 | {
227 | NSLog(@"stopRecording");
228 | // kSeconds = 0.0;
229 | self.viewForWave.hidden = YES;
230 | [audioRecorder stop];
231 | NSLog(@"stopped");
232 | [self stopDisplayLink];
233 | self.shapeLayer.path = [[self pathAtInterval:0] CGPath];
234 | [timerForPitch invalidate];
235 | timerForPitch = nil;
236 | _customRangeBar.value = 0.0;
237 | }
238 |
239 | -(IBAction) playRecording
240 | {
241 | NSLog(@"playRecording");
242 | // Init audio with playback capability
243 | AVAudioSession *audioSession = [AVAudioSession sharedInstance];
244 | [audioSession setCategory:AVAudioSessionCategoryPlayback error:nil];
245 | NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(
246 | NSDocumentDirectory, NSUserDomainMask, YES);
247 | NSString *docsDir = [dirPaths objectAtIndex:0];
248 | NSString *soundFilePath = [docsDir
249 | stringByAppendingPathComponent:@"recordTest.caf"];
250 |
251 | NSURL *url = [NSURL fileURLWithPath:soundFilePath];
252 |
253 | // NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/recordTest.caf", [[NSBundle mainBundle] resourcePath]]];
254 | NSError *error;
255 | audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error];
256 | audioPlayer.numberOfLoops = 0;
257 | [audioPlayer play];
258 | NSLog(@"playing");
259 | }
260 |
261 | -(IBAction) stopPlaying
262 | {
263 | NSLog(@"stopPlaying");
264 | [audioPlayer stop];
265 | NSLog(@"stopped");
266 |
267 | }
268 |
269 |
270 | - (void)didReceiveMemoryWarning
271 | {
272 | [super didReceiveMemoryWarning];
273 | // Dispose of any resources that can be recreated.
274 | }
275 |
276 | @end
277 |
--------------------------------------------------------------------------------
/TabHoldandRecord/F3BarGauge.m:
--------------------------------------------------------------------------------
1 | //
2 | // F3BarGauge.m
3 | //
4 | // Copyright (c) 2011 by Brad Benson
5 | // All rights reserved.
6 | //
7 | // Redistribution and use in source and binary forms, with or without
8 | // modification, are permitted provided that the following
9 | // conditions are met:
10 | // 1. Redistributions of source code must retain the above copyright
11 | // notice this list of conditions and the following disclaimer.
12 | // 2. Redistributions in binary form must reproduce the above copyright
13 | // notice, this list of conditions and the following disclaimer in
14 | // the documentation and/or other materials provided with the
15 | // distribution.
16 | //
17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20 | // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21 | // COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23 | // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
24 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25 | // AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 | // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
28 | // OF SUCH DAMAGE.
29 | //
30 |
31 |
32 | // Pick up required headers
33 | #import "F3BarGauge.h"
34 |
35 |
36 |
37 | //------------------------------------------------------------------------
38 | //------------------------------------------------------------------------
39 | //---------------| F3BarGauge class implementation |--------------------
40 | //------------------------------------------------------------------------
41 | //------------------------------------------------------------------------
42 |
43 | //===[ Extention for private-ish stuff ]==================================
44 | @interface F3BarGauge()
45 | {
46 | @private
47 | int m_iOnIdx, // Point at which segments are on
48 | m_iOffIdx, // Point at which segments are off
49 | m_iPeakBarIdx, // Index of peak value segment
50 | m_iWarningBarIdx, // Index of first warning segment
51 | m_iDangerBarIdx; // Index of first danger segment
52 | }
53 |
54 | // Private methods
55 | -(void) setDefaults;
56 | -(void) drawBar:(CGContextRef)a_ctx
57 | withRect:(CGRect) a_rect
58 | andColor:(UIColor *)a_clr
59 | lit:(BOOL)a_lit;
60 | @end
61 |
62 |
63 |
64 | @implementation F3BarGauge
65 | //===[ Public Methods ]===================================================
66 |
67 | //------------------------------------------------------------------------
68 | // Method: initWithFrame:
69 | // Designated initializer
70 | //
71 | -(id) initWithFrame:(CGRect)frame
72 | {
73 | self = [super initWithFrame:frame];
74 | if(self) {
75 | // Assign default values
76 | [self setDefaults];
77 | }
78 | return self;
79 | }
80 |
81 |
82 | //------------------------------------------------------------------------
83 | // Method: initWithCoder:
84 | // Initializes the instance when brought from nib, etc.
85 | //
86 | -(id) initWithCoder:(NSCoder *)aDecoder
87 | {
88 | self = [super initWithCoder:aDecoder];
89 | if(self) {
90 | // Assign default values
91 | [self setDefaults];
92 | }
93 | return self;
94 | }
95 |
96 |
97 | //------------------------------------------------------------------------
98 | // Method: dealloc
99 | // Clean up instance when released
100 | //
101 | -(void) dealloc
102 | {
103 | // Clean up
104 | [m_clrBackground release];
105 | [m_clrOuterBorder release];
106 | [m_clrInnerBorder release];
107 | [m_clrNormal release];
108 | [m_clrWarning release];
109 | [m_clrDanger release];
110 |
111 | // Call parent
112 | [super dealloc];
113 | }
114 |
115 |
116 | //------------------------------------------------------------------------
117 | // Method: resetPeak
118 | // Resets peak value.
119 | //
120 | -(void) resetPeak
121 | {
122 | // Reset the value and redraw
123 | m_flPeakValue = -INFINITY;
124 | m_iPeakBarIdx = -1;
125 | [self setNeedsDisplay];
126 | }
127 |
128 |
129 | //------------------------------------------------------------------------
130 | // Method: value accessor
131 | //
132 | -(float) value
133 | {
134 | return m_flValue;
135 | }
136 |
137 |
138 | //------------------------------------------------------------------------
139 | // Method: value setter
140 | //
141 | -(void) setValue:(float)a_value
142 | {
143 | bool fRedraw = false;
144 |
145 | // Save value
146 | m_flValue = a_value;
147 |
148 | // Point at which bars start lighting up
149 | int iOnIdx = (m_flValue >= m_flMinLimit) ? 0 : m_iNumBars;
150 | if( iOnIdx != m_iOnIdx ) {
151 | // Changed - save it
152 | m_iOnIdx = iOnIdx;
153 | fRedraw = true;
154 | }
155 |
156 | // Point at which bars are no longer lit
157 | int iOffIdx = ((m_flValue - m_flMinLimit) / (m_flMaxLimit - m_flMinLimit)) * m_iNumBars;
158 | if( iOffIdx != m_iOffIdx ) {
159 | // Changed - save it
160 | m_iOffIdx = iOffIdx;
161 | fRedraw = true;
162 | }
163 |
164 | // Are we doing peak?
165 | if( m_fHoldPeak && a_value > m_flPeakValue ) {
166 | // Yes, save the peak bar index
167 | m_flPeakValue = a_value;
168 | m_iPeakBarIdx = MIN(m_iOffIdx, m_iNumBars - 1);
169 | }
170 |
171 | // Redraw the display?
172 | if( fRedraw ) {
173 | // Do it
174 | [self setNeedsDisplay];
175 | }
176 | }
177 |
178 |
179 | //------------------------------------------------------------------------
180 | // Method: setNumBars:
181 | // This method sets the number of bars in the display
182 | //
183 | - (void) setNumBars:(int)a_iNumBars
184 | {
185 | // Reset peak value to force it to be updated w/new bar index
186 | m_flPeakValue = -INFINITY;
187 |
188 | // Save it, then update the thresholds
189 | m_iNumBars = a_iNumBars;
190 | [self setValue:m_flValue];
191 | [self setWarnThreshold:m_flWarnThreshold];
192 | [self setDangerThreshold:m_flDangerThreshold];
193 | }
194 |
195 |
196 | //------------------------------------------------------------------------
197 | // Method: setWarnThreshold:
198 | // Sets the level for which bars should be of the warning color
199 | // (dft: yellow)
200 | //
201 | - (void) setWarnThreshold:(float)a_flWarnThreshold
202 | {
203 | // Save it and recompute values
204 | m_flWarnThreshold = a_flWarnThreshold;
205 | m_iWarningBarIdx = ( !isnan(a_flWarnThreshold) && a_flWarnThreshold > 0.0f ) ?
206 | (int)( m_flWarnThreshold * (float)m_iNumBars ) :
207 | -1;
208 | }
209 |
210 |
211 | //------------------------------------------------------------------------
212 | // Method: setDangerThreshold:
213 | // Sets the level for which bars should be of the warning color
214 | // (dft: red).
215 | //
216 | - (void) setDangerThreshold:(float)a_flDangerThreshold
217 | {
218 | // Save it and recompute values
219 | m_flDangerThreshold = a_flDangerThreshold;
220 | m_iDangerBarIdx = ( !isnan(a_flDangerThreshold) && a_flDangerThreshold > 0.0f ) ?
221 | (int)( m_flDangerThreshold * (float)m_iNumBars ) :
222 | -1;
223 | }
224 |
225 |
226 | //------------------------------------------------------------------------
227 | // Synthesized properties
228 | //
229 | @synthesize maxLimit = m_flMaxLimit;
230 | @synthesize minLimit = m_flMinLimit;
231 | @synthesize numBars = m_iNumBars;
232 | @synthesize warnThreshold = m_flWarning;
233 | @synthesize dangerThreshold = m_flDanger;
234 | @synthesize holdPeak = m_fHoldPeak;
235 | @synthesize peakValue = m_flPeakValue;
236 | @synthesize litEffect = m_fLitEffect;
237 | @synthesize reverse = m_fReverseDirection;
238 | @synthesize outerBorderColor = m_clrOuterBorder;
239 | @synthesize innerBorderColor = m_clrInnerBorder;
240 | @synthesize backgroundColor = m_clrBackground;
241 | @synthesize normalBarColor = m_clrNormal;
242 | @synthesize warningBarColor = m_clrWarning;
243 | @synthesize dangerBarColor = m_clrDanger;
244 |
245 |
246 |
247 | //===[ Private Methods ]==================================================
248 |
249 | //------------------------------------------------------------------------
250 | // Method: setDefaults
251 | // Configure default settings for instance
252 | //
253 | -(void) setDefaults
254 | {
255 | // Set view background to clear
256 | [self setBackgroundColor:[UIColor clearColor]];
257 |
258 | // Configure limits
259 | m_flMaxLimit = 1.0f;
260 | m_flMinLimit = 0.0f;
261 | m_flValue = 0.0f;
262 |
263 | // Set defaults for bar display
264 | m_fHoldPeak = NO;
265 | m_iNumBars = 10;
266 | m_iOffIdx = 0;
267 | m_iOnIdx = 0;
268 | m_iPeakBarIdx = -1;
269 | m_fLitEffect = YES;
270 | m_fReverseDirection = NO;
271 | [self setWarnThreshold:0.60f];
272 | [self setDangerThreshold:0.80f];
273 |
274 | // Set default colors
275 | m_clrBackground = [[UIColor blackColor] retain];
276 | m_clrOuterBorder = [[UIColor grayColor] retain];
277 | m_clrInnerBorder = [[UIColor blackColor] retain];
278 | m_clrNormal = [[UIColor greenColor] retain];
279 | m_clrWarning = [[UIColor yellowColor] retain];
280 | m_clrDanger = [[UIColor redColor] retain];
281 |
282 | // Misc.
283 | self.clearsContextBeforeDrawing = NO;
284 | self.opaque = NO;
285 | }
286 |
287 |
288 | //------------------------------------------------------------------------
289 | // Method: drawRect:
290 | // Draw the gauge
291 | //
292 | -(void) drawRect:(CGRect)rect
293 | {
294 | CGContextRef ctx; // Graphics context
295 | CGRect rectBounds, // Bounding rectangle adjusted for multiple of bar size
296 | rectBar; // Rectangle for individual light bar
297 | size_t iBarSize; // Size (width or height) of each LED bar
298 |
299 | // How is the bar oriented?
300 | rectBounds = self.bounds;
301 | BOOL fIsVertical = (rectBounds.size.height >= rectBounds.size.width);
302 | if(fIsVertical) {
303 | // Adjust height to be an exact multiple of bar
304 | iBarSize = rectBounds.size.height / m_iNumBars;
305 | rectBounds.size.height = iBarSize * m_iNumBars;
306 | }
307 | else {
308 | // Adjust width to be an exact multiple
309 | iBarSize = rectBounds.size.width / m_iNumBars;
310 | rectBounds.size.width = iBarSize * m_iNumBars;
311 | }
312 |
313 | // Compute size of bar
314 | rectBar.size.width = (fIsVertical) ? rectBounds.size.width - 2 : iBarSize;
315 | rectBar.size.height = (fIsVertical) ? iBarSize : rectBounds.size.height - 2;
316 |
317 | // Get stuff needed for drawing
318 | ctx = UIGraphicsGetCurrentContext();
319 | CGContextClearRect(ctx, self.bounds);
320 |
321 | // Fill background
322 | CGContextSetFillColorWithColor(ctx, m_clrBackground.CGColor);
323 | CGContextFillRect(ctx, rectBounds);
324 |
325 | // Draw LED bars
326 | CGContextSetStrokeColorWithColor(ctx, m_clrInnerBorder.CGColor);
327 | CGContextSetLineWidth(ctx, 1.0);
328 | for( int iX = 0; iX < m_iNumBars; ++iX ) {
329 | // Determine position for this bar
330 | if(m_fReverseDirection) {
331 | // Top-to-bottom or right-to-left
332 | rectBar.origin.x = (fIsVertical) ? rectBounds.origin.x + 1 : (CGRectGetMaxX(rectBounds) - (iX+1) * iBarSize);
333 | rectBar.origin.y = (fIsVertical) ? (CGRectGetMinY(rectBounds) + iX * iBarSize) : rectBounds.origin.y + 1;
334 | }
335 | else {
336 | // Bottom-to-top or right-to-left
337 | rectBar.origin.x = (fIsVertical) ? rectBounds.origin.x + 1 : (CGRectGetMinX(rectBounds) + iX * iBarSize);
338 | rectBar.origin.y = (fIsVertical) ? (CGRectGetMaxY(rectBounds) - (iX + 1) * iBarSize) : rectBounds.origin.y + 1;
339 | }
340 |
341 | // Draw top and bottom borders for bar
342 | CGContextAddRect(ctx, rectBar);
343 | CGContextStrokePath(ctx);
344 |
345 | // Determine color of bar
346 | UIColor *clrFill = m_clrNormal;
347 | if( m_iDangerBarIdx >= 0 && iX >= m_iDangerBarIdx ) {
348 | clrFill = m_clrDanger;
349 | }
350 | else if( m_iWarningBarIdx >= 0 && iX >= m_iWarningBarIdx ) {
351 | clrFill = m_clrWarning;
352 | }
353 |
354 | // Determine if bar should be lit
355 | BOOL fLit = ((iX >= m_iOnIdx && iX < m_iOffIdx) || iX == m_iPeakBarIdx);
356 |
357 | // Fill the interior of the bar
358 | CGContextSaveGState(ctx);
359 | CGRect rectFill = CGRectInset(rectBar, 1.0, 1.0);
360 | CGPathRef clipPath = CGPathCreateWithRect(rectFill, NULL);
361 | CGContextAddPath(ctx, clipPath);
362 | CGContextClip(ctx);
363 | [self drawBar:ctx
364 | withRect:rectFill
365 | andColor:clrFill
366 | lit:fLit];
367 | CGContextRestoreGState(ctx);
368 | CGPathRelease(clipPath);
369 | }
370 |
371 | // Draw border around the control
372 | CGContextSetStrokeColorWithColor(ctx, m_clrOuterBorder.CGColor);
373 | CGContextSetLineWidth(ctx, 2.0);
374 | CGContextAddRect(ctx, CGRectInset(rectBounds, 1, 1));
375 | CGContextStrokePath(ctx);
376 | }
377 |
378 |
379 | //------------------------------------------------------------------------
380 | // Method: drawBar::::
381 | // This method draws a bar
382 | //
383 | - (void) drawBar:(CGContextRef)a_ctx
384 | withRect:(CGRect)a_rect
385 | andColor:(UIColor *)a_clr
386 | lit:(BOOL) a_fLit
387 | {
388 | // Is the bar lit?
389 | if(a_fLit) {
390 | // Are we doing radial gradient fills?
391 | if(m_fLitEffect) {
392 | // Yes, set up to draw the bar as a radial gradient
393 | static size_t num_locations = 2;
394 | static CGFloat locations[] = { 0.0, 0.5 };
395 | CGFloat aComponents[8];
396 | CGColorRef clr = a_clr.CGColor;
397 |
398 | // Set up color components from passed UIColor object
399 | if (CGColorGetNumberOfComponents(clr) == 4) {
400 | // Extract the components
401 | //
402 | // Note that iOS 5.0 provides a nicer way to do this i.e.
403 | // [a_clr getRed:&aComponents[0]
404 | // green:&aComponents[1]
405 | // blue:&aComponents[2]
406 | // alpha:&aComponents[3] ];
407 | memcpy(aComponents, CGColorGetComponents(clr), 4*sizeof(CGFloat));
408 |
409 | // Calculate dark color of gradient
410 | aComponents[4] = aComponents[0] - ((aComponents[0] > 0.3) ? 0.3 : 0.0);
411 | aComponents[5] = aComponents[1] - ((aComponents[1] > 0.3) ? 0.3 : 0.0);
412 | aComponents[6] = aComponents[2] - ((aComponents[2] > 0.3) ? 0.3 : 0.0);
413 | aComponents[7] = aComponents[3];
414 | }
415 |
416 | // Calculate radius needed
417 | CGFloat width = CGRectGetWidth(a_rect);
418 | CGFloat height = CGRectGetHeight(a_rect);
419 | CGFloat radius = sqrt( width * width + height * height );
420 |
421 | // Draw the gradient inside the provided rectangle
422 | CGColorSpaceRef myColorspace = CGColorSpaceCreateDeviceRGB();
423 | CGGradientRef myGradient = CGGradientCreateWithColorComponents (myColorspace,
424 | aComponents,
425 | locations,
426 | num_locations);
427 | CGPoint myStartPoint = { CGRectGetMidX(a_rect), CGRectGetMidY(a_rect) };
428 | CGContextDrawRadialGradient(a_ctx, myGradient, myStartPoint, 0.0, myStartPoint, radius, 0);
429 | CGColorSpaceRelease(myColorspace);
430 | CGGradientRelease(myGradient);
431 | }
432 | else {
433 | // No, solid fill
434 | CGContextSetFillColorWithColor(a_ctx, a_clr.CGColor);
435 | CGContextFillRect(a_ctx, a_rect);
436 | }
437 | }
438 | else {
439 | // No, draw the bar as background color overlayed with a mostly
440 | // ... transparent version of the passed color
441 | CGColorRef fillClr = CGColorCreateCopyWithAlpha(a_clr.CGColor, 0.2f);
442 | CGContextSetFillColorWithColor(a_ctx, m_clrBackground.CGColor);
443 | CGContextFillRect(a_ctx, a_rect);
444 | CGContextSetFillColorWithColor(a_ctx, fillClr);
445 | CGContextFillRect(a_ctx, a_rect);
446 | CGColorRelease(fillClr);
447 | }
448 | }
449 |
450 | @end
451 |
--------------------------------------------------------------------------------
/TabHoldandRecord/en.lproj/ViewController_iPhone.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1552
5 | 12E55
6 | 3084
7 | 1187.39
8 | 626.00
9 |
13 |
14 | IBProxyObject
15 | IBUIButton
16 | IBUILabel
17 | IBUIProgressView
18 | IBUIView
19 |
20 |
21 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
22 |
23 |
27 |
28 |
32 |
36 |
204 |
205 |
206 |
207 |
208 |
209 | view
210 |
211 |
212 |
213 | 7
214 |
215 |
216 |
217 | customRangeBar
218 |
219 |
220 |
221 | 37
222 |
223 |
224 |
225 | progressView
226 |
227 |
228 |
229 | 38
230 |
231 |
232 |
233 | viewForWave
234 |
235 |
236 |
237 | 39
238 |
239 |
240 |
241 | touchbutton
242 |
243 |
244 |
245 | 41
246 |
247 |
248 |
249 | playRecording
250 |
251 |
252 | 7
253 |
254 | 42
255 |
256 |
257 |
258 |
259 |
260 | 0
261 |
262 |
263 |
264 |
265 |
266 | -1
267 |
268 |
269 | File's Owner
270 |
271 |
272 | -2
273 |
274 |
275 |
276 |
277 | 6
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 | 8
291 |
292 |
293 |
294 |
295 |
296 | 9
297 |
298 |
299 |
300 |
301 |
302 | 10
303 |
304 |
305 |
306 |
307 | 11
308 |
309 |
310 |
311 |
312 |
313 | 13
314 |
315 |
316 |
317 |
318 |
319 | 12
320 |
321 |
322 |
323 |
324 |
325 |
326 | ViewController
327 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
328 | UIResponder
329 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
330 | F3BarGauge
331 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
332 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
333 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
334 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
335 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
336 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
337 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
338 |
339 |
340 |
341 |
342 |
343 |
344 | 42
345 |
346 |
347 | 0
348 | IBCocoaTouchFramework
349 | YES
350 | 3
351 |
352 | Play.png
353 | {128, 128}
354 |
355 | 2083
356 |
357 |
358 |
--------------------------------------------------------------------------------
/TabHoldandRecord.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 759C399E17B8B84500F923D2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 759C399D17B8B84500F923D2 /* UIKit.framework */; };
11 | 759C39A017B8B84500F923D2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 759C399F17B8B84500F923D2 /* Foundation.framework */; };
12 | 759C39A217B8B84500F923D2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 759C39A117B8B84500F923D2 /* CoreGraphics.framework */; };
13 | 759C39A817B8B84500F923D2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 759C39A617B8B84500F923D2 /* InfoPlist.strings */; };
14 | 759C39AA17B8B84500F923D2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 759C39A917B8B84500F923D2 /* main.m */; };
15 | 759C39AE17B8B84500F923D2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 759C39AD17B8B84500F923D2 /* AppDelegate.m */; };
16 | 759C39B017B8B84600F923D2 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 759C39AF17B8B84600F923D2 /* Default.png */; };
17 | 759C39B217B8B84600F923D2 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 759C39B117B8B84600F923D2 /* Default@2x.png */; };
18 | 759C39B417B8B84600F923D2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 759C39B317B8B84600F923D2 /* Default-568h@2x.png */; };
19 | 759C39B717B8B84600F923D2 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 759C39B617B8B84600F923D2 /* ViewController.m */; };
20 | 759C39BA17B8B84600F923D2 /* ViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 759C39B817B8B84600F923D2 /* ViewController_iPhone.xib */; };
21 | 759C39BD17B8B84600F923D2 /* ViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 759C39BB17B8B84600F923D2 /* ViewController_iPad.xib */; };
22 | 759C39C517B8B90200F923D2 /* listing_done_btn~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 759C39C317B8B90200F923D2 /* listing_done_btn~iphone.png */; };
23 | 759C39C617B8B90200F923D2 /* Play.png in Resources */ = {isa = PBXBuildFile; fileRef = 759C39C417B8B90200F923D2 /* Play.png */; };
24 | 759C39C917B8B98000F923D2 /* F3BarGauge.m in Sources */ = {isa = PBXBuildFile; fileRef = 759C39C817B8B98000F923D2 /* F3BarGauge.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25 | 759C39CB17B8BB2C00F923D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 759C39CA17B8BB2C00F923D2 /* QuartzCore.framework */; };
26 | 759C39CD17B8BB3200F923D2 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 759C39CC17B8BB3200F923D2 /* AudioToolbox.framework */; };
27 | 759C39D117B8BB4000F923D2 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 759C39D017B8BB4000F923D2 /* CoreAudio.framework */; };
28 | 759C39D317B8BB6700F923D2 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 759C39D217B8BB6700F923D2 /* AVFoundation.framework */; };
29 | 759C39D817B8C19400F923D2 /* Screen.png in Resources */ = {isa = PBXBuildFile; fileRef = 759C39D717B8C19400F923D2 /* Screen.png */; };
30 | /* End PBXBuildFile section */
31 |
32 | /* Begin PBXFileReference section */
33 | 759C399A17B8B84500F923D2 /* TabHoldandRecord.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TabHoldandRecord.app; sourceTree = BUILT_PRODUCTS_DIR; };
34 | 759C399D17B8B84500F923D2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
35 | 759C399F17B8B84500F923D2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
36 | 759C39A117B8B84500F923D2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
37 | 759C39A517B8B84500F923D2 /* TabHoldandRecord-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TabHoldandRecord-Info.plist"; sourceTree = ""; };
38 | 759C39A717B8B84500F923D2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
39 | 759C39A917B8B84500F923D2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
40 | 759C39AB17B8B84500F923D2 /* TabHoldandRecord-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TabHoldandRecord-Prefix.pch"; sourceTree = ""; };
41 | 759C39AC17B8B84500F923D2 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
42 | 759C39AD17B8B84500F923D2 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
43 | 759C39AF17B8B84600F923D2 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; };
44 | 759C39B117B8B84600F923D2 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; };
45 | 759C39B317B8B84600F923D2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; };
46 | 759C39B517B8B84600F923D2 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
47 | 759C39B617B8B84600F923D2 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
48 | 759C39B917B8B84600F923D2 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPhone.xib; sourceTree = ""; };
49 | 759C39BC17B8B84600F923D2 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPad.xib; sourceTree = ""; };
50 | 759C39C317B8B90200F923D2 /* listing_done_btn~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "listing_done_btn~iphone.png"; sourceTree = ""; };
51 | 759C39C417B8B90200F923D2 /* Play.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Play.png; sourceTree = ""; };
52 | 759C39C717B8B98000F923D2 /* F3BarGauge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = F3BarGauge.h; sourceTree = ""; };
53 | 759C39C817B8B98000F923D2 /* F3BarGauge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = F3BarGauge.m; sourceTree = ""; };
54 | 759C39CA17B8BB2C00F923D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
55 | 759C39CC17B8BB3200F923D2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
56 | 759C39D017B8BB4000F923D2 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
57 | 759C39D217B8BB6700F923D2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
58 | 759C39D717B8C19400F923D2 /* Screen.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Screen.png; sourceTree = ""; };
59 | /* End PBXFileReference section */
60 |
61 | /* Begin PBXFrameworksBuildPhase section */
62 | 759C399717B8B84500F923D2 /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | 759C39D317B8BB6700F923D2 /* AVFoundation.framework in Frameworks */,
67 | 759C39D117B8BB4000F923D2 /* CoreAudio.framework in Frameworks */,
68 | 759C39CD17B8BB3200F923D2 /* AudioToolbox.framework in Frameworks */,
69 | 759C39CB17B8BB2C00F923D2 /* QuartzCore.framework in Frameworks */,
70 | 759C399E17B8B84500F923D2 /* UIKit.framework in Frameworks */,
71 | 759C39A017B8B84500F923D2 /* Foundation.framework in Frameworks */,
72 | 759C39A217B8B84500F923D2 /* CoreGraphics.framework in Frameworks */,
73 | );
74 | runOnlyForDeploymentPostprocessing = 0;
75 | };
76 | /* End PBXFrameworksBuildPhase section */
77 |
78 | /* Begin PBXGroup section */
79 | 759C399117B8B84500F923D2 = {
80 | isa = PBXGroup;
81 | children = (
82 | 759C39A317B8B84500F923D2 /* TabHoldandRecord */,
83 | 759C399C17B8B84500F923D2 /* Frameworks */,
84 | 759C399B17B8B84500F923D2 /* Products */,
85 | );
86 | sourceTree = "";
87 | };
88 | 759C399B17B8B84500F923D2 /* Products */ = {
89 | isa = PBXGroup;
90 | children = (
91 | 759C399A17B8B84500F923D2 /* TabHoldandRecord.app */,
92 | );
93 | name = Products;
94 | sourceTree = "";
95 | };
96 | 759C399C17B8B84500F923D2 /* Frameworks */ = {
97 | isa = PBXGroup;
98 | children = (
99 | 759C39D217B8BB6700F923D2 /* AVFoundation.framework */,
100 | 759C39D017B8BB4000F923D2 /* CoreAudio.framework */,
101 | 759C39CC17B8BB3200F923D2 /* AudioToolbox.framework */,
102 | 759C39CA17B8BB2C00F923D2 /* QuartzCore.framework */,
103 | 759C399D17B8B84500F923D2 /* UIKit.framework */,
104 | 759C399F17B8B84500F923D2 /* Foundation.framework */,
105 | 759C39A117B8B84500F923D2 /* CoreGraphics.framework */,
106 | );
107 | name = Frameworks;
108 | sourceTree = "";
109 | };
110 | 759C39A317B8B84500F923D2 /* TabHoldandRecord */ = {
111 | isa = PBXGroup;
112 | children = (
113 | 759C39C717B8B98000F923D2 /* F3BarGauge.h */,
114 | 759C39C817B8B98000F923D2 /* F3BarGauge.m */,
115 | 759C39AC17B8B84500F923D2 /* AppDelegate.h */,
116 | 759C39AD17B8B84500F923D2 /* AppDelegate.m */,
117 | 759C39B517B8B84600F923D2 /* ViewController.h */,
118 | 759C39B617B8B84600F923D2 /* ViewController.m */,
119 | 759C39B817B8B84600F923D2 /* ViewController_iPhone.xib */,
120 | 759C39BB17B8B84600F923D2 /* ViewController_iPad.xib */,
121 | 759C39A417B8B84500F923D2 /* Supporting Files */,
122 | );
123 | path = TabHoldandRecord;
124 | sourceTree = "";
125 | };
126 | 759C39A417B8B84500F923D2 /* Supporting Files */ = {
127 | isa = PBXGroup;
128 | children = (
129 | 759C39C317B8B90200F923D2 /* listing_done_btn~iphone.png */,
130 | 759C39D717B8C19400F923D2 /* Screen.png */,
131 | 759C39C417B8B90200F923D2 /* Play.png */,
132 | 759C39A517B8B84500F923D2 /* TabHoldandRecord-Info.plist */,
133 | 759C39A617B8B84500F923D2 /* InfoPlist.strings */,
134 | 759C39A917B8B84500F923D2 /* main.m */,
135 | 759C39AB17B8B84500F923D2 /* TabHoldandRecord-Prefix.pch */,
136 | 759C39AF17B8B84600F923D2 /* Default.png */,
137 | 759C39B117B8B84600F923D2 /* Default@2x.png */,
138 | 759C39B317B8B84600F923D2 /* Default-568h@2x.png */,
139 | );
140 | name = "Supporting Files";
141 | sourceTree = "";
142 | };
143 | /* End PBXGroup section */
144 |
145 | /* Begin PBXNativeTarget section */
146 | 759C399917B8B84500F923D2 /* TabHoldandRecord */ = {
147 | isa = PBXNativeTarget;
148 | buildConfigurationList = 759C39C017B8B84600F923D2 /* Build configuration list for PBXNativeTarget "TabHoldandRecord" */;
149 | buildPhases = (
150 | 759C399617B8B84500F923D2 /* Sources */,
151 | 759C399717B8B84500F923D2 /* Frameworks */,
152 | 759C399817B8B84500F923D2 /* Resources */,
153 | );
154 | buildRules = (
155 | );
156 | dependencies = (
157 | );
158 | name = TabHoldandRecord;
159 | productName = TabHoldandRecord;
160 | productReference = 759C399A17B8B84500F923D2 /* TabHoldandRecord.app */;
161 | productType = "com.apple.product-type.application";
162 | };
163 | /* End PBXNativeTarget section */
164 |
165 | /* Begin PBXProject section */
166 | 759C399217B8B84500F923D2 /* Project object */ = {
167 | isa = PBXProject;
168 | attributes = {
169 | LastUpgradeCheck = 0460;
170 | ORGANIZATIONNAME = "Ashish Tripathi";
171 | };
172 | buildConfigurationList = 759C399517B8B84500F923D2 /* Build configuration list for PBXProject "TabHoldandRecord" */;
173 | compatibilityVersion = "Xcode 3.2";
174 | developmentRegion = English;
175 | hasScannedForEncodings = 0;
176 | knownRegions = (
177 | en,
178 | );
179 | mainGroup = 759C399117B8B84500F923D2;
180 | productRefGroup = 759C399B17B8B84500F923D2 /* Products */;
181 | projectDirPath = "";
182 | projectRoot = "";
183 | targets = (
184 | 759C399917B8B84500F923D2 /* TabHoldandRecord */,
185 | );
186 | };
187 | /* End PBXProject section */
188 |
189 | /* Begin PBXResourcesBuildPhase section */
190 | 759C399817B8B84500F923D2 /* Resources */ = {
191 | isa = PBXResourcesBuildPhase;
192 | buildActionMask = 2147483647;
193 | files = (
194 | 759C39A817B8B84500F923D2 /* InfoPlist.strings in Resources */,
195 | 759C39B017B8B84600F923D2 /* Default.png in Resources */,
196 | 759C39B217B8B84600F923D2 /* Default@2x.png in Resources */,
197 | 759C39B417B8B84600F923D2 /* Default-568h@2x.png in Resources */,
198 | 759C39BA17B8B84600F923D2 /* ViewController_iPhone.xib in Resources */,
199 | 759C39BD17B8B84600F923D2 /* ViewController_iPad.xib in Resources */,
200 | 759C39C517B8B90200F923D2 /* listing_done_btn~iphone.png in Resources */,
201 | 759C39C617B8B90200F923D2 /* Play.png in Resources */,
202 | 759C39D817B8C19400F923D2 /* Screen.png in Resources */,
203 | );
204 | runOnlyForDeploymentPostprocessing = 0;
205 | };
206 | /* End PBXResourcesBuildPhase section */
207 |
208 | /* Begin PBXSourcesBuildPhase section */
209 | 759C399617B8B84500F923D2 /* Sources */ = {
210 | isa = PBXSourcesBuildPhase;
211 | buildActionMask = 2147483647;
212 | files = (
213 | 759C39AA17B8B84500F923D2 /* main.m in Sources */,
214 | 759C39AE17B8B84500F923D2 /* AppDelegate.m in Sources */,
215 | 759C39B717B8B84600F923D2 /* ViewController.m in Sources */,
216 | 759C39C917B8B98000F923D2 /* F3BarGauge.m in Sources */,
217 | );
218 | runOnlyForDeploymentPostprocessing = 0;
219 | };
220 | /* End PBXSourcesBuildPhase section */
221 |
222 | /* Begin PBXVariantGroup section */
223 | 759C39A617B8B84500F923D2 /* InfoPlist.strings */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 759C39A717B8B84500F923D2 /* en */,
227 | );
228 | name = InfoPlist.strings;
229 | sourceTree = "";
230 | };
231 | 759C39B817B8B84600F923D2 /* ViewController_iPhone.xib */ = {
232 | isa = PBXVariantGroup;
233 | children = (
234 | 759C39B917B8B84600F923D2 /* en */,
235 | );
236 | name = ViewController_iPhone.xib;
237 | sourceTree = "";
238 | };
239 | 759C39BB17B8B84600F923D2 /* ViewController_iPad.xib */ = {
240 | isa = PBXVariantGroup;
241 | children = (
242 | 759C39BC17B8B84600F923D2 /* en */,
243 | );
244 | name = ViewController_iPad.xib;
245 | sourceTree = "";
246 | };
247 | /* End PBXVariantGroup section */
248 |
249 | /* Begin XCBuildConfiguration section */
250 | 759C39BE17B8B84600F923D2 /* Debug */ = {
251 | isa = XCBuildConfiguration;
252 | buildSettings = {
253 | ALWAYS_SEARCH_USER_PATHS = NO;
254 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
255 | CLANG_CXX_LIBRARY = "libc++";
256 | CLANG_ENABLE_OBJC_ARC = YES;
257 | CLANG_WARN_CONSTANT_CONVERSION = YES;
258 | CLANG_WARN_EMPTY_BODY = YES;
259 | CLANG_WARN_ENUM_CONVERSION = YES;
260 | CLANG_WARN_INT_CONVERSION = YES;
261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
263 | COPY_PHASE_STRIP = NO;
264 | GCC_C_LANGUAGE_STANDARD = gnu99;
265 | GCC_DYNAMIC_NO_PIC = NO;
266 | GCC_OPTIMIZATION_LEVEL = 0;
267 | GCC_PREPROCESSOR_DEFINITIONS = (
268 | "DEBUG=1",
269 | "$(inherited)",
270 | );
271 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
272 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
273 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
274 | GCC_WARN_UNUSED_VARIABLE = YES;
275 | IPHONEOS_DEPLOYMENT_TARGET = 6.1;
276 | ONLY_ACTIVE_ARCH = YES;
277 | SDKROOT = iphoneos;
278 | TARGETED_DEVICE_FAMILY = "1,2";
279 | };
280 | name = Debug;
281 | };
282 | 759C39BF17B8B84600F923D2 /* Release */ = {
283 | isa = XCBuildConfiguration;
284 | buildSettings = {
285 | ALWAYS_SEARCH_USER_PATHS = NO;
286 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
287 | CLANG_CXX_LIBRARY = "libc++";
288 | CLANG_ENABLE_OBJC_ARC = YES;
289 | CLANG_WARN_CONSTANT_CONVERSION = YES;
290 | CLANG_WARN_EMPTY_BODY = YES;
291 | CLANG_WARN_ENUM_CONVERSION = YES;
292 | CLANG_WARN_INT_CONVERSION = YES;
293 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
294 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
295 | COPY_PHASE_STRIP = YES;
296 | GCC_C_LANGUAGE_STANDARD = gnu99;
297 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
298 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
299 | GCC_WARN_UNUSED_VARIABLE = YES;
300 | IPHONEOS_DEPLOYMENT_TARGET = 6.1;
301 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
302 | SDKROOT = iphoneos;
303 | TARGETED_DEVICE_FAMILY = "1,2";
304 | VALIDATE_PRODUCT = YES;
305 | };
306 | name = Release;
307 | };
308 | 759C39C117B8B84600F923D2 /* Debug */ = {
309 | isa = XCBuildConfiguration;
310 | buildSettings = {
311 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
312 | GCC_PREFIX_HEADER = "TabHoldandRecord/TabHoldandRecord-Prefix.pch";
313 | INFOPLIST_FILE = "TabHoldandRecord/TabHoldandRecord-Info.plist";
314 | PRODUCT_NAME = "$(TARGET_NAME)";
315 | WRAPPER_EXTENSION = app;
316 | };
317 | name = Debug;
318 | };
319 | 759C39C217B8B84600F923D2 /* Release */ = {
320 | isa = XCBuildConfiguration;
321 | buildSettings = {
322 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
323 | GCC_PREFIX_HEADER = "TabHoldandRecord/TabHoldandRecord-Prefix.pch";
324 | INFOPLIST_FILE = "TabHoldandRecord/TabHoldandRecord-Info.plist";
325 | PRODUCT_NAME = "$(TARGET_NAME)";
326 | WRAPPER_EXTENSION = app;
327 | };
328 | name = Release;
329 | };
330 | /* End XCBuildConfiguration section */
331 |
332 | /* Begin XCConfigurationList section */
333 | 759C399517B8B84500F923D2 /* Build configuration list for PBXProject "TabHoldandRecord" */ = {
334 | isa = XCConfigurationList;
335 | buildConfigurations = (
336 | 759C39BE17B8B84600F923D2 /* Debug */,
337 | 759C39BF17B8B84600F923D2 /* Release */,
338 | );
339 | defaultConfigurationIsVisible = 0;
340 | defaultConfigurationName = Release;
341 | };
342 | 759C39C017B8B84600F923D2 /* Build configuration list for PBXNativeTarget "TabHoldandRecord" */ = {
343 | isa = XCConfigurationList;
344 | buildConfigurations = (
345 | 759C39C117B8B84600F923D2 /* Debug */,
346 | 759C39C217B8B84600F923D2 /* Release */,
347 | );
348 | defaultConfigurationIsVisible = 0;
349 | defaultConfigurationName = Release;
350 | };
351 | /* End XCConfigurationList section */
352 | };
353 | rootObject = 759C399217B8B84500F923D2 /* Project object */;
354 | }
355 |
--------------------------------------------------------------------------------
/TabHoldandRecord/en.lproj/ViewController_iPad.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1552
5 | 12E55
6 | 3084
7 | 1187.39
8 | 626.00
9 |
10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
11 | 2083
12 |
13 |
14 | IBProxyObject
15 | IBUIButton
16 | IBUILabel
17 | IBUIProgressView
18 | IBUIView
19 |
20 |
21 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
22 |
23 |
24 | PluginDependencyRecalculationVersion
25 |
26 |
27 |
28 |
29 | IBFilesOwner
30 | IBIPadFramework
31 |
32 |
33 | IBFirstResponder
34 | IBIPadFramework
35 |
36 |
37 |
38 | 274
39 |
40 |
41 |
42 | 292
43 | {{359, 757}, {50, 50}}
44 |
45 |
46 |
47 | _NS:9
48 | NO
49 | IBIPadFramework
50 | 0
51 | 0
52 |
53 | 3
54 | MQA
55 |
56 |
57 | 1
58 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
59 |
60 |
61 | 3
62 | MC41AA
63 |
64 |
65 | NSImage
66 | Play.png
67 |
68 |
69 | 2
70 | 15
71 |
72 |
73 | Helvetica-Bold
74 | 15
75 | 16
76 |
77 |
78 |
79 |
80 | 292
81 | {{0, 960}, {768, 44}}
82 |
83 |
84 | _NS:9
85 |
86 | 1
87 | MSAwLjcwNjg2ODE3ODUgMC4zMTIwMjM2ODEzAA
88 |
89 | NO
90 | IBIPadFramework
91 | 0
92 | 0
93 | Hold & Talk
94 |
95 |
96 |
97 |
98 | 2
99 | 2
100 |
101 |
102 | Helvetica-Bold
103 | 18
104 | 16
105 |
106 |
107 |
108 |
109 | 292
110 | {{294, 813}, {180, 52}}
111 |
112 |
113 |
114 | _NS:9
115 | NO
116 | YES
117 | 7
118 | NO
119 | IBIPadFramework
120 | Label
121 |
122 | 1
123 | MCAwIDAAA
124 | darkTextColor
125 |
126 |
127 | 0
128 | 1
129 |
130 | 1
131 | 17
132 |
133 |
134 | Helvetica
135 | 17
136 | 16
137 |
138 | NO
139 |
140 |
141 |
142 | 292
143 | {{0, 913}, {768, 9}}
144 |
145 |
146 |
147 | _NS:9
148 | NO
149 | IBIPadFramework
150 | 0.5
151 |
152 |
153 |
154 | 292
155 | {{0, 875}, {768, 38}}
156 |
157 |
158 |
159 | _NS:196
160 |
161 | 3
162 | MC42NjY2NjY2NjY3AA
163 |
164 | IBIPadFramework
165 |
166 |
167 |
168 | 292
169 |
170 | {{0, 920}, {768, 40}}
171 |
172 |
173 |
174 | _NS:9
175 |
176 | IBIPadFramework
177 |
178 |
179 | {{0, 20}, {768, 1004}}
180 |
181 |
182 |
183 |
184 | 3
185 | MQA
186 |
187 | 2
188 |
189 |
190 |
191 | 2
192 |
193 | IBIPadFramework
194 |
195 |
196 |
197 |
198 |
199 |
200 | view
201 |
202 |
203 |
204 | 3
205 |
206 |
207 |
208 | viewForWave
209 |
210 |
211 |
212 | 62
213 |
214 |
215 |
216 | touchbutton
217 |
218 |
219 |
220 | 64
221 |
222 |
223 |
224 | statusLabel
225 |
226 |
227 |
228 | 65
229 |
230 |
231 |
232 | progressView
233 |
234 |
235 |
236 | 66
237 |
238 |
239 |
240 | customRangeBar
241 |
242 |
243 |
244 | 67
245 |
246 |
247 |
248 | playRecording
249 |
250 |
251 | 7
252 |
253 | 63
254 |
255 |
256 |
257 |
258 |
259 | 0
260 |
261 |
262 |
263 |
264 |
265 | -1
266 |
267 |
268 | File's Owner
269 |
270 |
271 | -2
272 |
273 |
274 |
275 |
276 | 2
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 | 33
290 |
291 |
292 |
293 |
294 |
295 | 34
296 |
297 |
298 |
299 |
300 |
301 | 35
302 |
303 |
304 |
305 |
306 |
307 | 36
308 |
309 |
310 |
311 |
312 |
313 | 37
314 |
315 |
316 |
317 |
318 | 38
319 |
320 |
321 |
322 |
323 |
324 |
325 | ViewController
326 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
327 | UIResponder
328 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
329 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
330 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
331 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
332 |
333 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
334 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
335 | F3BarGauge
336 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
337 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
338 |
339 |
340 |
341 |
342 |
343 | 67
344 |
345 |
346 |
347 |
348 | F3BarGauge
349 | UIView
350 |
351 | IBProjectSource
352 | ./Classes/F3BarGauge.h
353 |
354 |
355 |
356 | ViewController
357 | UIViewController
358 |
359 | id
360 | id
361 | id
362 | id
363 |
364 |
365 |
366 | playRecording
367 | id
368 |
369 |
370 | startRecording
371 | id
372 |
373 |
374 | stopPlaying
375 | id
376 |
377 |
378 | stopRecording
379 | id
380 |
381 |
382 |
383 | F3BarGauge
384 | UIImageView
385 | UIProgressView
386 | UILabel
387 | UIButton
388 | UIView
389 | UIView
390 |
391 |
392 |
393 | customRangeBar
394 | F3BarGauge
395 |
396 |
397 | imageView
398 | UIImageView
399 |
400 |
401 | progressView
402 | UIProgressView
403 |
404 |
405 | statusLabel
406 | UILabel
407 |
408 |
409 | touchbutton
410 | UIButton
411 |
412 |
413 | viewForWave
414 | UIView
415 |
416 |
417 | viewForWave2
418 | UIView
419 |
420 |
421 |
422 | IBProjectSource
423 | ./Classes/ViewController.h
424 |
425 |
426 |
427 |
428 | 0
429 | IBIPadFramework
430 | YES
431 | 3
432 |
433 | Play.png
434 | {128, 128}
435 |
436 | 2083
437 |
438 |
439 |
--------------------------------------------------------------------------------