source/audio_input.cpp
source/audio_output.cpp
source/audio_sink.cpp
+ source/blank_panel.cpp
source/driver_manager.cpp
source/keying.cpp
source/keying_sink.cpp
source/main.cpp
source/ptt_input.cpp
+ source/ptt_constant.cpp
+ source/text_constant.cpp
source/text_input.cpp
source/tone.cpp
source/user_interface.cpp
--- /dev/null
+#include "drivers.h"
+#include <iostream>
+
+// This is a test driver that provides tones.
+namespace FreeDV {
+ class BlankPanel : public UserInterface {
+ public:
+ BlankPanel(const char * parameter);
+ virtual ~BlankPanel();
+
+ };
+
+ BlankPanel::BlankPanel(const char * parameter)
+ {
+ }
+
+ BlankPanel::~BlankPanel()
+ {
+ }
+
+ static UserInterface *
+ creator(const char * parameter)
+ {
+ return new BlankPanel(parameter);
+ }
+
+ static bool
+ initializer()
+ {
+ driver_manager.register_user_interface("blank-panel", creator);
+ return true;
+ }
+ static const bool initialized = initializer();
+};
public:
// If this interface prodvides its own microphone driver, return it. Otherwise return 0.
// This is guaranteed to return the same object every time, for the lifetime of this object.
- virtual AudioInput * microphone() = 0;
+ virtual AudioInput * microphone();
// If this interface prodvides its own loudspeaker driver, return it. Otherwise return 0.
// This is guaranteed to return the same object every time, for the lifetime of this object.
- virtual AudioOutput * loudspeaker() = 0;
+ virtual AudioOutput * loudspeaker();
// If this interface prodvides its own text input driver, return it. Otherwise return 0.
// This is guaranteed to return the same object every time, for the lifetime of this object.
- virtual TextInput * text_input() = 0;
+ virtual TextInput * text_input();
// If this interface prodvides its own push-to-talk input driver, return it. Otherwise return 0.
// This is guaranteed to return the same object every time, for the lifetime of this object.
- virtual PTTInput * ptt_input() = 0;
+ virtual PTTInput * ptt_input();
};
class DriverManager {
--- /dev/null
+#include "drivers.h"
+#include <iostream>
+
+// PTT driver that is constant transmit or constant receive. For testing.
+namespace FreeDV {
+ class PTTConstant : public PTTInput {
+ public:
+ PTTConstant(const char * parameter);
+ virtual ~PTTConstant();
+
+ };
+
+ PTTConstant::PTTConstant(const char * parameter)
+ {
+ }
+
+ PTTConstant::~PTTConstant()
+ {
+ }
+
+ static PTTInput *
+ creator(const char * parameter)
+ {
+ return new PTTConstant(parameter);
+ }
+
+ static bool
+ initializer()
+ {
+ driver_manager.register_ptt_input("constant", creator);
+ return true;
+ }
+ static const bool initialized = initializer();
+};
--- /dev/null
+#include "drivers.h"
+#include <iostream>
+
+// This is a test driver that provides tones.
+namespace FreeDV {
+ class TextConstant : public TextInput {
+ public:
+ TextConstant(const char * parameter);
+ virtual ~TextConstant();
+
+ };
+
+ TextConstant::TextConstant(const char * parameter)
+ {
+ }
+
+ TextConstant::~TextConstant()
+ {
+ }
+
+ static TextInput *
+ creator(const char * parameter)
+ {
+ return new TextConstant(parameter);
+ }
+
+ static bool
+ initializer()
+ {
+ driver_manager.register_text_input("constant", creator);
+ return true;
+ }
+ static const bool initialized = initializer();
+};
UserInterface::~UserInterface()
{
}
+
+ AudioInput *
+ UserInterface::microphone()
+ {
+ return 0;
+ }
+
+ AudioOutput *
+ UserInterface::loudspeaker()
+ {
+ return 0;
+ }
+
+ TextInput *
+ UserInterface::text_input()
+ {
+ return 0;
+ }
+
+ PTTInput *
+ UserInterface::ptt_input()
+ {
+ return 0;
+ }
};