Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

clSoundUI Class Reference

Sound user interface. More...

#include <SoundUI.hh>

Collaboration diagram for clSoundUI:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 clSoundUI (int *, char ***)
 ~clSoundUI ()
int Exec ()
gboolean OnDeleteEvent (GtkWidget *gwSender, GdkEvent *geEvent, gpointer gpData)
void OnClickedEvent (GtkButton *, gpointer)
gint OnTimeoutEvent (gpointer)
void OnToggledEvent (GtkToggleButton *, gpointer)
void OnValueChangedEvent (GtkAdjustment *, gpointer)
void OnApplyCurveClicked (GtkButton *, gpointer)
void OnMotionCurve (GtkWidget *, GdkEventMotion *, gpointer)
void * SoundOutThread (void *vpData)
void * SoundInThread (void *vpData)

Private Member Functions

void GetCfg ()
void BuildGUI ()
void ConnectSignals ()
bool ParseServerStr (char *, int *, const char *)

Private Attributes

bool bALSA
bool bFirstTimeout
int iVuTimeout
int iALSACard
int iALSADevice
int iALSASubDevice
int iDeviceBase
int iDCBlock
char cpDevice [_POSIX_PATH_MAX]
pthread_t ptidSoundOut
pthread_t ptidSoundIn [SUI_MAX_CHANNELS]
volatile bool bRun
volatile int iChCount
volatile int iSampleRate
volatile int iOctaveCount
volatile long lDataRefCount
volatile long lSampleCount
volatile bool bpConnected [SUI_MAX_CHANNELS]
volatile bool bpEqEnabled [SUI_MAX_CHANNELS]
volatile int ipSockH [SUI_MAX_CHANNELS]
GDT fpLevelCoeff [SUI_MAX_CHANNELS]
clDSPAlloc ChData [SUI_MAX_CHANNELS]
clDSPAlloc EqCoeffs [SUI_MAX_CHANNELS]
guint guiStatusbarCtxt
gfloat fpInputLevel [SUI_MAX_CHANNELS]
gfloat fpOutputLevel [SUI_MAX_CHANNELS]
GtkWidget * gwWindow
GtkWidget * gwVBox
GtkWidget * gwHBox
GtkWidget * gwStatusbar
clAudio Audio
clAudioA2 AudioA
clCfgFile Cfg
clCondition CondData [SUI_MAX_CHANNELS]
clFilter Filters [SUI_MAX_CHANNELS]
clGtkUtils GtkUtils
clMutex MutexData
clMutex MutexLevel
clMutex MutexChData [SUI_MAX_CHANNELS]
clMutex MutexFilter [SUI_MAX_CHANNELS]
clSemaphore SemStart1
clSemaphore SemStart2
clSockClie SClient
clSoundChGUISoundChGUI [SUI_MAX_CHANNELS]

Detailed Description

Sound user interface.

Definition at line 122 of file SoundUI.hh.


Constructor & Destructor Documentation

clSoundUI::clSoundUI int *  ,
char *** 
 

Definition at line 289 of file SoundUI.cc.

References bFirstTimeout, bpConnected, bRun, cpWindowTxt, lDataRefCount, SUI_MAX_CHANNELS, SUI_VER_MAJ, SUI_VER_MIN, and SUI_VER_PL.

clSoundUI::~clSoundUI  ) 
 

Definition at line 311 of file SoundUI.cc.


Member Function Documentation

void clSoundUI::GetCfg  )  [private]
 

Definition at line 131 of file SoundUI.cc.

References bALSA, Cfg, cpDevice, clCfgFile::GetInt(), clCfgFile::GetStr(), iALSACard, iALSADevice, iALSASubDevice, iChCount, iDCBlock, iDeviceBase, iSampleRate, iVuTimeout, lSampleCount, clCfgFile::SetFileName(), SUI_CFGFILE, SUI_DEF_CHANNELS, SUI_DEF_DEVICE, SUI_DEF_SAMPLERATE, SUI_SAMPLECOUNT, and SUI_VU_TIMEOUT.

Referenced by Exec().

void clSoundUI::BuildGUI  )  [private]
 

Definition at line 173 of file SoundUI.cc.

References ConnectSignals(), cpWindowTxt, guiStatusbarCtxt, gwHBox, gwStatusbar, gwVBox, gwWindow, iChCount, iOctaveCount, lSampleCount, MutexData, SoundChGUI, and SUI_PADDING.

Referenced by Exec().

void clSoundUI::ConnectSignals  )  [private]
 

Definition at line 222 of file SoundUI.cc.

References gwWindow, iChCount, iOctaveCount, MutexData, SoundChGUI, WrapOnApplyCurveClicked(), WrapOnClickedEvent(), WrapOnDeleteEvent(), WrapOnMotionCurve(), WrapOnToggledEvent(), and WrapOnValueChangedEvent().

