Compilation maybe broken in ALSA (juce_linux_ALSA.cpp)


#1

Hi,

Today i've update JUCE > 4.02 on my linux distro :

> Linux 3.2.0-75-generic i686 Ubuntu
> GCC 4.8.4
> Codeblocks 13.12

This is the codeblocks build log :

||=== Build: Debug in JSpice (compiler: GNU GCC Compiler) ===|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp|818|warning: variable ‘signMask’ set but not used [-Wunused-but-set-variable]|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp|831|warning: variable ‘signMask’ set but not used [-Wunused-but-set-variable]|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_devices/native/juce_linux_ALSA.cpp||In member function ‘void juce::{anonymous}::ALSAThread::waitForDevice(snd_pcm_t)’:|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_devices/native/juce_linux_ALSA.cpp|649|error: ‘handle’ has incomplete type|
/usr/include/alsa/pcm.h|341|error: forward declaration of ‘snd_pcm_t {aka struct _snd_pcm}’|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_devices/native/juce_linux_ALSA.cpp||In member function ‘virtual void juce::{anonymous}::ALSAThread::run()’:|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_devices/native/juce_linux_ALSA.cpp|670|error: no matching function for call to ‘juce::{anonymous}::ALSAThread::waitForDevice(snd_pcm_t*&)’|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_devices/native/juce_linux_ALSA.cpp|670|note: candidate is:|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_devices/native/juce_linux_ALSA.cpp|649|note: void juce::{anonymous}::ALSAThread::waitForDevice(snd_pcm_t)|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_devices/native/juce_linux_ALSA.cpp|649|note:   no known conversion for argument 1 from ‘snd_pcm_t* {aka _snd_pcm*}’ to ‘snd_pcm_t {aka _snd_pcm}’|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_devices/native/juce_linux_ALSA.cpp|716|error: no matching function for call to ‘juce::{anonymous}::ALSAThread::waitForDevice(snd_pcm_t*&)’|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_devices/native/juce_linux_ALSA.cpp|716|note: candidate is:|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_devices/native/juce_linux_ALSA.cpp|649|note: void juce::{anonymous}::ALSAThread::waitForDevice(snd_pcm_t)|
/home/maxprod/Documents/Libraries/JUCE4/modules/juce_audio_devices/native/juce_linux_ALSA.cpp|649|note:   no known conversion for argument 1 from ‘snd_pcm_t* {aka _snd_pcm*}’ to ‘snd_pcm_t {aka _snd_pcm}’|
||=== Build failed: 4 error(s), 2 warning(s) (0 minute(s), 25 second(s)) ===|

When I change the line 649 from

void waitForDevice (snd_pcm_t handle)

to

void waitForDevice (snd_pcm_t* handle)

The compiler build is fine.

Don't know if is my distro or not. Let me know if I doing something wrong.

Regards to JUCE team !

Max


#2

Oops, seems like our module updater script failed and the wrong version of that file ended up in the zip file. We've sorted it out now if you want to re-download them.