SoundRecorder

Abstract base class for capturing sound data.

Constructors

this
this()

Default constructor.

Destructor

~this
~this()

Destructor.

Members

Functions

getDevice
string getDevice()

Get the name of the current audio capture device.

onProcessSamples
bool onProcessSamples(const(short)[] samples)

Process a new chunk of recorded samples.

onStart
bool onStart()

Start capturing audio data.

onStop
void onStop()

Stop capturing audio data.

setDevice
bool setDevice(const(char)[] name)

Set the audio capture device.

setProcessingInterval
void setProcessingInterval(Duration interval)

Set the processing interval.

start
void start(uint theSampleRate = 44100)

Start the capture.

stop
void stop()

Stop the capture.

Properties

sampleRate
uint sampleRate [@property getter]

Get the sample rate in samples per second.

Static functions

getAvailableDevices
const(string)[] getAvailableDevices()

Get a list of the names of all available audio capture devices.

getDefaultDevice
string getDefaultDevice()

Get the name of the default audio capture device.

isAvailable
bool isAvailable()

Check if the system supports audio capture.

Meta