HulaLoop
Simple cross-platform audio loopback and recording.
Classes | Namespaces | Macros
HulaAudioError.h File Reference

<hlaudio/internal/HulaAudioError.h>This file is automatically included via hlaudio.h More...

#include <cstdio>
#include <iostream>
#include "HulaVersion.h"
Include dependency graph for HulaAudioError.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  hula::AudioException
 Exception class for the control module and higher. More...
 

Namespaces

 hula
 Wrapper around translation functions for Qt.
 

Macros

#define HL_PRINT_PREFIX   "[HulaLoop] "
 Prefix printed before every console message to stdout.
 
#define HL_ERROR_PREFIX   "[HulaLoop] "
 Prefix printed before every console message to stderr.
 
#define hlDebug()
 Debug macro that prefixes each debug statement with the HulaLoop prefix. More...
 
#define hlDebugf(...)
 Debug macro that prefixes each debug statement with the HulaLoop prefix. More...
 
#define HL_OS_INIT_CODE   -1
 
#define HL_OS_INIT_MSG   "Could not initialize OS audio module!"
 
#define HL_PA_INIT_CODE   -2
 
#define HL_PA_INIT_MSG   "Could not initialize Port Audio!"
 
#define HL_PA_GET_DEVICES_CODE   -3
 
#define HL_PA_GET_DEVICES_MSG   "Could not fetch Port Audio devices!"
 
#define HL_PA_OPEN_STREAM_CODE   -4
 
#define HL_PA_OPEN_STREAM_MSG   "Could not open Port Audio device stream!"
 
#define HL_PA_CLOSE_STREAM_CODE   -5
 
#define HL_PA_CLOSE_STREAM_MSG   "Could not close Port Audio device stream!"
 
#define HL_DEVICE_NOT_FOUND_CODE   -6
 
#define HL_DEVICE_NOT_FOUND_MSG   "Device not found!"
 
#define HL_CHECK_PARAMS_CODE   -7
 
#define HL_CHECK_PARAMS_MSG   "The specified sample rate or format is invalid!"
 
#define HL_PA_DEVICE_READ_STREAM_CODE   -8
 
#define HL_PA_DEVICE_READ_STREAM_MSG   "Error during read from device stream!"
 
#define HL_OSX_DAEMON_INIT_CODE   -9
 
#define HL_OSX_DAEMON_INIT_MSG   "Could not start hulaloop-osx-daemon process!"
 
#define HL_OSX_DAEMON_CRASH_CODE   -10
 
#define HL_OSX_DAEMON_CRASH_MSG   "The hulaloop-osx-daemon process crashed!"
 
#define HL_OSX_PGREP_CODE   -11
 
#define HL_OSX_PGREP_MSG   "Could not start pgrep process!"
 
#define HL_OSX_EXEPATH_CODE   -12
 
#define HL_OSX_EXEPATH_MSG   "Could not retrieve path to current executable!"
 
#define HL_OSX_EXEPATH_TRIM_CODE   -13
 
#define HL_OSX_EXEPATH_TRIM_MSG   "Could not trim executable name from install path!"
 
#define HL_LINUX_OPEN_DEVICE_CODE   -14
 
#define HL_LINUX_OPEN_DEVICE_MSG   "Could not open ALSA audio device!"
 
#define HL_LINUX_ALSA_CLOSE_STREAM_CODE   -15
 
#define HL_LINUX_ALSA_CLOSE_STREAM_MSG   "Could not close ALSA device stream!"
 
#define HL_LINUX_SET_PARAMS_CODE   -16
 
#define HL_LINUX_SET_PARAMS_MSG   "Could not set ALSA device params!"
 
#define HL_WIN_GET_DEVICES_CODE   -17
 
#define HL_WIN_GET_DEVICES_MSG   "Could not fetch WASAPI audio devices!"
 
#define HL_WIN_OPEN_STREAM_CODE   -18
 
#define HL_WIN_OPEN_STREAM_MSG   "Could not open WASAPI device stream!"
 
#define HL_RB_ALLOC_BUFFER_CODE   -19
 
#define HL_RB_ALLOC_BUFFER_MSG   "Could not allocate ring buffer!"
 
#define HL_RB_INIT_BUFFER_CODE   -20
 
#define HL_RB_INIT_BUFFER_MSG   "Could not initialize ring buffer! Perhaps the size is not power of 2?"
 

Detailed Description

<hlaudio/internal/HulaAudioError.h>

This file is automatically included via hlaudio.h

This is the base file for all error handling in the application. Since any module higher than this must include this file, you'll find any global error information here.

The exceptions defined in this file are those related to the audio module. Higher level modules have their own error file which defines additional exceptions.

Macro Definition Documentation

◆ hlDebug

#define hlDebug ( )
Value:
if (HL_NO_DEBUG_OUTPUT) {} \
else std::cerr << HL_PRINT_PREFIX
#define HL_PRINT_PREFIX
Prefix printed before every console message to stdout.
Definition: HulaAudioError.h:34

Debug macro that prefixes each debug statement with the HulaLoop prefix.

◆ hlDebugf

#define hlDebugf (   ...)
Value:
if (HL_NO_DEBUG_OUTPUT) {} \
else fprintf(stderr, HL_PRINT_PREFIX __VA_ARGS__);
#define HL_PRINT_PREFIX
Prefix printed before every console message to stdout.
Definition: HulaAudioError.h:34

Debug macro that prefixes each debug statement with the HulaLoop prefix.