I'm new to audio programming in Ubuntu 20.04 and was looking at open source audio libraries and found OpenAL-Soft. I'm following this tutorial online https://www.youtube.com/watch?v=kWQM1iQ1W0E&ab_channel=Code%2CTech%2CandTutorials
The basic code used is
ALCdevice* p_ALCDevice = alcOpenDevice( nullptr ); //nullptr = gets default device
if( !p_ALCDevice )
throw( "failed to get sound device" );
When I do this it returns
[ALSOFT] (WW) Failed to open playback device: Could not open /dev/dsp: No
such file or directory
[ALSOFT] (WW) Error generated on device (nil), code 0xa004
terminate called after throwing an instance of 'char const*'
Aborted (core dumped)
When using
const ALCchar * devices = alcGetString( NULL, ALC_DEVICE_SPECIFIER );
and
printf( "%s", devices );
it outputs
OpenAL Soft
not even sure what this output means and what it has to do with my audio devices. Anyone know whats going on?
When reinstalling using cmake
- Checking for module 'dbus-1'
-- No package 'dbus-1' found
-- Could NOT find DBus1 (missing: DBus1_INCLUDE_DIRS DBus1_LIBRARIES)
-- Checking for module 'libpipewire-0.3>=0.3.23'
-- No package 'libpipewire-0.3' found
-- Could NOT find AudioIO (missing: AUDIOIO_INCLUDE_DIR)
-- Could NOT find OpenSL (missing: OPENSL_LIBRARY OPENSL_INCLUDE_DIR OPENSL_ANDROID_INCLUDE_DIR)
-- Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
-- Could NOT find MySOFA (missing: MYSOFA_LIBRARY MYSOFA_INCLUDE_DIR)
-- Could NOT find Qt5Widgets
-- Could NOT find SndFile (missing: SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
-- Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
--
-- Building OpenAL with support for the following backends:
-- ALSA, OSS, SndIO (linked), PortAudio, PulseAudio, JACK, WaveFile, Null
--
-- Building with support for CPU extensions:
-- Default, SSE, SSE2, SSE3, SSE4.1
--
-- Embedding HRTF datasets
--
-- Installing library and headers
-- Installing sample configuration
-- Installing HRTF data files
-- Installing AmbDec presets
--
-- Building utility programs
--
-- Building example programs
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/brian/openal-soft/build