OpenSDE Packages Database (without history before r20070)
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.

58 lines
1.9 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../esound/esound-alsa-pcm-newapi.patch.disabled
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. **** This patch should be removed when updating to esound >0.2.32
  17. ****
  18. **** patch by �ukasz Mach <lukasz@mach.com.pl>
  19. **** released under the GPL license
  20. ****
  21. **** updates to the new alsa pcm api used since 0.9.0_rc4
  22. **** (http://bugzilla.gnome.org/show_bug.cgi?id=129709)
  23. --- ../esound-0.2.32.orig/audio_alsa09.c Thu Mar 20 09:34:19 2003
  24. +++ ./audio_alsa09.c Sat Dec 20 03:01:11 2003
  25. @@ -136,15 +136,17 @@
  26. alsaerr = -1;
  27. return handle;
  28. }
  29. -
  30. - err = snd_pcm_hw_params_set_rate_near(handle, hwparams, speed, 0);
  31. +
  32. + int t_dir=0;
  33. + int t_speed=speed;
  34. + err = snd_pcm_hw_params_set_rate_near(handle, hwparams, &t_speed, &t_dir);
  35. if (err < 0) {
  36. if (alsadbg)
  37. fprintf(stderr, "%s\n", snd_strerror(err));
  38. alsaerr = -1;
  39. return handle;
  40. }
  41. - if (err != speed) {
  42. + if (t_speed != speed) {
  43. if (alsadbg)
  44. fprintf(stderr, "Rate not avaliable %i != %i\n", speed, err);
  45. alsaerr = -1;
  46. @@ -176,8 +178,9 @@
  47. alsaerr = -1;
  48. return handle;
  49. }
  50. -
  51. - err = snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, BUFFERSIZE);
  52. +
  53. + snd_pcm_uframes_t t_bufsize=BUFFERSIZE;
  54. + err = snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, &t_bufsize);
  55. if (err < 0) {
  56. if (alsadbg)
  57. fprintf(stderr, "Buffersize:%s\n", snd_strerror(err));