Revision: 15604
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15604
Author:   scourage
Date:     2008-07-16 17:41:39 +0200 (Wed, 16 Jul 2008)

Log Message:
-----------
Added for sound integration.  PortAudio backend to be added as well when I get 
a windows build done.

Added Paths:
-----------
    trunk/lib/windows/samplerate/
    trunk/lib/windows/samplerate/include/
    trunk/lib/windows/samplerate/include/samplerate.h
    trunk/lib/windows/samplerate/lib/
    trunk/lib/windows/samplerate/lib/libsamplerate.dll
    trunk/lib/windows/samplerate/lib/libsamplerate.exp
    trunk/lib/windows/samplerate/lib/libsamplerate.lib
    trunk/lib/windows/sndfile/
    trunk/lib/windows/sndfile/include/
    trunk/lib/windows/sndfile/include/sndfile.h
    trunk/lib/windows/sndfile/lib/
    trunk/lib/windows/sndfile/lib/libsndfile-1.def
    trunk/lib/windows/sndfile/lib/libsndfile-1.dll
    trunk/lib/windows/sndfile/lib/libsndfile-1.exp
    trunk/lib/windows/sndfile/lib/libsndfile-1.lib

Added: trunk/lib/windows/samplerate/include/samplerate.h
===================================================================
--- trunk/lib/windows/samplerate/include/samplerate.h                           
(rev 0)
+++ trunk/lib/windows/samplerate/include/samplerate.h   2008-07-16 15:41:39 UTC 
(rev 15604)
@@ -0,0 +1,196 @@
+/*
+** Copyright (C) 2002-2004 Erik de Castro Lopo <[EMAIL PROTECTED]>
+**
+** 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.
+*/
+
+/*
+** API documentation is available here:
+**     http://www.mega-nerd.com/SRC/api.html
+*/
+
+#ifndef SAMPLERATE_H
+#define SAMPLERATE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/* Opaque data type SRC_STATE. */
+typedef struct SRC_STATE_tag SRC_STATE ;
+
+/* SRC_DATA is used to pass data to src_simple() and src_process(). */
+typedef struct
+{      float   *data_in, *data_out ;
+
+       long    input_frames, output_frames ;
+       long    input_frames_used, output_frames_gen ;
+
+       int             end_of_input ;
+
+       double  src_ratio ;
+} SRC_DATA ;
+
+/* SRC_CB_DATA is used with callback based API. */
+typedef struct
+{      long    frames ;
+       float   *data_in ;
+} SRC_CB_DATA ;
+
+/*
+** User supplied callback function type for use with src_callback_new()
+** and src_callback_read(). First parameter is the same pointer that was
+** passed into src_callback_new(). Second parameter is pointer to a
+** pointer. The user supplied callback function must modify *data to
+** point to the start of the user supplied float array. The user supplied
+** function must return the number of frames that **data points to.
+*/
+
+typedef long (*src_callback_t) (void *cb_data, float **data) ;
+
+/*
+**     Standard initialisation function : return an anonymous pointer to the
+**     internal state of the converter. Choose a converter from the enums 
below.
+**     Error returned in *error.
+*/
+
+SRC_STATE* src_new (int converter_type, int channels, int *error) ;
+
+/*
+**     Initilisation for callback based API : return an anonymous pointer to 
the
+**     internal state of the converter. Choose a converter from the enums 
below.
+**     The cb_data pointer can point to any data or be set to NULL. Whatever 
the
+**     value, when processing, user supplied function "func" gets called with
+**     cb_data as first parameter.
+*/
+
+SRC_STATE* src_callback_new (src_callback_t func, int converter_type, int 
channels,
+                               int *error, void* cb_data) ;
+
+/*
+**     Cleanup all internal allocations.
+**     Always returns NULL.
+*/
+
+SRC_STATE* src_delete (SRC_STATE *state) ;
+
+/*
+**     Standard processing function.
+**     Returns non zero on error.
+*/
+
+int src_process (SRC_STATE *state, SRC_DATA *data) ;
+
+/*
+**     Callback based processing function. Read up to frames worth of data from
+**     the converter int *data and return frames read or -1 on error.
+*/
+long src_callback_read (SRC_STATE *state, double src_ratio, long frames, float 
*data) ;
+
+/*
+**     Simple interface for performing a single conversion from input buffer to
+**     output buffer at a fixed conversion ratio.
+**     Simple interface does not require initialisation as it can only operate 
on
+**     a single buffer worth of audio.
+*/
+
+int src_simple (SRC_DATA *data, int converter_type, int channels) ;
+
+/*
+** This library contains a number of different sample rate converters,
+** numbered 0 through N.
+**
+** Return a string giving either a name or a more full description of each
+** sample rate converter or NULL if no sample rate converter exists for
+** the given value. The converters are sequentially numbered from 0 to N.
+*/
+
+const char *src_get_name (int converter_type) ;
+const char *src_get_description (int converter_type) ;
+const char *src_get_version (void) ;
+
+/*
+**     Set a new SRC ratio. This allows step responses
+**     in the conversion ratio.
+**     Returns non zero on error.
+*/
+
+int src_set_ratio (SRC_STATE *state, double new_ratio) ;
+
+/*
+**     Reset the internal SRC state.
+**     Does not modify the quality settings.
+**     Does not free any memory allocations.
+**     Returns non zero on error.
+*/
+
+int src_reset (SRC_STATE *state) ;
+
+/*
+** Return TRUE if ratio is a valid conversion ratio, FALSE
+** otherwise.
+*/
+
+int src_is_valid_ratio (double ratio) ;
+
+/*
+**     Return an error number.
+*/
+
+int src_error (SRC_STATE *state) ;
+
+/*
+**     Convert the error number into a string.
+*/
+const char* src_strerror (int error) ;
+
+/*
+** The following enums can be used to set the interpolator type
+** using the function src_set_converter().
+*/
+
+enum
+{
+       SRC_SINC_BEST_QUALITY           = 0,
+       SRC_SINC_MEDIUM_QUALITY         = 1,
+       SRC_SINC_FASTEST                        = 2,
+       SRC_ZERO_ORDER_HOLD                     = 3,
+       SRC_LINEAR                                      = 4
+} ;
+
+/*
+** Extra helper functions for converting from short to float and
+** back again.
+*/
+
+void src_short_to_float_array (const short *in, float *out, int len) ;
+void src_float_to_short_array (const float *in, short *out, int len) ;
+
+
+#ifdef __cplusplus
+}              /* extern "C" */
+#endif /* __cplusplus */
+
+#endif /* SAMPLERATE_H */
+
+/*
+** Do not edit or modify anything in this comment block.
+** The arch-tag line is a file identity tag for the GNU Arch
+** revision control system.
+**
+** arch-tag: 5421ef3e-c898-4ec3-8671-ea03d943ee00
+*/
+