Referenced by BuildGUI().

bool clSoundUI::ParseServerStr char *  ,
int *  ,
const char * 
[private]
 

Definition at line 266 of file SoundUI.cc.

References SUI_SERV_MAXLEN.

Referenced by OnClickedEvent().

int clSoundUI::Exec  ) 
 

Definition at line 316 of file SoundUI.cc.

References bpConnected, bpEqEnabled, BuildGUI(), ChData, CondData, EqCoeffs, Filters, fpLevelCoeff, GDT, GetCfg(), iChCount, iDeviceBase, iOctaveCount, iSampleRate, iVuTimeout, lSampleCount, MutexData, ptidSoundIn, ptidSoundOut, SemStart1, SemStart2, SUI_EQ_MAXOCTS, SUI_FILTER_WINDOW, WrapOnTimeoutEvent(), and WrapSoundOutThread().

Referenced by main().

gboolean clSoundUI::OnDeleteEvent GtkWidget *  gwSender,
GdkEvent *  geEvent,
gpointer  gpData
 

Definition at line 370 of file SoundUI.cc.

References bRun, and MutexData.

Referenced by WrapOnDeleteEvent().

void clSoundUI::OnClickedEvent GtkButton *  ,
gpointer 
 

Definition at line 381 of file SoundUI.cc.

References bpConnected, clSockClie::Connect(), ipSockH, MutexData, ParseServerStr(), ptidSoundIn, SClient, SoundChGUI, SUI_SERV_MAXLEN, and WrapSoundInThread().

Referenced by WrapOnClickedEvent().

gint clSoundUI::OnTimeoutEvent gpointer   ) 
 

Definition at line 431 of file SoundUI.cc.

References bFirstTimeout, fpInputLevel, fpOutputLevel, iChCount, MutexData, MutexLevel, and SoundChGUI.

Referenced by WrapOnTimeoutEvent().

void clSoundUI::OnToggledEvent GtkToggleButton *  ,
gpointer 
 

Definition at line 465 of file SoundUI.cc.

References bpEqEnabled, and MutexFilter.

Referenced by WrapOnToggledEvent().

void clSoundUI::OnValueChangedEvent GtkAdjustment *  ,
gpointer 
 

Definition at line 479 of file SoundUI.cc.

References EqCoeffs, Filters, fpLevelCoeff, GDT, iDCBlock, iSampleRate, lSampleCount, MutexData, MutexFilter, and SoundChGUI.

Referenced by WrapOnValueChangedEvent().

void clSoundUI::OnApplyCurveClicked GtkButton *  ,
gpointer 
 

Definition at line 568 of file SoundUI.cc.

References EqCoeffs, Filters, GDT, iDCBlock, lSampleCount, MutexData, MutexFilter, and SoundChGUI.

Referenced by WrapOnApplyCurveClicked().

void clSoundUI::OnMotionCurve GtkWidget *  ,
GdkEventMotion *  ,
gpointer 
 

Definition at line 598 of file SoundUI.cc.

References guiStatusbarCtxt, clSoundChGUI::gwCurveEq, gwStatusbar, iSampleRate, lSampleCount, MutexData, SoundChGUI, SUI_CONV_LEN, and SUI_EQ_RANGE.

Referenced by WrapOnMotionCurve().

void * clSoundUI::SoundOutThread void *  vpData  ) 
 

Definition at line 627 of file SoundUI.cc.

References Audio, AUDIO_WRITE, AudioA, bALSA, bRun, ChData, clAudio::Close(), CondData, cpDevice, GDT, clAudio::GetError(), iALSACard, iALSADevice, iALSASubDevice, iChCount, iSampleRate, lDataRefCount, lSampleCount, MutexChData, MutexData, clAudio::Open(), ptidSoundOut, clAudio::Reset(), SemStart1, SemStart2, SUI_SND_BITS, SUI_SND_DATATYPE, SUI_SND_FORMAT, SUI_SND_QUEUESIZE, and clAudio::Write().

Referenced by WrapSoundOutThread().

void * clSoundUI::SoundInThread void *  vpData  ) 
 

Definition at line 861 of file SoundUI.cc.

References Audio, AUDIO_WRITE, bpConnected, bpEqEnabled, ChData, clAudio::Close(), clSockOp::Close(), CondData, cpDevice, _stSoundStart::dSampleRate, Filters, fpInputLevel, fpLevelCoeff, fpOutputLevel, GDT, clSoundMsg::GetData(), clSockOp::GetErrno(), clAudio::GetOutBufInfo(), clSoundMsg::GetStart(), GLOBAL_HEADER_LEN, _stSoundStart::iChannels, iChCount, iDeviceBase, ipSockH, lDataRefCount, lSampleCount, MutexChData, MutexData, MutexFilter, MutexLevel, clAudio::Open(), ptidSoundOut, clSockOp::ReadN(), clSockOp::ReadSelect(), clAudio::Reset(), clSockOp::SetHandle(), clSockOp::SetRecvBufSize(), SOp, SUI_FIRST_TIMEOUT, SUI_IN_TIMEOUT, SUI_SND_DATATYPE, SUI_SND_FORMAT, and clAudio::Write().

