source: orbit/iOS/Orbit/Orbit/SignalConverter.h @ fc960da

Servo
Last change on this file since fc960da was fc960da, checked in by Steve Castellotti <sc@…>, 8 years ago
  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[ab9d63b]1//
2//  SignalConverter.h
3//  orbit
4//
5//  Copyright (c) 2013 Puzzlebox Productions, LLC. All rights reserved.
[6db346c]6//  Originally created by Jonathon Horsman.
7//
8//  This code is released under the GNU Public License (GPL) version 2
9//  For more information please refer to http://www.gnu.org/copyleft/gpl.html
[ab9d63b]10//
11
12#import <Foundation/Foundation.h>
[de10cbc]13//#import <MediaPlayer/MediaPlayer.h>
[ab9d63b]14#import <AVFoundation/AVFoundation.h>
15#import "TGAccessoryManager.h"
16#import "TGAccessoryDelegate.h"
17#import "SignalConverterDelegate.h"
[ce0a7ee]18#import "AudioGenerator.h"
[ab9d63b]19
[c9b9edd]20#define USE_AUDIO_GENERATOR 1
21
22
[ab9d63b]23@interface SignalConverter : NSObject <TGAccessoryDelegate> {
[c9b9edd]24   
25#if USE_AUDIO_GENERATOR
[ad40faa]26   // Generate Signal
[c9b9edd]27   AudioGenerator *audioPlayer;
28#else
[ad40faa]29   // Play WAV
30   AVAudioPlayer *audioPlayer;
[c9b9edd]31#endif
[ab9d63b]32}
33
[2246ba0]34//@property (nonatomic, retain) [NSArray arrayWithObjects:[NSNumber numberWithFloat:6.9]] *rawEEG;
35//Number[] rawEEG = new Number[512];
36
37//@property (nonatomic, retain) [NSArray arrayWithObjects:[NSNumber numberWithFloat:6.9]] *historyAttention;
38
39//@property (nonatomic, retain) NSArray *rawEEG;
40//@property (nonatomic, retain) NSArray *historyAttention;
41//@property (nonatomic, retain) NSArray *historyMeditation;
42
43//@property (nonatomic, retain) int historyAttention[30];
44//@property (nonatomic, retain) historyMeditation;
45
[ab9d63b]46@property (weak) id <SignalConverterDelegate> delegate;
47@property (nonatomic) float attentionThreshold;
48@property (nonatomic) float meditationThreshold;
49@property (nonatomic) BOOL running;
[de10cbc]50@property (nonatomic) BOOL testing;
[ab9d63b]51
52
53- (void) setValuesForAttention:(float) attention meditation:(float) meditation;
[9015b1e]54- (BOOL) startProcessing;
[ab9d63b]55- (void) stopProcessing;
[9015b1e]56- (void) appStopped;
57- (BOOL) isBluetoothReady;
58- (BOOL) isVolumeMax;
[359a504]59- (BOOL) isAudioJackPlugged;
[b094d6c]60- (void) setControlSettings:(int)y throttle:(int)t pitch:(int)p;
[de10cbc]61- (void) playTestSound;
62- (void) stopTestSound;
[ad40faa]63- (void) prepareAudio;
[ab9d63b]64
[fc960da]65//- (int[30]) getAttentionHistory;
66- (int) getAttentionHistory:(int) index;
67
[ab9d63b]68@end
Note: See TracBrowser for help on using the repository browser.