|
|
|
|
# --- T2-COPYRIGHT-NOTE-BEGIN ---
|
|
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
|
|
|
#
|
|
|
|
|
# T2 SDE: package/.../esound/esound-alsa-pcm-newapi.patch.disabled
|
|
|
|
|
# Copyright (C) 2004 - 2006 The T2 SDE Project
|
|
|
|
|
#
|
|
|
|
|
# More information can be found in the files COPYING and README.
|
|
|
|
|
#
|
|
|
|
|
# This patch file is dual-licensed. It is available under the license the
|
|
|
|
|
# patched project is licensed under, as long as it is an OpenSource license
|
|
|
|
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
|
|
|
|
# of the GNU General Public License as published by the Free Software
|
|
|
|
|
# Foundation; either version 2 of the License, or (at your option) any later
|
|
|
|
|
# version.
|
|
|
|
|
# --- T2-COPYRIGHT-NOTE-END ---
|
|
|
|
|
**** This patch should be removed when updating to esound >0.2.32
|
|
|
|
|
****
|
|
|
|
|
**** patch by <EFBFBD>ukasz Mach <lukasz@mach.com.pl>
|
|
|
|
|
**** released under the GPL license
|
|
|
|
|
****
|
|
|
|
|
**** updates to the new alsa pcm api used since 0.9.0_rc4
|
|
|
|
|
**** (http://bugzilla.gnome.org/show_bug.cgi?id=129709)
|
|
|
|
|
|
|
|
|
|
--- ../esound-0.2.32.orig/audio_alsa09.c Thu Mar 20 09:34:19 2003
|
|
|
|
|
+++ ./audio_alsa09.c Sat Dec 20 03:01:11 2003
|
|
|
|
|
@@ -136,15 +136,17 @@
|
|
|
|
|
alsaerr = -1;
|
|
|
|
|
return handle;
|
|
|
|
|
}
|
|
|
|
|
-
|
|
|
|
|
- err = snd_pcm_hw_params_set_rate_near(handle, hwparams, speed, 0);
|
|
|
|
|
+
|
|
|
|
|
+ int t_dir=0;
|
|
|
|
|
+ int t_speed=speed;
|
|
|
|
|
+ err = snd_pcm_hw_params_set_rate_near(handle, hwparams, &t_speed, &t_dir);
|
|
|
|
|
if (err < 0) {
|
|
|
|
|
if (alsadbg)
|
|
|
|
|
fprintf(stderr, "%s\n", snd_strerror(err));
|
|
|
|
|
alsaerr = -1;
|
|
|
|
|
return handle;
|
|
|
|
|
}
|
|
|
|
|
- if (err != speed) {
|
|
|
|
|
+ if (t_speed != speed) {
|
|
|
|
|
if (alsadbg)
|
|
|
|
|
fprintf(stderr, "Rate not avaliable %i != %i\n", speed, err);
|
|
|
|
|
alsaerr = -1;
|
|
|
|
|
@@ -176,8 +178,9 @@
|
|
|
|
|
alsaerr = -1;
|
|
|
|
|
return handle;
|
|
|
|
|
}
|
|
|
|
|
-
|
|
|
|
|
- err = snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, BUFFERSIZE);
|
|
|
|
|
+
|
|
|
|
|
+ snd_pcm_uframes_t t_bufsize=BUFFERSIZE;
|
|
|
|
|
+ err = snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, &t_bufsize);
|
|
|
|
|
if (err < 0) {
|
|
|
|
|
if (alsadbg)
|
|
|
|
|
fprintf(stderr, "Buffersize:%s\n", snd_strerror(err));
|