All pastes #352033 Raw Edit

puzzled

public text v1 · immutable
·published 2007-02-12 15:15 UTC
rendered paste body
Compilation output of chan_alsa:

gcc -o chan_alsa.o -c chan_alsa.c -pthread -I/home/patrick/redhat/BUILD/asterisk-1.4.0/include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations  -include /home/patrick/redhat/BUILD/asterisk-1.4.0/include/asterisk/autoconfig.h -march=i686 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables  -fPIC -DAST_MODULE=\"chan_alsa\"  
chan_alsa.c: In function 'sound_thread':
chan_alsa.c:331: warning: ignoring return value of 'read', declared with attribute warn_unused_result
chan_alsa.c: In function 'alsa_call':
chan_alsa.c:536: warning: ignoring return value of 'write', declared with attribute warn_unused_result
chan_alsa.c: In function 'answer_sound':
chan_alsa.c:549: warning: ignoring return value of 'write', declared with attribute warn_unused_result
chan_alsa.c: In function 'alsa_hangup':
chan_alsa.c:580: warning: ignoring return value of 'write', declared with attribute warn_unused_result
chan_alsa.c: In function 'alsa_indicate':
chan_alsa.c:772: warning: ignoring return value of 'write', declared with attribute warn_unused_result
gcc  -o chan_alsa.so -pthread  -shared -Xlinker -x chan_alsa.o  -lasound -lm -ldl

$ rpm -qa | grep alsa
alsa-lib-devel-1.0.13-1.fc6.i386
alsa-lib-1.0.13-1.fc6.i386
alsa-utils-1.0.13-1.fc6.i386

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: IXP [ATI IXP], device 0: ATI IXP AC97 [ATI IXP AC97]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Modem [ATI IXP Modem], device 0: ATI IXP MC97 [ATI IXP MC97]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Output from configure --with-asound

checking for snd_spcm_init in -lasound... yes
checking alsa/asoundlib.h usability... yes
checking alsa/asoundlib.h presence... yes
checking for alsa/asoundlib.h... yes

Playing a sound with aplay:
$  aplay /usr/share/system-config-soundcard/sound-sample.wav
Playing WAVE '/usr/share/system-config-soundcard/sound-sample.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo