Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

AudioFileWriter interface cleanup

  • Loading branch information...
commit f4572b010c99e6abbe655adba1137b93fd450b8d 1 parent 5248129
@ndonald2 ndonald2 authored
View
2  Novocaine/AudioFileReader.h
@@ -31,11 +31,11 @@
// ----- Read-write ------
@property (nonatomic, assign, getter=getCurrentTime, setter=setCurrentTime:) float currentTime;
-@property (nonatomic, copy) NSURL *audioFileURL;
@property (nonatomic, copy) NovocaineInputBlock readerBlock;
// ----- Read-only ------
+@property (nonatomic, copy, readonly) NSURL *audioFileURL;
@property (nonatomic, assign, readonly, getter=getDuration) float duration;
@property (nonatomic, assign, readonly) float samplingRate;
@property (nonatomic, assign, readonly) UInt32 numChannels;
View
3  Novocaine/AudioFileReader.mm
@@ -33,6 +33,7 @@ @interface AudioFileReader ()
}
// redeclaration as readwrite in class continuation
+@property (nonatomic, copy, readwrite) NSURL *audioFileURL;
@property (nonatomic, assign, readwrite, getter=getDuration) float duration;
@property (nonatomic, assign, readwrite) float samplingRate;
@property (nonatomic, assign, readwrite) UInt32 numChannels;
@@ -252,7 +253,7 @@ - (void)retrieveFreshAudio:(float *)buffer numFrames:(UInt32)thisNumFrames numCh
}
-- (void)play;
+- (void)play
{
// Configure (or if necessary, create and start) the timer for retrieving audio
View
17 Novocaine/AudioFileWriter.h
@@ -31,14 +31,17 @@
@interface AudioFileWriter : NSObject
-@property (nonatomic, assign, getter=getDuration, readonly) float currentTime;
-@property (nonatomic, assign, getter=getDuration) float duration;
-@property (nonatomic, assign) float samplingRate;
-@property (nonatomic, assign) UInt32 numChannels;
-@property (nonatomic, assign) float latency;
-@property (nonatomic, copy) NSURL *audioFileURL;
+// ----- Read-write ------
@property (nonatomic, copy) NovocaineInputBlock writerBlock;
-@property (nonatomic, assign) BOOL recording;
+
+// ----- Read-only ------
+@property (nonatomic, assign, getter=getDuration, readonly) float currentTime;
+@property (nonatomic, assign, getter=getDuration, readonly) float duration;
+@property (nonatomic, assign, readonly) float samplingRate;
+@property (nonatomic, assign, readonly) UInt32 numChannels;
+@property (nonatomic, assign, readonly) float latency;
+@property (nonatomic, copy, readonly) NSURL *audioFileURL;
+@property (nonatomic, assign, readonly) BOOL recording;
- (id)initWithAudioFileURL:(NSURL *)urlToAudioFile samplingRate:(float)thisSamplingRate numChannels:(UInt32)thisNumChannels;
View
10 Novocaine/AudioFileWriter.m
@@ -29,6 +29,15 @@
@interface AudioFileWriter()
+// redeclare as readwrite in class continuation
+@property (nonatomic, assign, getter=getDuration, readwrite) float currentTime;
+@property (nonatomic, assign, getter=getDuration, readwrite) float duration;
+@property (nonatomic, assign, readwrite) float samplingRate;
+@property (nonatomic, assign, readwrite) UInt32 numChannels;
+@property (nonatomic, assign, readwrite) float latency;
+@property (nonatomic, copy, readwrite) NSURL *audioFileURL;
+@property (nonatomic, assign, readwrite) BOOL recording;
+
@property (nonatomic, assign) AudioStreamBasicDescription outputFormat;
@property (nonatomic, assign) ExtAudioFileRef outputFile;
@property (nonatomic, assign) UInt32 outputBufferSize;
@@ -36,7 +45,6 @@ @interface AudioFileWriter()
@property (nonatomic, assign) float *holdingBuffer;
@property (nonatomic, assign) SInt64 currentFileTime;
@property (nonatomic, assign) dispatch_source_t callbackTimer;
-@property (nonatomic, assign, readwrite) float currentTime;
@end
Please sign in to comment.
Something went wrong with that request. Please try again.