Referenced by WrapSoundInThread().


Member Data Documentation

bool clSoundUI::bALSA [private]
 

Definition at line 124 of file SoundUI.hh.

Referenced by GetCfg(), and SoundOutThread().

bool clSoundUI::bFirstTimeout [private]
 

Definition at line 125 of file SoundUI.hh.

Referenced by clSoundUI(), and OnTimeoutEvent().

int clSoundUI::iVuTimeout [private]
 

Definition at line 126 of file SoundUI.hh.

Referenced by Exec(), and GetCfg().

int clSoundUI::iALSACard [private]
 

Definition at line 128 of file SoundUI.hh.

Referenced by GetCfg(), and SoundOutThread().

int clSoundUI::iALSADevice [private]
 

Definition at line 129 of file SoundUI.hh.

Referenced by GetCfg(), and SoundOutThread().

int clSoundUI::iALSASubDevice [private]
 

Definition at line 130 of file SoundUI.hh.

Referenced by GetCfg(), and SoundOutThread().

int clSoundUI::iDeviceBase [private]
 

Definition at line 131 of file SoundUI.hh.

Referenced by Exec(), GetCfg(), and SoundInThread().

int clSoundUI::iDCBlock [private]
 

Definition at line 132 of file SoundUI.hh.

Referenced by GetCfg(), OnApplyCurveClicked(), and OnValueChangedEvent().

char clSoundUI::cpDevice[_POSIX_PATH_MAX] [private]
 

Definition at line 133 of file SoundUI.hh.

Referenced by GetCfg(), SoundInThread(), and SoundOutThread().

pthread_t clSoundUI::ptidSoundOut [private]
 

Definition at line 135 of file SoundUI.hh.

Referenced by Exec(), SoundInThread(), and SoundOutThread().

pthread_t clSoundUI::ptidSoundIn[SUI_MAX_CHANNELS] [private]
 

Definition at line 136 of file SoundUI.hh.

Referenced by Exec(), and OnClickedEvent().

volatile bool clSoundUI::bRun [private]
 

Definition at line 138 of file SoundUI.hh.

Referenced by clSoundUI(), OnDeleteEvent(), and SoundOutThread().

volatile int clSoundUI::iChCount [private]
 

Definition at line 139 of file SoundUI.hh.

Referenced by BuildGUI(), ConnectSignals(), Exec(), GetCfg(), OnTimeoutEvent(), SoundInThread(), and SoundOutThread().

volatile int clSoundUI::iSampleRate [private]
 

Definition at line 140 of file SoundUI.hh.

Referenced by Exec(), GetCfg(), OnMotionCurve(), OnValueChangedEvent(), and SoundOutThread().

volatile int clSoundUI::iOctaveCount [private]
 

Definition at line 141 of file SoundUI.hh.

Referenced by BuildGUI(), ConnectSignals(), and Exec().

volatile long clSoundUI::lDataRefCount [private]
 

Definition at line 142 of file SoundUI.hh.

Referenced by clSoundUI(), SoundInThread(), and SoundOutThread().

volatile long clSoundUI::lSampleCount [private]
 

Definition at line 143 of file SoundUI.hh.

Referenced by BuildGUI(), Exec(), GetCfg(), OnApplyCurveClicked(), OnMotionCurve(), OnValueChangedEvent(), SoundInThread(), and SoundOutThread().

volatile bool clSoundUI::bpConnected[SUI_MAX_CHANNELS] [private]
 

Definition at line 144 of file SoundUI.hh.

Referenced by clSoundUI(), Exec(), OnClickedEvent(), and SoundInThread().

volatile bool clSoundUI::bpEqEnabled[SUI_MAX_CHANNELS] [private]
 

Definition at line 145 of file SoundUI.hh.

Referenced by Exec(), OnToggledEvent(), and SoundInThread().

volatile int clSoundUI::ipSockH[SUI_MAX_CHANNELS] [private]
 

Definition at line 146 of file SoundUI.hh.

Referenced by OnClickedEvent(), and SoundInThread().

GDT clSoundUI::fpLevelCoeff[SUI_MAX_CHANNELS] [private]
 

Definition at line 147 of file SoundUI.hh.

Referenced by Exec(), OnValueChangedEvent(), and SoundInThread().

clDSPAlloc clSoundUI::ChData[SUI_MAX_CHANNELS] [private]
 

Definition at line 148 of file SoundUI.hh.

Referenced by Exec(), SoundInThread(), and SoundOutThread().

clDSPAlloc clSoundUI::EqCoeffs[SUI_MAX_CHANNELS] [private]
 

Definition at line 149 of file SoundUI.hh.

Referenced by Exec(), OnApplyCurveClicked(), and OnValueChangedEvent().

guint clSoundUI::guiStatusbarCtxt [private]
 

Definition at line 151 of file SoundUI.hh.

Referenced by BuildGUI(), and OnMotionCurve().

gfloat clSoundUI::fpInputLevel[SUI_MAX_CHANNELS] [private]
 

Definition at line 152 of file SoundUI.hh.

Referenced by OnTimeoutEvent(), and SoundInThread().

gfloat clSoundUI::fpOutputLevel[SUI_MAX_CHANNELS] [private]
 

Definition at line 153 of file SoundUI.hh.

Referenced by OnTimeoutEvent(), and SoundInThread().

GtkWidget* clSoundUI::gwWindow [private]
 

Definition at line 155 of file SoundUI.hh.

Referenced by BuildGUI(), and ConnectSignals().

GtkWidget* clSoundUI::gwVBox [private]
 

Definition at line 156 of file SoundUI.hh.

Referenced by BuildGUI().

GtkWidget* clSoundUI::gwHBox [private]
 

Definition at line 157 of file SoundUI.hh.

Referenced by BuildGUI().

GtkWidget* clSoundUI::gwStatusbar [private]
 

Definition at line 158 of file SoundUI.hh.

Referenced by BuildGUI(), and OnMotionCurve().

clAudio clSoundUI::Audio [private]
 

Definition at line 161 of file SoundUI.hh.

Referenced by SoundInThread(), and SoundOutThread().

clAudioA2 clSoundUI::AudioA [private]
 

Definition at line 167 of file SoundUI.hh.

Referenced by SoundOutThread().

clCfgFile clSoundUI::Cfg [private]
 

Definition at line 170 of file SoundUI.hh.

Referenced by GetCfg().

clCondition clSoundUI::CondData[SUI_MAX_CHANNELS] [private]
 

Definition at line 171 of file SoundUI.hh.

Referenced by Exec(), SoundInThread(), and SoundOutThread().

clFilter clSoundUI::Filters[SUI_MAX_CHANNELS] [private]
 

Definition at line 172 of file SoundUI.hh.

Referenced by Exec(), OnApplyCurveClicked(), OnValueChangedEvent(), and SoundInThread().

clGtkUtils clSoundUI::GtkUtils [private]
 

Definition at line 173 of file SoundUI.hh.

clMutex clSoundUI::MutexData [private]
 

Definition at line 174 of file SoundUI.hh.

Referenced by BuildGUI(), ConnectSignals(), Exec(), OnApplyCurveClicked(), OnClickedEvent(), OnDeleteEvent(), OnMotionCurve(), OnTimeoutEvent(), OnValueChangedEvent(), SoundInThread(), and SoundOutThread().

clMutex clSoundUI::MutexLevel [private]
 

Definition at line 175 of file SoundUI.hh.

Referenced by OnTimeoutEvent(), and SoundInThread().

clMutex clSoundUI::MutexChData[SUI_MAX_CHANNELS] [private]
 

Definition at line 176 of file SoundUI.hh.

Referenced by SoundInThread(), and SoundOutThread().

clMutex clSoundUI::MutexFilter[SUI_MAX_CHANNELS] [private]
 

Definition at line 177 of file SoundUI.hh.

Referenced by OnApplyCurveClicked(), OnToggledEvent(), OnValueChangedEvent(), and SoundInThread().

clSemaphore clSoundUI::SemStart1 [private]
 

Definition at line 178 of file SoundUI.hh.

Referenced by Exec(), and SoundOutThread().

clSemaphore clSoundUI::SemStart2 [private]
 

Definition at line 179 of file SoundUI.hh.

Referenced by Exec(), and SoundOutThread().

clSockClie clSoundUI::SClient [private]
 

Definition at line 180 of file SoundUI.hh.

Referenced by OnClickedEvent().

clSoundChGUI* clSoundUI::SoundChGUI[SUI_MAX_CHANNELS] [private]
 

Definition at line 181 of file SoundUI.hh.

Referenced by BuildGUI(), ConnectSignals(), OnApplyCurveClicked(), OnClickedEvent(), OnMotionCurve(), OnTimeoutEvent(), and OnValueChangedEvent().


The documentation for this class was generated from the following files:
Generated on Sun Oct 26 19:12:24 2003 for HASAS by doxygen 1.3.3