#include "Audio/AudioWavFile.H"
#include "Component/ModelManager.H"
#include "Devices/AudioGrabber.H"
#include "Devices/AudioMixer.H"
#include "GUI/XWindow.H"
#include "Image/DrawOps.H"
#include "Image/Image.H"
#include "Util/log.H"
#include "Util/sformat.H"
#include "Util/Timer.H"
#include <cstdio>
#include <signal.h>
#include <queue>
#include <fstream>
Go to the source code of this file.
Defines | |
#define | SCALE 4 |
Functions | |
void | terminate (int s) |
Signal handler (e.g., for control-C). | |
static void * | saveData (void *) |
save data as it becomes available | |
static void * | plotData (void *) |
plot the result | |
int | main (int argc, const char **argv) |
main | |
Variables | |
static bool | goforever = true |
Will turn false on interrupt signal. | |
std::queue< AudioBuffer< uint16 > > | rec |
std::queue< AudioBuffer< uint16 > > | dispQ |
pthread_mutex_t | qmutex_data |
pthread_mutex_t | qmutex_disp |
std::vector< AudioBuffer < uint16 > > | rec2 |
uint | nsamples |
int | totalSamps = 0 |
int | numBuffs = 0 |
int | nChans = 0 |
Timer | tim |
Test ephys board programmed as USB input audio device
Definition in file test-EphysAudio.C.
int main | ( | int | argc, | |
const char ** | argv | |||
) |
main
Definition at line 170 of file test-EphysAudio.C.
References ModelComponent::addSubComponent(), Timer::getSecs(), goforever, ModelManager::parseCommandLine(), plotData(), Timer::reset(), saveData(), ModelComponent::start(), ModelComponent::stop(), and writeAudioWavFile().
static void* plotData | ( | void * | ) | [static] |
plot the result
Definition at line 119 of file test-EphysAudio.C.
References Image< T >::clear(), XWindow::drawImage(), Timer::getSecs(), AudioBuffer< T >::getVal(), goforever, Point2D< T >::i, NO_INIT, sformat(), and writeText().
Referenced by main().
static void* saveData | ( | void * | ) | [static] |
save data as it becomes available
Definition at line 75 of file test-EphysAudio.C.
References AudioBuffer< T >::getVal(), goforever, and AudioBuffer< T >::nsamples().
Referenced by main().
void terminate | ( | int | s | ) |
Signal handler (e.g., for control-C).
Definition at line 70 of file test-EphysAudio.C.
References goforever.
bool goforever = true [static] |
Will turn false on interrupt signal.
Definition at line 53 of file test-EphysAudio.C.
Referenced by main(), plotData(), saveData(), and terminate().