Permalink
Browse files

SC_CoreAudio: Document the methods that ppl are expected to implement…

… in subclasses

git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9897 a380766d-ff14-0410-b294-a243070f3f08
  • Loading branch information...
1 parent ff4e82e commit a8e4b6ecd7630031d94087dc4e610172eccb3f48 @danstowell danstowell committed Feb 28, 2010
Showing with 14 additions and 0 deletions.
  1. +14 −0 common/Headers/server/SC_CoreAudio.h
@@ -132,8 +132,22 @@ class SC_AudioDriver
double mSampleRate;
// Driver interface methods, implemented by subclasses
+ /**
+ * DriverSetup() should init the driver and write the num of samples per callback
+ * and the sample rate into the two addresses supplied as arguments.
+ * The driver will have access to the "preferred" values of these two args
+ * (mPreferredHardwareBufferFrameSize, mPreferredSampleRate) and ideally should follow them.
+ * This method should open the resources (and return true if successful), but shouldn't
+ * really start the streaming (this is the responsibility of DriverStart()).
+ */
virtual bool DriverSetup(int* outNumSamplesPerCallback, double* outSampleRate) = 0;
+ /**
+ * Start the audio streaming. Return true iff successful.
+ */
virtual bool DriverStart() = 0;
+ /**
+ * Stop the audio streaming. Return true iff successful.
+ */
virtual bool DriverStop() = 0;
public:

0 comments on commit a8e4b6e

Please sign in to comment.