mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-02 13:59:59 +00:00
audiofile: import from OE rev 7ae56b81f8cc22f9ef13a48cde000e32138948ea
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
diff -Naur audiofile-0.2.6/libaudiofile/modules/msadpcm.c audiofile-0.2.6-mp/libaudiofile/modules/msadpcm.c
|
||||||
|
--- audiofile-0.2.6/libaudiofile/modules/msadpcm.c 2004-03-06 07:39:23.000000000 +0100
|
||||||
|
+++ audiofile-0.2.6-mp/libaudiofile/modules/msadpcm.c 2009-01-20 20:05:14.919961000 +0100
|
||||||
|
@@ -129,8 +129,7 @@
|
||||||
|
ms_adpcm_state *state[2];
|
||||||
|
|
||||||
|
/* Calculate the number of bytes needed for decoded data. */
|
||||||
|
- outputLength = msadpcm->samplesPerBlock * sizeof (int16_t) *
|
||||||
|
- msadpcm->track->f.channelCount;
|
||||||
|
+ outputLength = msadpcm->samplesPerBlock * sizeof (int16_t);
|
||||||
|
|
||||||
|
channelCount = msadpcm->track->f.channelCount;
|
||||||
|
|
||||||
|
@@ -180,8 +179,7 @@
|
||||||
|
The first two samples have already been 'decoded' in
|
||||||
|
the block header.
|
||||||
|
*/
|
||||||
|
- samplesRemaining = (msadpcm->samplesPerBlock - 2) *
|
||||||
|
- msadpcm->track->f.channelCount;
|
||||||
|
+ samplesRemaining = msadpcm->samplesPerBlock - 2;
|
||||||
|
|
||||||
|
while (samplesRemaining > 0)
|
||||||
|
{
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
--- test/instparamtest.c
|
||||||
|
+++ test/instparamtest.c
|
||||||
|
@@ -74,4 +74,5 @@
|
||||||
|
printf("release loop id: %ld\n", result);
|
||||||
|
|
||||||
|
afCloseFile(file);
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
--- test/instparamwrite.c
|
||||||
|
+++ test/instparamwrite.c
|
||||||
|
@@ -52,4 +52,5 @@
|
||||||
|
afSetInstParamLong(file, AF_DEFAULT_INST, AF_INST_NUMCENTS_DETUNE, -30);
|
||||||
|
|
||||||
|
afCloseFile(file);
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
--- test/loop.c
|
||||||
|
+++ test/loop.c
|
||||||
|
@@ -34,4 +34,5 @@
|
||||||
|
afSetLoopEnd(file, AF_DEFAULT_INST, 2, 4);
|
||||||
|
|
||||||
|
afCloseFile(file);
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
--- test/twentyfour.c.xx 2005-09-16 22:38:59.000000000 +0200
|
||||||
|
+++ test/twentyfour.c 2005-09-16 22:39:53.000000000 +0200
|
||||||
|
@@ -36,7 +36,9 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
#include <audiofile.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
--- test/pipe.c.xx 2005-09-16 22:39:36.000000000 +0200
|
||||||
|
+++ test/pipe.c 2005-09-16 22:39:42.000000000 +0200
|
||||||
|
@@ -36,6 +36,7 @@
|
||||||
|
|
||||||
|
#include <audiofile.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define SAMPLE_COUNT 12
|
||||||
|
--- test/error.c.xx 2005-09-16 22:40:02.000000000 +0200
|
||||||
|
+++ test/error.c 2005-09-16 22:40:11.000000000 +0200
|
||||||
|
@@ -25,6 +25,7 @@
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include <audiofile.h>
|
||||||
|
|
||||||
|
int expectedError;
|
||||||
|
--- test/testmarkers.c.xx 2005-09-16 22:40:21.000000000 +0200
|
||||||
|
+++ test/testmarkers.c 2005-09-16 22:40:41.000000000 +0200
|
||||||
|
@@ -25,6 +25,8 @@
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
+#include <string.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <audiofile.h>
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- audiofile.m4
|
||||||
|
+++ audiofile.m4
|
||||||
|
@@ -9,7 +9,7 @@
|
||||||
|
dnl AM_PATH_AUDIOFILE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
dnl Test for Audio File Library, and define AUDIOFILE_CFLAGS and AUDIOFILE_LIBS.
|
||||||
|
dnl
|
||||||
|
-AC_DEFUN(AM_PATH_AUDIOFILE,
|
||||||
|
+AC_DEFUN([AM_PATH_AUDIOFILE],
|
||||||
|
[dnl
|
||||||
|
dnl Get compiler flags and libraries from the audiofile-config script.
|
||||||
|
dnl
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
--- libaudiofile/g711.c
|
||||||
|
+++ libaudiofile/g711.c
|
||||||
|
@@ -81,10 +81,7 @@
|
||||||
|
0xFFF, 0x1FFF, 0x3FFF, 0x7FFF};
|
||||||
|
|
||||||
|
static int
|
||||||
|
-search(val, table, size)
|
||||||
|
- int val;
|
||||||
|
- short *table;
|
||||||
|
- int size;
|
||||||
|
+search(int val, short int *table, int size)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
@@ -115,8 +112,8 @@
|
||||||
|
* John Wiley & Sons, pps 98-111 and 472-476.
|
||||||
|
*/
|
||||||
|
unsigned char
|
||||||
|
-_af_linear2alaw(pcm_val)
|
||||||
|
- int pcm_val; /* 2's complement (16-bit range) */
|
||||||
|
+_af_linear2alaw(int pcm_val)
|
||||||
|
+ /* 2's complement (16-bit range) */
|
||||||
|
{
|
||||||
|
int mask;
|
||||||
|
int seg;
|
||||||
|
@@ -151,8 +148,7 @@
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
-_af_alaw2linear(a_val)
|
||||||
|
- unsigned char a_val;
|
||||||
|
+_af_alaw2linear(unsigned char a_val)
|
||||||
|
{
|
||||||
|
int t;
|
||||||
|
int seg;
|
||||||
|
@@ -269,8 +265,7 @@
|
||||||
|
|
||||||
|
/* A-law to u-law conversion */
|
||||||
|
static unsigned char
|
||||||
|
-alaw2ulaw(aval)
|
||||||
|
- unsigned char aval;
|
||||||
|
+alaw2ulaw(unsigned char aval)
|
||||||
|
{
|
||||||
|
aval &= 0xff;
|
||||||
|
return ((aval & 0x80) ? (0xFF ^ _a2u[aval ^ 0xD5]) :
|
||||||
|
@@ -279,8 +274,7 @@
|
||||||
|
|
||||||
|
/* u-law to A-law conversion */
|
||||||
|
static unsigned char
|
||||||
|
-ulaw2alaw(uval)
|
||||||
|
- unsigned char uval;
|
||||||
|
+ulaw2alaw(unsigned char uval)
|
||||||
|
{
|
||||||
|
uval &= 0xff;
|
||||||
|
return ((uval & 0x80) ? (0xD5 ^ (_u2a[0xFF ^ uval] - 1)) :
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
DESCRIPTION = "The Audio File Library provides a uniform and elegant \
|
||||||
|
API for accessing a variety of audio file formats, such as AIFF/AIFF-C, \
|
||||||
|
WAVE, NeXT/Sun .snd/.au, Berkeley/IRCAM/CARL Sound File, Audio Visual \
|
||||||
|
Research, Amiga IFF/8SVX, and NIST SPHERE."
|
||||||
|
SECTION = "libs"
|
||||||
|
LICENSE = "LGPLv2 && GPLv2"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
|
||||||
|
file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
|
||||||
|
|
||||||
|
SRC_URI = "http://www.68k.org/~michael/audiofile/audiofile-${PV}.tar.gz \
|
||||||
|
file://audiofile-m4_quote_fix.diff;striplevel=0 \
|
||||||
|
file://audiofile-oldstyle.patch;striplevel=0 \
|
||||||
|
file://audiofile-0.2.6.patch;striplevel=0 \
|
||||||
|
file://CVE-2008-5824.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
inherit autotools lib_package binconfig
|
||||||
|
|
||||||
|
SRC_URI[md5sum] = "9c1049876cd51c0f1b12c2886cce4d42"
|
||||||
|
SRC_URI[sha256sum] = "4b6167b56e21556fb07c9ef06962fe32817064c62181ba47afd3322e0d0f22a9"
|
||||||
Reference in New Issue
Block a user