Switch from old to new PCM API retaining binary compatibility

Changed version to 1.0.0pre1
This commit is contained in:
Jaroslav Kysela 2003-11-05 10:38:37 +00:00
parent 83bfda918e
commit d4af763f8a
10 changed files with 209 additions and 281 deletions

View file

@ -1,6 +1,6 @@
check_PROGRAMS=control pcm latency seq \
playmidi1 timer rawmidi midiloop \
omixer code
omixer code oldapi
control_LDADD=../src/libasound.la
pcm_LDADD=../src/libasound.la
@ -11,6 +11,7 @@ timer_LDADD=../src/libasound.la
rawmidi_LDADD=../src/libasound.la
midiloop_LDADD=../src/libasound.la
omixer_LDADD=../src/libasound.la
oldapi_LDADD=../src/libasound.la
code_CFLAGS=-Wall -pipe -g -O2
INCLUDES=-I$(top_srcdir)/include

View file

@ -33,8 +33,6 @@
#include <sched.h>
#include <errno.h>
#include <getopt.h>
#define ALSA_PCM_NEW_HW_PARAMS_API
#define ALSA_PCM_NEW_SW_PARAMS_API
#include "../include/asoundlib.h"
#include <sys/time.h>
#include <math.h>

42
test/oldapi.c Normal file
View file

@ -0,0 +1,42 @@
/*
* Old PCM API compilation test
*
* Author: Jaroslav Kysela <perex@suse.cz>
*
*
* This program is free software; you can redistribute it and/or modify
* it 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sched.h>
#include <errno.h>
#include <getopt.h>
#define ALSA_PCM_OLD_HW_PARAMS_API
#define ALSA_PCM_OLD_SW_PARAMS_API
#include "../include/asoundlib.h"
#include <sys/time.h>
typedef void (myfcn)(void *);
int main(int argc, char *argv[])
{
myfcn *fcn;
snd_pcm_hw_params_get_access(NULL);
fcn = &snd_pcm_hw_params_get_access;
return 0;
}

View file

@ -8,8 +8,6 @@
#include <sched.h>
#include <errno.h>
#include <getopt.h>
#define ALSA_PCM_NEW_HW_PARAMS_API
#define ALSA_PCM_NEW_SW_PARAMS_API
#include "../include/asoundlib.h"
#include <sys/time.h>
#include <math.h>