Mercurial > pidgin
comparison src/mediastreamer/osscard.c @ 12029:1c771536a032
[gaim-migrate @ 14322]
This _compiles_ for me now. Theres still a bunch of "dereferencing type-punned pointer will break strict-aliasing rules" warning and some redefinition warnings from the various config.h's. The deferencing warnings look like a BE<->LE hack but I left them untouched for the time being.
committer: Tailor Script <tailor@pidgin.im>
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Wed, 09 Nov 2005 09:57:33 +0000 |
parents | e67993da8a22 |
children |
comparison
equal
deleted
inserted
replaced
12028:b0ad08e1d492 | 12029:1c771536a032 |
---|---|
20 | 20 |
21 #include "osscard.h" | 21 #include "osscard.h" |
22 | 22 |
23 #include "msossread.h" | 23 #include "msossread.h" |
24 #include "msosswrite.h" | 24 #include "msosswrite.h" |
25 | |
26 #include <sys/ioctl.h> | |
27 #include <unistd.h> | |
25 | 28 |
26 #ifdef HAVE_SYS_SOUNDCARD_H | 29 #ifdef HAVE_SYS_SOUNDCARD_H |
27 #include <sys/soundcard.h> | 30 #include <sys/soundcard.h> |
28 | 31 |
29 #include <errno.h> | 32 #include <errno.h> |
225 return 0; | 228 return 0; |
226 } | 229 } |
227 | 230 |
228 void oss_card_close(OssCard *obj) | 231 void oss_card_close(OssCard *obj) |
229 { | 232 { |
230 int i; | |
231 obj->ref--; | 233 obj->ref--; |
232 if (obj->ref==0) { | 234 if (obj->ref==0) { |
233 close(obj->fd); | 235 close(obj->fd); |
234 obj->fd=0; | 236 obj->fd=0; |
235 SND_CARD(obj)->flags&=~SND_CARD_FLAGS_OPENED; | 237 SND_CARD(obj)->flags&=~SND_CARD_FLAGS_OPENED; |
340 | 342 |
341 gint oss_card_get_level(OssCard *obj,gint way) | 343 gint oss_card_get_level(OssCard *obj,gint way) |
342 { | 344 { |
343 int p=0,mix_fd; | 345 int p=0,mix_fd; |
344 int osscmd; | 346 int osscmd; |
345 g_return_if_fail(obj->mixdev_name!=NULL); | 347 g_return_val_if_fail(obj->mixdev_name!=NULL, -1); |
346 #ifdef HAVE_SYS_SOUNDCARD_H | 348 #ifdef HAVE_SYS_SOUNDCARD_H |
347 switch(way){ | 349 switch(way){ |
348 case SND_CARD_LEVEL_GENERAL: | 350 case SND_CARD_LEVEL_GENERAL: |
349 osscmd=SOUND_MIXER_VOLUME; | 351 osscmd=SOUND_MIXER_VOLUME; |
350 break; | 352 break; |