Qt 4.8
Classes | Macros | Functions | Variables
qsoundqss_qws.cpp File Reference
#include "qsoundqss_qws.h"
#include <qbytearray.h>
#include <qlist.h>
#include <qsocketnotifier.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qstringlist.h>
#include <qevent.h>
#include <qalgorithms.h>
#include <qtimer.h>
#include <qpointer.h>
#include <qendian.h>
#include <private/qcore_unix_p.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/soundcard.h>
#include <qdebug.h>
#include <qvfbhdr.h>
#include "qsoundqss_qws.moc"

Go to the source code of this file.

Classes

struct  QRiffChunk
 
class  QWSSoundServerBucket
 
class  QWSSoundServerClient
 
class  QWSSoundServerPrivate
 
struct  QWSSoundServerPrivate::CompletedInfo
 
struct  QWSSoundServerPrivate::PresetVolume
 
class  QWSSoundServerProvider
 
class  QWSSoundServerStream
 

Macros

#define QT_QWS_SOUND_16BIT   1
 
#define QT_QWS_SOUND_STEREO   1
 
#define WAVE_FORMAT_PCM   1
 

Functions

static int getNumTok (QString &in)
 
static QString getStringTok (QString &in)
 

Variables

int errno
 
static const int maxVolume = 100
 
int qws_display_id
 
static const int runinLength = 2*sound_buffer_size
 
static bool sound_16bit =QT_QWS_SOUND_16BIT
 
static const int sound_buffer_size = 1 << sound_fragment_size
 
static const int sound_fragment_size = 12
 
static int sound_speed = 44100
 
static int sound_stereo =QT_QWS_SOUND_STEREO
 
static char * zeroMem = 0
 

Macro Definition Documentation

◆ QT_QWS_SOUND_16BIT

#define QT_QWS_SOUND_16BIT   1

Definition at line 76 of file qsoundqss_qws.cpp.

◆ QT_QWS_SOUND_STEREO

#define QT_QWS_SOUND_STEREO   1

Definition at line 77 of file qsoundqss_qws.cpp.

◆ WAVE_FORMAT_PCM

#define WAVE_FORMAT_PCM   1

Function Documentation

◆ getNumTok()

static int getNumTok ( QString in)
static

Definition at line 194 of file qsoundqss_qws.cpp.

Referenced by QWSSoundServerClient::tryReadCommand().

195 {
196  return getStringTok(in).toInt();
197 }
static QString getStringTok(QString &in)
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
Definition: qstring.cpp:6090

◆ getStringTok()

static QString getStringTok ( QString in)
static

Definition at line 180 of file qsoundqss_qws.cpp.

Referenced by getNumTok(), and QWSSoundServerClient::tryReadCommand().

181 {
182  int pos = in.indexOf(QLatin1Char(' '));
183  QString ret;
184  if (pos > 0) {
185  ret = in.left(pos);
186  in = in.mid(pos+1);
187  } else {
188  ret = in;
189  in = QString::null;
190  }
191  return ret;
192 }
The QString class provides a Unicode character string.
Definition: qstring.h:83
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
Definition: qstring.cpp:3664
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:2838
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
Definition: qstring.cpp:3706
static const Null null
Definition: qstring.h:502
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55

Variable Documentation

◆ errno

int errno

◆ maxVolume

const int maxVolume = 100
static

◆ qws_display_id

int qws_display_id

◆ runinLength

const int runinLength = 2*sound_buffer_size
static

Definition at line 279 of file qsoundqss_qws.cpp.

◆ sound_16bit

bool sound_16bit =QT_QWS_SOUND_16BIT
static

◆ sound_buffer_size

const int sound_buffer_size = 1 << sound_fragment_size
static

◆ sound_fragment_size

const int sound_fragment_size = 12
static

Definition at line 97 of file qsoundqss_qws.cpp.

Referenced by QWSSoundServerPrivate::openDevice().

◆ sound_speed

int sound_speed = 44100
static

◆ sound_stereo

int sound_stereo =QT_QWS_SOUND_STEREO
static

◆ zeroMem

char* zeroMem = 0
static

Definition at line 86 of file qsoundqss_qws.cpp.

Referenced by QWSSoundServerPrivate::feedDevice().