audioDeviceAboutToStart() callback is not called in Ubuntu 20.04 on AWS

Hi

I have a console application which uses JUCE audio on Ubuntu 20.04. The application runs fine on Ubuntu installed in an ESXi instance or on a physical machine, but on an AWS instance the above callback is not called anymore and the application is not working.

I have tried to install all Linux dependences mentioned here: JUCE/Linux Dependencies.md at master · juce-framework/JUCE · GitHub, but still the application is not working. Am I missing some external dependency when running JUCE for audio ?

thank you
Bogdan

Hi,

Perhaps there is no any audio device?

The application does not use any sound device, it is only used to mix some audio channels.

As @KottVV points out, this callback is comes from an audio device (as the name of the function indicates), so without one it will not happen. How were you expecting it to work?

I have just started to use JUCE framework. Ubuntu 20.04 is listed among supported OSs and this problem occurs only on an AWS instance. Is there an work around for this problem ?

Does this VM has alsa installed?
aplay -L

yes, I have installed all recommended dependencies for Linux in order to make sure I didn’t missed anything

so, what is aplay -L output?

aplay -L
default
Playback/recording through the PulseAudio sound server
null
Discard all samples (playback) or generate zero samples (capture)
samplerate
Rate Converter Plugin Using Samplerate Library
speexrate
Rate Converter Plugin Using Speex Resampler
jack
JACK Audio Connection Kit
oss
Open Sound System
pulse
PulseAudio Sound Server
upmix
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
sysdefault:CARD=Dummy
Dummy, Dummy PCM
Default Audio Device
dmix:CARD=Dummy,DEV=0
Dummy, Dummy PCM
Direct sample mixing device
dsnoop:CARD=Dummy,DEV=0
Dummy, Dummy PCM
Direct sample snooping device
hw:CARD=Dummy,DEV=0
Dummy, Dummy PCM
Direct hardware device without any conversions
plughw:CARD=Dummy,DEV=0
Dummy, Dummy PCM
Hardware device with all software conversions
usbstream:CARD=Dummy
Dummy
USB Stream Output

I have been able to solve the above issue using:

sudo apt install linux-modules-extra-`uname -r`

Now the above callback is called and the selected in/out audio device is:

Playback/recording through the PulseAudio sound server

but the audio quality is not good. This seems to be a problem seen previously:

but there is no satisfactory solution for it. Are there other sound servers that can provide better audio quality ?

JACK (instead of ALSA) with jack dummy device?

Doesn’t seem to be detected. What dependences need to install and run the JACK server ?