Implement audio device start/stop functions.
authorbruceperens <bruceperens@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 22 Apr 2014 01:25:43 +0000 (01:25 +0000)
committerbruceperens <bruceperens@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 22 Apr 2014 01:25:43 +0000 (01:25 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@1541 01035d8c-6547-0410-b346-abe4f91aad63

freedv-server/source/audio_device.cpp
freedv-server/source/drivers.h

index d02affa92b52ce0a2d7c2eb0d31e4da85e30be36..a4c712e1286710c95211b825a720f07a384163f4 100644 (file)
@@ -32,4 +32,15 @@ namespace FreeDV {
        "Amplitude set to value outside of the range 0.0..1.0");
     master_amplitude = value;
   }
+
+  void
+  AudioDevice::start()
+  {
+  }
+
+  void
+  AudioDevice::stop()
+  {
+  }
+
 }
index d92c92a34e885b9355b3c08382bcc9a93cf6a436..e49e64978cb478211b6868cfc4c2fa78af4ae14a 100644 (file)
@@ -298,6 +298,19 @@ public:
     /// \param value The new value for the current audio level.
     /// The value must be normalized within the range of 0.0 to 1.0.
     virtual void       amplitude(float value);
+
+    /// Start the audio device.
+    /// Input devices: start digitizing samples for the program to subsequently
+    /// read.
+    /// Output devices: prepare for samples to be sent.
+    /// The default implementation of this function does nothing.
+    virtual void       start();
+
+    /// Stop the audio device.
+    /// Input devices: stop digitizing samples.
+    /// Output devices: stop playing samples.
+    /// The default implementation of this function does nothing.
+    virtual void       stop();
 };
 
 /// Virtual base class for audio input drivers.
@@ -324,6 +337,7 @@ public:
     /// \return The number of 16-bit audio samples that were actually read.
     /// This may be smaller than *length*, or it may be zero.
     virtual std::size_t
+
     read16(std::int16_t * array, std::size_t length) = 0;
 };