mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

  1. **** This patch should be removed when updating to esound >0.2.32
  2. ****
  3. **** patch by �ukasz Mach <lukasz@mach.com.pl>
  4. **** released under the GPL license
  5. ****
  6. **** updates to the new alsa pcm api used since 0.9.0_rc4
  7. **** (http://bugzilla.gnome.org/show_bug.cgi?id=129709)
  8. --- ../esound-0.2.32.orig/audio_alsa09.c Thu Mar 20 09:34:19 2003
  9. +++ ./audio_alsa09.c Sat Dec 20 03:01:11 2003
  10. @@ -136,15 +136,17 @@
  11. alsaerr = -1;
  12. return handle;
  13. }
  14. -
  15. - err = snd_pcm_hw_params_set_rate_near(handle, hwparams, speed, 0);
  16. +
  17. + int t_dir=0;
  18. + int t_speed=speed;
  19. + err = snd_pcm_hw_params_set_rate_near(handle, hwparams, &t_speed, &t_dir);
  20. if (err < 0) {
  21. if (alsadbg)
  22. fprintf(stderr, "%s\n", snd_strerror(err));
  23. alsaerr = -1;
  24. return handle;
  25. }
  26. - if (err != speed) {
  27. + if (t_speed != speed) {
  28. if (alsadbg)
  29. fprintf(stderr, "Rate not avaliable %i != %i\n", speed, err);
  30. alsaerr = -1;
  31. @@ -176,8 +178,9 @@
  32. alsaerr = -1;
  33. return handle;
  34. }
  35. -
  36. - err = snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, BUFFERSIZE);
  37. +
  38. + snd_pcm_uframes_t t_bufsize=BUFFERSIZE;
  39. + err = snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, &t_bufsize);
  40. if (err < 0) {
  41. if (alsadbg)
  42. fprintf(stderr, "Buffersize:%s\n", snd_strerror(err));