patch-src_mixer_c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. $OpenBSD: patch-src_mixer_c,v 1.2 2007/10/14 14:12:42 jasper Exp $
  2. --- src/mixer.c.orig Tue Sep 10 16:16:26 2002
  3. +++ src/mixer.c Sun Oct 14 15:47:27 2007
  4. @@ -285,7 +285,11 @@ void mixer_init(gint init_device_id)
  5. mixer_device = getenv("MIXERDEVICE");
  6. if (mixer_device == NULL)
  7. +#ifdef __OpenBSD__
  8. + mixer_device = "/dev/mixer";
  9. +#else
  10. mixer_device = "/dev/mixer0";
  11. +#endif
  12. if ((fd = open(mixer_device, O_RDWR)) == -1) {
  13. perror(mixer_device);
  14. @@ -362,7 +366,11 @@ static void mixer_set_vol(DeviceData *device, gint vol
  15. mixer_device = getenv("MIXERDEVICE");
  16. if (mixer_device == NULL)
  17. +#ifdef __OpenBSD__
  18. + mixer_device = "/dev/mixer";
  19. +#else
  20. mixer_device = "/dev/mixer0";
  21. +#endif
  22. if ((fd = open(mixer_device, O_RDWR)) == -1) {
  23. perror(mixer_device);
  24. @@ -406,7 +414,11 @@ static gint mixer_get_vol(DeviceData *device)
  25. mixer_device = getenv("MIXERDEVICE");
  26. if (mixer_device == NULL)
  27. +#ifdef __OpenBSD__
  28. + mixer_device = "/dev/mixer";
  29. +#else
  30. mixer_device = "/dev/mixer0";
  31. +#endif
  32. if ((fd = open(mixer_device, O_RDWR)) == -1) {
  33. perror(mixer_device);