Added: trunk/lib/windows/samplerate/lib/libsamplerate.dll
===================================================================
(Binary files differ)


Property changes on: trunk/lib/windows/samplerate/lib/libsamplerate.dll
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/lib/windows/samplerate/lib/libsamplerate.exp
===================================================================
(Binary files differ)


Property changes on: trunk/lib/windows/samplerate/lib/libsamplerate.exp
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/lib/windows/samplerate/lib/libsamplerate.lib
===================================================================
(Binary files differ)


Property changes on: trunk/lib/windows/samplerate/lib/libsamplerate.lib
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/lib/windows/sndfile/include/sndfile.h
===================================================================
--- trunk/lib/windows/sndfile/include/sndfile.h                         (rev 0)
+++ trunk/lib/windows/sndfile/include/sndfile.h 2008-07-16 15:41:39 UTC (rev 
15604)
@@ -0,0 +1,554 @@
+/*
+** Copyright (C) 1999-2006 Erik de Castro Lopo <[EMAIL PROTECTED]>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU Lesser General Public License as published by
+** the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
+**
+** You should have received a copy of the GNU Lesser 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.
+*/
+
+/*
+** sndfile.h -- system-wide definitions
+**
+** API documentation is in the doc/ directory of the source code tarball
+** and at http://www.mega-nerd.com/libsndfile/api.html.
+*/
+
+#ifndef SNDFILE_H
+#define SNDFILE_H
+
+/* This is the version 1.0.X header file. */
+#define        SNDFILE_1
+
+#include <stdio.h>
+
+/* For the Metrowerks CodeWarrior Pro Compiler (mainly MacOS) */
+
+#if    (defined (__MWERKS__))
+#include       <unix.h>
+#else
+#include       <sys/types.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* The following file types can be read and written.
+** A file type would consist of a major type (ie SF_FORMAT_WAV) bitwise
+** ORed with a minor type (ie SF_FORMAT_PCM). SF_FORMAT_TYPEMASK and
+** SF_FORMAT_SUBMASK can be used to separate the major and minor file
+** types.
+*/
+
+enum
+{      /* Major formats. */
+       SF_FORMAT_WAV                   = 0x010000,             /* Microsoft 
WAV format (little endian default). */
+       SF_FORMAT_AIFF                  = 0x020000,             /* Apple/SGI 
AIFF format (big endian). */
+       SF_FORMAT_AU                    = 0x030000,             /* Sun/NeXT AU 
format (big endian). */
+       SF_FORMAT_RAW                   = 0x040000,             /* RAW PCM 
data. */
+       SF_FORMAT_PAF                   = 0x050000,             /* Ensoniq 
PARIS file format. */
+       SF_FORMAT_SVX                   = 0x060000,             /* Amiga IFF / 
SVX8 / SV16 format. */
+       SF_FORMAT_NIST                  = 0x070000,             /* Sphere NIST 
format. */
+       SF_FORMAT_VOC                   = 0x080000,             /* VOC files. */
+       SF_FORMAT_IRCAM                 = 0x0A0000,             /* 
Berkeley/IRCAM/CARL */
+       SF_FORMAT_W64                   = 0x0B0000,             /* Sonic 
Foundry's 64 bit RIFF/WAV */
+       SF_FORMAT_MAT4                  = 0x0C0000,             /* Matlab (tm) 
V4.2 / GNU Octave 2.0 */
+       SF_FORMAT_MAT5                  = 0x0D0000,             /* Matlab (tm) 
V5.0 / GNU Octave 2.1 */
+       SF_FORMAT_PVF                   = 0x0E0000,             /* Portable 
Voice Format */
+       SF_FORMAT_XI                    = 0x0F0000,             /* Fasttracker 
2 Extended Instrument */
+       SF_FORMAT_HTK                   = 0x100000,             /* HMM Tool Kit 
format */
+       SF_FORMAT_SDS                   = 0x110000,             /* Midi Sample 
Dump Standard */
+       SF_FORMAT_AVR                   = 0x120000,             /* Audio Visual 
Research */
+       SF_FORMAT_WAVEX                 = 0x130000,             /* MS WAVE with 
WAVEFORMATEX */
+       SF_FORMAT_SD2                   = 0x160000,             /* Sound 
Designer 2 */
+       SF_FORMAT_FLAC                  = 0x170000,             /* FLAC 
lossless file format */
+       SF_FORMAT_CAF                   = 0x180000,             /* Core Audio 
File format */
+
+       /* Subtypes from here on. */
+
+       SF_FORMAT_PCM_S8                = 0x0001,               /* Signed 8 bit 
data */
+       SF_FORMAT_PCM_16                = 0x0002,               /* Signed 16 
bit data */
+       SF_FORMAT_PCM_24                = 0x0003,               /* Signed 24 
bit data */
+       SF_FORMAT_PCM_32                = 0x0004,               /* Signed 32 
bit data */
+
+       SF_FORMAT_PCM_U8                = 0x0005,               /* Unsigned 8 
bit data (WAV and RAW only) */
+

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to