kwave
18.07.70
|
#include "config.h"
#include <errno.h>
#include <signal.h>
#include <unistd.h>
#include <limits>
#include <pulse/thread-mainloop.h>
#include <QApplication>
#include <QCursor>
#include <QFileInfo>
#include <QLatin1Char>
#include <QLocale>
#include <QString>
#include <QVariant>
#include <QtGlobal>
#include <KLocalizedString>
#include <KUser>
#include "libkwave/Compression.h"
#include "libkwave/SampleFormat.h"
#include "libkwave/String.h"
#include "libkwave/Utils.h"
#include "libkwave/memcpy.h"
#include "Record-PulseAudio.h"
Go to the source code of this file.
Macros | |
#define | ELEMENTS_OF(__array__) (sizeof(__array__) / sizeof(__array__[0])) |
#define | TIMEOUT_WAIT_DEVICE_SCAN 10000 |
#define | TIMEOUT_CONNECT_TO_SERVER 20000 |
#define | TIMEOUT_CONNECT_RECORD 10000 |
#define | TIMEOUT_DISCONNECT_STREAM 10000 |
#define | DBG_CASE(x) case x: qDebug("RecordPulseAudio -> " #x ); break |
#define | DBG_CASE(x) case x: qDebug("RecordPulseAudio -> " #x ); break |
Functions | |
static Kwave::SampleFormat::Format | sample_format_of (pa_sample_format_t fmt) |
static Kwave::byte_order_t | endian_of (pa_sample_format_t fmt) |
static Kwave::Compression::Type | compression_of (pa_sample_format_t fmt) |
static int | bits_of (pa_sample_format_t fmt) |
static int | poll_func (struct pollfd *ufds, unsigned long nfds, int timeout, void *userdata) |
Variables | |
static const pa_sample_format_t | _known_formats [] |
#define DBG_CASE | ( | x | ) | case x: qDebug("RecordPulseAudio -> " #x ); break |
Referenced by Kwave::RecordPulseAudio::notifyContext(), and Kwave::RecordPulseAudio::notifyStreamState().
#define DBG_CASE | ( | x | ) | case x: qDebug("RecordPulseAudio -> " #x ); break |
#define ELEMENTS_OF | ( | __array__ | ) | (sizeof(__array__) / sizeof(__array__[0])) |
helper macro: returns the number of elements in an array
Definition at line 50 of file Record-PulseAudio.cpp.
Referenced by Kwave::RecordPulseAudio::detectSampleRates(), and Kwave::RecordPulseAudio::detectSupportedFormats().
#define TIMEOUT_CONNECT_RECORD 10000 |
timeout to wait for record [ms]
Definition at line 68 of file Record-PulseAudio.cpp.
Referenced by Kwave::RecordPulseAudio::initialize().
#define TIMEOUT_CONNECT_TO_SERVER 20000 |
timeout to wait for the connection to the server [ms]
Definition at line 62 of file Record-PulseAudio.cpp.
Referenced by Kwave::RecordPulseAudio::connectToServer().
#define TIMEOUT_DISCONNECT_STREAM 10000 |
timeout to wait for disconnecting the recording stream [ms]
Definition at line 74 of file Record-PulseAudio.cpp.
Referenced by Kwave::RecordPulseAudio::close().
#define TIMEOUT_WAIT_DEVICE_SCAN 10000 |
timeout for the device scan [ms]
Definition at line 56 of file Record-PulseAudio.cpp.
Referenced by Kwave::RecordPulseAudio::scanDevices().
|
static |
Definition at line 166 of file Record-PulseAudio.cpp.
Referenced by Kwave::RecordPulseAudio::detectSampleFormats(), Kwave::RecordPulseAudio::detectSupportedFormats(), Kwave::RecordPulseAudio::mode2format(), and Kwave::RecordPulseAudio::supportedBits().
|
static |
Definition at line 148 of file Record-PulseAudio.cpp.
References Kwave::Compression::G711_ALAW, Kwave::Compression::G711_ULAW, and Kwave::Compression::NONE.
Referenced by Kwave::RecordPulseAudio::detectCompressions(), Kwave::RecordPulseAudio::detectSampleFormats(), Kwave::RecordPulseAudio::detectSupportedFormats(), Kwave::RecordPulseAudio::mode2format(), and Kwave::RecordPulseAudio::supportedBits().
|
static |
find out the endianness of an PulseAudio format
Definition at line 138 of file Record-PulseAudio.cpp.
References Kwave::BigEndian, Kwave::CpuEndian, and Kwave::LittleEndian.
Referenced by Kwave::RecordPulseAudio::detectSupportedFormats(), and Kwave::RecordPulseAudio::endianness().
|
static |
Definition at line 862 of file Record-PulseAudio.cpp.
References Kwave::RecordPulseAudio::mainloopPoll().
Referenced by Kwave::RecordPulseAudio::connectToServer().
|
static |
find out the SampleFormat of an PulseAudio format
Definition at line 118 of file Record-PulseAudio.cpp.
References Kwave::SampleFormat::Float, Kwave::SampleFormat::Signed, Kwave::SampleFormat::Unknown, and Kwave::SampleFormat::Unsigned.
Referenced by Kwave::RecordPulseAudio::detectSampleFormats(), Kwave::RecordPulseAudio::detectSupportedFormats(), and Kwave::RecordPulseAudio::mode2format().
|
static |
Global list of all known sample formats.
The sort order should be:
Definition at line 89 of file Record-PulseAudio.cpp.
Referenced by Kwave::RecordPulseAudio::detectSupportedFormats().