Release 4.3.1 tarball

This commit is contained in:
Gary Scavone
2013-09-29 23:42:39 +02:00
committed by Stephen Sinclair
parent e54b0cefab
commit c92cf7468d
20 changed files with 864 additions and 551 deletions

389
configure vendored
View File

@@ -311,7 +311,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP byte_order rawwaves include realtime sound_api debug cflags object_path warn build build_cpu build_vendor build_os host host_cpu host_vendor host_os frameworks audio_apis LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS GXX CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP byte_order rawwaves include realtime sound_api debug cflags object_path warn build build_cpu build_vendor build_os host host_cpu host_vendor host_os frameworks audio_apis objects LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -867,6 +867,8 @@ Optional Packages:
--with-oss = choose OSS API support (linux only)
--with-jack = choose JACK server support (unix only)
--with-core = choose CoreAudio API support (mac only)
--with-asio = choose ASIO API support (windoze only)
--with-ds = choose DirectSound API support (windoze only)
Some influential environment variables:
CC C compiler command
@@ -1332,6 +1334,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_files="$ac_config_files src/Makefile projects/demo/Makefile projects/effects/Makefile projects/ragamatic/Makefile projects/examples/Makefile projects/examples/libMakefile"
# Fill GXX with something before test.
GXX="no"
# Checks for programs.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -4217,89 +4223,11 @@ echo "$as_me: error: math library is needed!" >&2;}
fi
# Checks for functions
if test $realtime = yes; then
echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pthread_create ();
int
main ()
{
pthread_create ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_pthread_pthread_create=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_pthread_pthread_create=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
if test $ac_cv_lib_pthread_pthread_create = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPTHREAD 1
_ACEOF
LIBS="-lpthread $LIBS"
else
{ { echo "$as_me:$LINENO: error: realtime support requires the pthread library!" >&5
echo "$as_me: error: realtime support requires the pthread library!" >&2;}
{ (exit 1); exit 1; }; }
fi
for ac_func in gettimeofday select socket
for ac_func in select socket
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -4400,6 +4328,100 @@ _ACEOF
fi
done
echo "$as_me:$LINENO: checking for gettimeofday" >&5
echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
if test "${ac_cv_func_gettimeofday+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define gettimeofday to an innocuous variant, in case <limits.h> declares gettimeofday.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define gettimeofday innocuous_gettimeofday
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gettimeofday (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
#undef gettimeofday
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gettimeofday ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
choke me
#else
char (*f) () = gettimeofday;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != gettimeofday;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_gettimeofday=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_gettimeofday=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5
echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
if test $ac_cv_func_gettimeofday = yes; then
cflags=$cflags" -DHAVE_GETTIMEOFDAY"
fi
fi
# Check for debug
@@ -4721,6 +4743,85 @@ fi;
echo "${ECHO_T}using ALSA" >&6
audio_apis="-D__LINUX_ALSA__ $audio_apis"
fi
echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pthread_create ();
int
main ()
{
pthread_create ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_pthread_pthread_create=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_pthread_pthread_create=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
if test $ac_cv_lib_pthread_pthread_create = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPTHREAD 1
_ACEOF
LIBS="-lpthread $LIBS"
else
{ { echo "$as_me:$LINENO: error: realtime support requires the pthread library!" >&5
echo "$as_me: error: realtime support requires the pthread library!" >&2;}
{ (exit 1); exit 1; }; }
fi
;;
*-apple*)
@@ -5135,6 +5236,130 @@ fi
frameworks="-framework CoreAudio -framework CoreFoundation -framework CoreMidi"
fi
echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pthread_create ();
int
main ()
{
pthread_create ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_pthread_pthread_create=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_pthread_pthread_create=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
if test $ac_cv_lib_pthread_pthread_create = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPTHREAD 1
_ACEOF
LIBS="-lpthread $LIBS"
else
{ { echo "$as_me:$LINENO: error: realtime support requires the pthread library!" >&5
echo "$as_me: error: realtime support requires the pthread library!" >&2;}
{ (exit 1); exit 1; }; }
fi
;;
*-mingw32*)
sound_api=_NO_API_
# Check whether --with-asio or --without-asio was given.
if test "${with_asio+set}" = set; then
withval="$with_asio"
sound_api=-D__WINDOWS_ASIO__
echo "$as_me:$LINENO: result: using ASIO" >&5
echo "${ECHO_T}using ASIO" >&6
fi;
if test $sound_api = -D__WINDOWS_ASIO__; then
audio_apis="-D__WINDOWS_ASIO__"
objects="asio.o asiodrivers.o asiolist.o iasiothiscallresolver.o"
fi
# Look for DirectSound flag
# Check whether --with-ds or --without-ds was given.
if test "${with_ds+set}" = set; then
withval="$with_ds"
sound_api=-D__WINDOWS_DS__
echo "$as_me:$LINENO: result: using DirectSound" >&5
echo "${ECHO_T}using DirectSound" >&6
fi;
if test $sound_api = -D__WINDOWS_DS__; then
audio_apis="-D__WINDOWS_DS__ $audio_apis"
LIBS="-ldsound $LIBS"
fi
# If no audio api flags specified, use DirectSound
if test $sound_api = _NO_API_; then
sound_api=-D__WINDOWS_DS__
echo "$as_me:$LINENO: result: using DirectSound" >&5
echo "${ECHO_T}using DirectSound" >&6
audio_apis="-D__WINDOWS_DS__"
LIBS="-ldsound $LIBS"
fi
audio_apis="-D__WINDOWS_MM__ $audio_apis"
LIBS="-lole32 -lwinmm -lWsock32 $LIBS"
;;
*)
@@ -5939,6 +6164,7 @@ s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@LIBS@,$LIBS,;t t
s,@GXX@,$GXX,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
@@ -5970,6 +6196,7 @@ s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
s,@frameworks@,$frameworks,;t t
s,@audio_apis@,$audio_apis,;t t
s,@objects@,$objects,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF

View File

@@ -25,55 +25,58 @@
<a name="l00041"></a>00041 <a class="code" href="classFileRead.html#a0">FileRead</a>();
<a name="l00042"></a>00042
<a name="l00044"></a>00044
<a name="l00048"></a>00048 <a class="code" href="classFileRead.html#a0">FileRead</a>( std::string fileName, <span class="keywordtype">bool</span> typeRaw = <span class="keyword">false</span> );
<a name="l00049"></a>00049
<a name="l00051"></a>00051 <a class="code" href="classFileRead.html#a2">~FileRead</a>();
<a name="l00050"></a>00050 <a class="code" href="classFileRead.html#a0">FileRead</a>( std::string fileName, <span class="keywordtype">bool</span> typeRaw = <span class="keyword">false</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1,
<a name="l00051"></a>00051 StkFormat format = <a class="code" href="classStk.html#s1">STK_SINT16</a>, StkFloat rate = 22050.0 );
<a name="l00052"></a>00052
<a name="l00054"></a>00054
<a name="l00060"></a>00060 <span class="keywordtype">void</span> <a class="code" href="classFileRead.html#a3">open</a>( std::string fileName, <span class="keywordtype">bool</span> typeRaw = <span class="keyword">false</span> );
<a name="l00061"></a>00061
<a name="l00063"></a>00063 <span class="keywordtype">void</span> <a class="code" href="classFileRead.html#a4">close</a>( <span class="keywordtype">void</span> );
<a name="l00064"></a>00064
<a name="l00066"></a>00066 <span class="keywordtype">bool</span> <a class="code" href="classFileRead.html#a5">isOpen</a>( <span class="keywordtype">void</span> );
<a name="l00067"></a>00067
<a name="l00069"></a><a class="code" href="classFileRead.html#a6">00069</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classFileRead.html#a6">fileSize</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fileSize_; };
<a name="l00070"></a>00070
<a name="l00072"></a><a class="code" href="classFileRead.html#a7">00072</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFileRead.html#a7">channels</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> channels_; };
<a name="l00073"></a>00073
<a name="l00075"></a>00075
<a name="l00080"></a><a class="code" href="classFileRead.html#a8">00080</a> StkFloat <a class="code" href="classFileRead.html#a8">fileRate</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fileRate_; };
<a name="l00081"></a>00081
<a name="l00083"></a>00083
<a name="l00095"></a>00095 <span class="keywordtype">void</span> <a class="code" href="classFileRead.html#a9">read</a>( <a class="code" href="classStkFrames.html">StkFrames</a>&amp; buffer, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> startFrame = 0, <span class="keywordtype">bool</span> doNormalize = <span class="keyword">true</span> );
<a name="l00096"></a>00096
<a name="l00097"></a>00097 <span class="keyword">protected</span>:
<a name="l00098"></a>00098
<a name="l00099"></a>00099 <span class="comment">// Get STK RAW file information.</span>
<a name="l00100"></a>00100 <span class="keywordtype">bool</span> getRawInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
<a name="l00101"></a>00101
<a name="l00102"></a>00102 <span class="comment">// Get WAV file header information.</span>
<a name="l00103"></a>00103 <span class="keywordtype">bool</span> getWavInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
<a name="l00104"></a>00104
<a name="l00105"></a>00105 <span class="comment">// Get SND (AU) file header information.</span>
<a name="l00106"></a>00106 <span class="keywordtype">bool</span> getSndInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
<a name="l00107"></a>00107
<a name="l00108"></a>00108 <span class="comment">// Get AIFF file header information.</span>
<a name="l00109"></a>00109 <span class="keywordtype">bool</span> getAifInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
<a name="l00110"></a>00110
<a name="l00111"></a>00111 <span class="comment">// Get MAT-file header information.</span>
<a name="l00112"></a>00112 <span class="keywordtype">bool</span> getMatInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
<a name="l00113"></a>00113
<a name="l00114"></a>00114 FILE *fd_;
<a name="l00115"></a>00115 <span class="keywordtype">bool</span> byteswap_;
<a name="l00116"></a>00116 <span class="keywordtype">bool</span> wavFile_;
<a name="l00117"></a>00117 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> fileSize_;
<a name="l00118"></a>00118 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> dataOffset_;
<a name="l00119"></a>00119 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels_;
<a name="l00120"></a>00120 StkFormat dataType_;
<a name="l00121"></a>00121 StkFloat fileRate_;
<a name="l00122"></a>00122 };
<a name="l00123"></a>00123
<a name="l00124"></a>00124 <span class="preprocessor">#endif</span>
<a name="l00054"></a>00054 <a class="code" href="classFileRead.html#a2">~FileRead</a>();
<a name="l00055"></a>00055
<a name="l00057"></a>00057
<a name="l00063"></a>00063 <span class="keywordtype">void</span> <a class="code" href="classFileRead.html#a3">open</a>( std::string fileName, <span class="keywordtype">bool</span> typeRaw = <span class="keyword">false</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1,
<a name="l00064"></a>00064 StkFormat format = <a class="code" href="classStk.html#s1">STK_SINT16</a>, StkFloat rate = 22050.0 );
<a name="l00065"></a>00065
<a name="l00067"></a>00067 <span class="keywordtype">void</span> <a class="code" href="classFileRead.html#a4">close</a>( <span class="keywordtype">void</span> );
<a name="l00068"></a>00068
<a name="l00070"></a>00070 <span class="keywordtype">bool</span> <a class="code" href="classFileRead.html#a5">isOpen</a>( <span class="keywordtype">void</span> );
<a name="l00071"></a>00071
<a name="l00073"></a><a class="code" href="classFileRead.html#a6">00073</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classFileRead.html#a6">fileSize</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fileSize_; };
<a name="l00074"></a>00074
<a name="l00076"></a><a class="code" href="classFileRead.html#a7">00076</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFileRead.html#a7">channels</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> channels_; };
<a name="l00077"></a>00077
<a name="l00079"></a>00079
<a name="l00084"></a><a class="code" href="classFileRead.html#a8">00084</a> StkFloat <a class="code" href="classFileRead.html#a8">fileRate</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fileRate_; };
<a name="l00085"></a>00085
<a name="l00087"></a>00087
<a name="l00099"></a>00099 <span class="keywordtype">void</span> <a class="code" href="classFileRead.html#a9">read</a>( <a class="code" href="classStkFrames.html">StkFrames</a>&amp; buffer, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> startFrame = 0, <span class="keywordtype">bool</span> doNormalize = <span class="keyword">true</span> );
<a name="l00100"></a>00100
<a name="l00101"></a>00101 <span class="keyword">protected</span>:
<a name="l00102"></a>00102
<a name="l00103"></a>00103 <span class="comment">// Get STK RAW file information.</span>
<a name="l00104"></a>00104 <span class="keywordtype">bool</span> getRawInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels,
<a name="l00105"></a>00105 StkFormat format, StkFloat rate );
<a name="l00106"></a>00106
<a name="l00107"></a>00107 <span class="comment">// Get WAV file header information.</span>
<a name="l00108"></a>00108 <span class="keywordtype">bool</span> getWavInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
<a name="l00109"></a>00109
<a name="l00110"></a>00110 <span class="comment">// Get SND (AU) file header information.</span>
<a name="l00111"></a>00111 <span class="keywordtype">bool</span> getSndInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
<a name="l00112"></a>00112
<a name="l00113"></a>00113 <span class="comment">// Get AIFF file header information.</span>
<a name="l00114"></a>00114 <span class="keywordtype">bool</span> getAifInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
<a name="l00115"></a>00115
<a name="l00116"></a>00116 <span class="comment">// Get MAT-file header information.</span>
<a name="l00117"></a>00117 <span class="keywordtype">bool</span> getMatInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
<a name="l00118"></a>00118
<a name="l00119"></a>00119 FILE *fd_;
<a name="l00120"></a>00120 <span class="keywordtype">bool</span> byteswap_;
<a name="l00121"></a>00121 <span class="keywordtype">bool</span> wavFile_;
<a name="l00122"></a>00122 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> fileSize_;
<a name="l00123"></a>00123 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> dataOffset_;
<a name="l00124"></a>00124 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels_;
<a name="l00125"></a>00125 StkFormat dataType_;
<a name="l00126"></a>00126 StkFloat fileRate_;
<a name="l00127"></a>00127 };
<a name="l00128"></a>00128
<a name="l00129"></a>00129 <span class="preprocessor">#endif</span>
</pre></div><HR>
<table>

View File

@@ -14,7 +14,7 @@
<h1>RtAudio.h</h1><a href="RtAudio_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/************************************************************************/</span>
<a name="l00039"></a>00039 <span class="comment">/************************************************************************/</span>
<a name="l00040"></a>00040
<a name="l00045"></a>00045 <span class="comment">// RtAudio: Version 4.0</span>
<a name="l00045"></a>00045 <span class="comment">// RtAudio: Version 4.0.3</span>
<a name="l00046"></a>00046
<a name="l00047"></a>00047 <span class="preprocessor">#ifndef __RTAUDIO_H</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define __RTAUDIO_H</span>
@@ -360,20 +360,20 @@
<a name="l00679"></a>00679 <span class="comment">//</span>
<a name="l00680"></a>00680 <span class="comment">// **************************************************************** //</span>
<a name="l00681"></a>00681
<a name="l00682"></a><a class="code" href="classRtAudio.html#a2">00682</a> <span class="keyword">inline</span> <a class="code" href="classRtAudio.html#w8">RtAudio::Api</a> <a class="code" href="classRtAudio.html#a2">RtAudio :: getCurrentApi</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getCurrentApi(); };
<a name="l00683"></a><a class="code" href="classRtAudio.html#a3">00683</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a3">RtAudio :: getDeviceCount</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDeviceCount(); };
<a name="l00684"></a><a class="code" href="classRtAudio.html#a4">00684</a> <span class="keyword">inline</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> <a class="code" href="classRtAudio.html#a4">RtAudio :: getDeviceInfo</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device ) { <span class="keywordflow">return</span> rtapi_-&gt;getDeviceInfo( device ); };
<a name="l00685"></a><a class="code" href="classRtAudio.html#a6">00685</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a6">RtAudio :: getDefaultInputDevice</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDefaultInputDevice(); };
<a name="l00686"></a><a class="code" href="classRtAudio.html#a5">00686</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a5">RtAudio :: getDefaultOutputDevice</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDefaultOutputDevice(); };
<a name="l00687"></a><a class="code" href="classRtAudio.html#a8">00687</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a8">RtAudio :: closeStream</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;closeStream(); };
<a name="l00688"></a><a class="code" href="classRtAudio.html#a9">00688</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a9">RtAudio :: startStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;startStream(); };
<a name="l00689"></a><a class="code" href="classRtAudio.html#a10">00689</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a10">RtAudio :: stopStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;stopStream(); };
<a name="l00690"></a><a class="code" href="classRtAudio.html#a11">00690</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a11">RtAudio :: abortStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;abortStream(); };
<a name="l00691"></a><a class="code" href="classRtAudio.html#a12">00691</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#a12">RtAudio :: isStreamOpen</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;isStreamOpen(); };
<a name="l00692"></a><a class="code" href="classRtAudio.html#a13">00692</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#a13">RtAudio :: isStreamRunning</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;isStreamRunning(); };
<a name="l00693"></a><a class="code" href="classRtAudio.html#a15">00693</a> <span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classRtAudio.html#a15">RtAudio :: getStreamLatency</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getStreamLatency(); };
<a name="l00694"></a><a class="code" href="classRtAudio.html#a14">00694</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="classRtAudio.html#a14">RtAudio :: getStreamTime</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getStreamTime(); };
<a name="l00695"></a><a class="code" href="classRtAudio.html#a16">00695</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a16">RtAudio :: showWarnings</a>( <span class="keywordtype">bool</span> value ) <span class="keywordflow">throw</span>() { rtapi_-&gt;showWarnings( value ); };
<a name="l00682"></a><a class="code" href="classRtAudio.html#a2">00682</a> <span class="keyword">inline</span> <a class="code" href="classRtAudio.html#w8">RtAudio::Api</a> <a class="code" href="classRtAudio.html#a2">RtAudio :: getCurrentApi</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getCurrentApi(); }
<a name="l00683"></a><a class="code" href="classRtAudio.html#a3">00683</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a3">RtAudio :: getDeviceCount</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDeviceCount(); }
<a name="l00684"></a><a class="code" href="classRtAudio.html#a4">00684</a> <span class="keyword">inline</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> <a class="code" href="classRtAudio.html#a4">RtAudio :: getDeviceInfo</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device ) { <span class="keywordflow">return</span> rtapi_-&gt;getDeviceInfo( device ); }
<a name="l00685"></a><a class="code" href="classRtAudio.html#a6">00685</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a6">RtAudio :: getDefaultInputDevice</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDefaultInputDevice(); }
<a name="l00686"></a><a class="code" href="classRtAudio.html#a5">00686</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a5">RtAudio :: getDefaultOutputDevice</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDefaultOutputDevice(); }
<a name="l00687"></a><a class="code" href="classRtAudio.html#a8">00687</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a8">RtAudio :: closeStream</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;closeStream(); }
<a name="l00688"></a><a class="code" href="classRtAudio.html#a9">00688</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a9">RtAudio :: startStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;startStream(); }
<a name="l00689"></a><a class="code" href="classRtAudio.html#a10">00689</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a10">RtAudio :: stopStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;stopStream(); }
<a name="l00690"></a><a class="code" href="classRtAudio.html#a11">00690</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a11">RtAudio :: abortStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;abortStream(); }
<a name="l00691"></a><a class="code" href="classRtAudio.html#a12">00691</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#a12">RtAudio :: isStreamOpen</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;isStreamOpen(); }
<a name="l00692"></a><a class="code" href="classRtAudio.html#a13">00692</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#a13">RtAudio :: isStreamRunning</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;isStreamRunning(); }
<a name="l00693"></a><a class="code" href="classRtAudio.html#a15">00693</a> <span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classRtAudio.html#a15">RtAudio :: getStreamLatency</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getStreamLatency(); }
<a name="l00694"></a><a class="code" href="classRtAudio.html#a14">00694</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="classRtAudio.html#a14">RtAudio :: getStreamTime</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getStreamTime(); }
<a name="l00695"></a><a class="code" href="classRtAudio.html#a16">00695</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a16">RtAudio :: showWarnings</a>( <span class="keywordtype">bool</span> value ) <span class="keywordflow">throw</span>() { rtapi_-&gt;showWarnings( value ); }
<a name="l00696"></a>00696
<a name="l00697"></a>00697 <span class="comment">// RtApi Subclass prototypes.</span>
<a name="l00698"></a>00698
@@ -475,152 +475,154 @@
<a name="l00794"></a>00794
<a name="l00795"></a>00795 <span class="keyword">private</span>:
<a name="l00796"></a>00796
<a name="l00797"></a>00797 <span class="keywordtype">bool</span> coInitialized_;
<a name="l00798"></a>00798 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00799"></a>00799 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00800"></a>00800 <a class="code" href="RtAudio_8h.html#a0">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00801"></a>00801 <a class="code" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options );
<a name="l00802"></a>00802 };
<a name="l00803"></a>00803
<a name="l00804"></a>00804 <span class="preprocessor">#endif</span>
<a name="l00805"></a>00805 <span class="preprocessor"></span>
<a name="l00806"></a>00806 <span class="preprocessor">#if defined(__WINDOWS_DS__)</span>
<a name="l00797"></a>00797 std::vector&lt;RtAudio::DeviceInfo&gt; devices_;
<a name="l00798"></a>00798 <span class="keywordtype">void</span> saveDeviceInfo( <span class="keywordtype">void</span> );
<a name="l00799"></a>00799 <span class="keywordtype">bool</span> coInitialized_;
<a name="l00800"></a>00800 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00801"></a>00801 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00802"></a>00802 <a class="code" href="RtAudio_8h.html#a0">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00803"></a>00803 <a class="code" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options );
<a name="l00804"></a>00804 };
<a name="l00805"></a>00805
<a name="l00806"></a>00806 <span class="preprocessor">#endif</span>
<a name="l00807"></a>00807 <span class="preprocessor"></span>
<a name="l00808"></a>00808 <span class="keyword">class </span>RtApiDs: <span class="keyword">public</span> RtApi
<a name="l00809"></a>00809 {
<a name="l00810"></a>00810 <span class="keyword">public</span>:
<a name="l00811"></a>00811
<a name="l00812"></a>00812 RtApiDs();
<a name="l00813"></a>00813 ~RtApiDs();
<a name="l00814"></a>00814 <a class="code" href="classRtAudio.html#w8">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#w8w6">RtAudio::WINDOWS_DS</a>; };
<a name="l00815"></a>00815 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00816"></a>00816 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultOutputDevice( <span class="keywordtype">void</span> );
<a name="l00817"></a>00817 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultInputDevice( <span class="keywordtype">void</span> );
<a name="l00818"></a>00818 <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00819"></a>00819 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00820"></a>00820 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00821"></a>00821 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00822"></a>00822 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00823"></a>00823 <span class="keywordtype">long</span> getStreamLatency( <span class="keywordtype">void</span> );
<a name="l00824"></a>00824
<a name="l00825"></a>00825 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00826"></a>00826 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00827"></a>00827 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00828"></a>00828 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00829"></a>00829 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00830"></a>00830
<a name="l00831"></a>00831 <span class="keyword">private</span>:
<a name="l00808"></a>00808 <span class="preprocessor">#if defined(__WINDOWS_DS__)</span>
<a name="l00809"></a>00809 <span class="preprocessor"></span>
<a name="l00810"></a>00810 <span class="keyword">class </span>RtApiDs: <span class="keyword">public</span> RtApi
<a name="l00811"></a>00811 {
<a name="l00812"></a>00812 <span class="keyword">public</span>:
<a name="l00813"></a>00813
<a name="l00814"></a>00814 RtApiDs();
<a name="l00815"></a>00815 ~RtApiDs();
<a name="l00816"></a>00816 <a class="code" href="classRtAudio.html#w8">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#w8w6">RtAudio::WINDOWS_DS</a>; };
<a name="l00817"></a>00817 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00818"></a>00818 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultOutputDevice( <span class="keywordtype">void</span> );
<a name="l00819"></a>00819 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultInputDevice( <span class="keywordtype">void</span> );
<a name="l00820"></a>00820 <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00821"></a>00821 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00822"></a>00822 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00823"></a>00823 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00824"></a>00824 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00825"></a>00825 <span class="keywordtype">long</span> getStreamLatency( <span class="keywordtype">void</span> );
<a name="l00826"></a>00826
<a name="l00827"></a>00827 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00828"></a>00828 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00829"></a>00829 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00830"></a>00830 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00831"></a>00831 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00832"></a>00832
<a name="l00833"></a>00833 <span class="keywordtype">bool</span> coInitialized_;
<a name="l00834"></a>00834 <span class="keywordtype">bool</span> buffersRolling;
<a name="l00835"></a>00835 <span class="keywordtype">long</span> duplexPrerollBytes;
<a name="l00836"></a>00836 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00837"></a>00837 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00838"></a>00838 <a class="code" href="RtAudio_8h.html#a0">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00839"></a>00839 <a class="code" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options );
<a name="l00840"></a>00840 };
<a name="l00841"></a>00841
<a name="l00842"></a>00842 <span class="preprocessor">#endif</span>
<a name="l00843"></a>00843 <span class="preprocessor"></span>
<a name="l00844"></a>00844 <span class="preprocessor">#if defined(__LINUX_ALSA__)</span>
<a name="l00833"></a>00833 <span class="keyword">private</span>:
<a name="l00834"></a>00834
<a name="l00835"></a>00835 <span class="keywordtype">bool</span> coInitialized_;
<a name="l00836"></a>00836 <span class="keywordtype">bool</span> buffersRolling;
<a name="l00837"></a>00837 <span class="keywordtype">long</span> duplexPrerollBytes;
<a name="l00838"></a>00838 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00839"></a>00839 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00840"></a>00840 <a class="code" href="RtAudio_8h.html#a0">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00841"></a>00841 <a class="code" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options );
<a name="l00842"></a>00842 };
<a name="l00843"></a>00843
<a name="l00844"></a>00844 <span class="preprocessor">#endif</span>
<a name="l00845"></a>00845 <span class="preprocessor"></span>
<a name="l00846"></a>00846 <span class="keyword">class </span>RtApiAlsa: <span class="keyword">public</span> RtApi
<a name="l00847"></a>00847 {
<a name="l00848"></a>00848 <span class="keyword">public</span>:
<a name="l00849"></a>00849
<a name="l00850"></a>00850 RtApiAlsa();
<a name="l00851"></a>00851 ~RtApiAlsa();
<a name="l00852"></a>00852 <a class="code" href="classRtAudio.html#w8">RtAudio::Api</a> getCurrentApi() { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#w8w1">RtAudio::LINUX_ALSA</a>; };
<a name="l00853"></a>00853 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00854"></a>00854 <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00855"></a>00855 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00856"></a>00856 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00857"></a>00857 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00858"></a>00858 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00859"></a>00859
<a name="l00860"></a>00860 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00861"></a>00861 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00862"></a>00862 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00863"></a>00863 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00864"></a>00864 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00865"></a>00865
<a name="l00866"></a>00866 <span class="keyword">private</span>:
<a name="l00846"></a>00846 <span class="preprocessor">#if defined(__LINUX_ALSA__)</span>
<a name="l00847"></a>00847 <span class="preprocessor"></span>
<a name="l00848"></a>00848 <span class="keyword">class </span>RtApiAlsa: <span class="keyword">public</span> RtApi
<a name="l00849"></a>00849 {
<a name="l00850"></a>00850 <span class="keyword">public</span>:
<a name="l00851"></a>00851
<a name="l00852"></a>00852 RtApiAlsa();
<a name="l00853"></a>00853 ~RtApiAlsa();
<a name="l00854"></a>00854 <a class="code" href="classRtAudio.html#w8">RtAudio::Api</a> getCurrentApi() { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#w8w1">RtAudio::LINUX_ALSA</a>; };
<a name="l00855"></a>00855 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00856"></a>00856 <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00857"></a>00857 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00858"></a>00858 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00859"></a>00859 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00860"></a>00860 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00861"></a>00861
<a name="l00862"></a>00862 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00863"></a>00863 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00864"></a>00864 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00865"></a>00865 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00866"></a>00866 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00867"></a>00867
<a name="l00868"></a>00868 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00869"></a>00869 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00870"></a>00870 <a class="code" href="RtAudio_8h.html#a0">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00871"></a>00871 <a class="code" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options );
<a name="l00872"></a>00872 };
<a name="l00873"></a>00873
<a name="l00874"></a>00874 <span class="preprocessor">#endif</span>
<a name="l00875"></a>00875 <span class="preprocessor"></span>
<a name="l00876"></a>00876 <span class="preprocessor">#if defined(__LINUX_OSS__)</span>
<a name="l00868"></a>00868 <span class="keyword">private</span>:
<a name="l00869"></a>00869
<a name="l00870"></a>00870 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00871"></a>00871 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00872"></a>00872 <a class="code" href="RtAudio_8h.html#a0">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00873"></a>00873 <a class="code" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options );
<a name="l00874"></a>00874 };
<a name="l00875"></a>00875
<a name="l00876"></a>00876 <span class="preprocessor">#endif</span>
<a name="l00877"></a>00877 <span class="preprocessor"></span>
<a name="l00878"></a>00878 <span class="keyword">class </span>RtApiOss: <span class="keyword">public</span> RtApi
<a name="l00879"></a>00879 {
<a name="l00880"></a>00880 <span class="keyword">public</span>:
<a name="l00881"></a>00881
<a name="l00882"></a>00882 RtApiOss();
<a name="l00883"></a>00883 ~RtApiOss();
<a name="l00884"></a>00884 <a class="code" href="classRtAudio.html#w8">RtAudio::Api</a> getCurrentApi() { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#w8w2">RtAudio::LINUX_OSS</a>; };
<a name="l00885"></a>00885 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00886"></a>00886 <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00887"></a>00887 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00888"></a>00888 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00889"></a>00889 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00890"></a>00890 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00891"></a>00891
<a name="l00892"></a>00892 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00893"></a>00893 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00894"></a>00894 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00895"></a>00895 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00896"></a>00896 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00897"></a>00897
<a name="l00898"></a>00898 <span class="keyword">private</span>:
<a name="l00878"></a>00878 <span class="preprocessor">#if defined(__LINUX_OSS__)</span>
<a name="l00879"></a>00879 <span class="preprocessor"></span>
<a name="l00880"></a>00880 <span class="keyword">class </span>RtApiOss: <span class="keyword">public</span> RtApi
<a name="l00881"></a>00881 {
<a name="l00882"></a>00882 <span class="keyword">public</span>:
<a name="l00883"></a>00883
<a name="l00884"></a>00884 RtApiOss();
<a name="l00885"></a>00885 ~RtApiOss();
<a name="l00886"></a>00886 <a class="code" href="classRtAudio.html#w8">RtAudio::Api</a> getCurrentApi() { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#w8w2">RtAudio::LINUX_OSS</a>; };
<a name="l00887"></a>00887 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00888"></a>00888 <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00889"></a>00889 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00890"></a>00890 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00891"></a>00891 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00892"></a>00892 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00893"></a>00893
<a name="l00894"></a>00894 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00895"></a>00895 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00896"></a>00896 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00897"></a>00897 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00898"></a>00898 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00899"></a>00899
<a name="l00900"></a>00900 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00901"></a>00901 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00902"></a>00902 <a class="code" href="RtAudio_8h.html#a0">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00903"></a>00903 <a class="code" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options );
<a name="l00904"></a>00904 };
<a name="l00905"></a>00905
<a name="l00906"></a>00906 <span class="preprocessor">#endif</span>
<a name="l00907"></a>00907 <span class="preprocessor"></span>
<a name="l00908"></a>00908 <span class="preprocessor">#if defined(__RTAUDIO_DUMMY__)</span>
<a name="l00900"></a>00900 <span class="keyword">private</span>:
<a name="l00901"></a>00901
<a name="l00902"></a>00902 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00903"></a>00903 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00904"></a>00904 <a class="code" href="RtAudio_8h.html#a0">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00905"></a>00905 <a class="code" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options );
<a name="l00906"></a>00906 };
<a name="l00907"></a>00907
<a name="l00908"></a>00908 <span class="preprocessor">#endif</span>
<a name="l00909"></a>00909 <span class="preprocessor"></span>
<a name="l00910"></a>00910 <span class="keyword">class </span>RtApiDummy: <span class="keyword">public</span> RtApi
<a name="l00911"></a>00911 {
<a name="l00912"></a>00912 <span class="keyword">public</span>:
<a name="l00913"></a>00913
<a name="l00914"></a>00914 RtApiDummy() { errorText_ = <span class="stringliteral">"RtApiDummy: This class provides no functionality."</span>; error( WARNING ); };
<a name="l00915"></a>00915 <a class="code" href="classRtAudio.html#w8">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#w8w7">RtAudio::RTAUDIO_DUMMY</a>; };
<a name="l00916"></a>00916 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> 0; };
<a name="l00917"></a>00917 <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device ) { <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> info; <span class="keywordflow">return</span> info; };
<a name="l00918"></a>00918 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> ) {};
<a name="l00919"></a>00919 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> ) {};
<a name="l00920"></a>00920 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> ) {};
<a name="l00921"></a>00921 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> ) {};
<a name="l00922"></a>00922
<a name="l00923"></a>00923 <span class="keyword">private</span>:
<a name="l00910"></a>00910 <span class="preprocessor">#if defined(__RTAUDIO_DUMMY__)</span>
<a name="l00911"></a>00911 <span class="preprocessor"></span>
<a name="l00912"></a>00912 <span class="keyword">class </span>RtApiDummy: <span class="keyword">public</span> RtApi
<a name="l00913"></a>00913 {
<a name="l00914"></a>00914 <span class="keyword">public</span>:
<a name="l00915"></a>00915
<a name="l00916"></a>00916 RtApiDummy() { errorText_ = <span class="stringliteral">"RtApiDummy: This class provides no functionality."</span>; error( <a class="code" href="classRtError.html#w11w0">RtError::WARNING</a> ); };
<a name="l00917"></a>00917 <a class="code" href="classRtAudio.html#w8">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#w8w7">RtAudio::RTAUDIO_DUMMY</a>; };
<a name="l00918"></a>00918 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> 0; };
<a name="l00919"></a>00919 <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device ) { <a class="code" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> info; <span class="keywordflow">return</span> info; };
<a name="l00920"></a>00920 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> ) {};
<a name="l00921"></a>00921 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> ) {};
<a name="l00922"></a>00922 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> ) {};
<a name="l00923"></a>00923 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> ) {};
<a name="l00924"></a>00924
<a name="l00925"></a>00925 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00926"></a>00926 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00927"></a>00927 <a class="code" href="RtAudio_8h.html#a0">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00928"></a>00928 <a class="code" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options ) { <span class="keywordflow">return</span> <span class="keyword">false</span>; };
<a name="l00929"></a>00929 };
<a name="l00930"></a>00930
<a name="l00931"></a>00931 <span class="preprocessor">#endif</span>
<a name="l00932"></a>00932 <span class="preprocessor"></span>
<a name="l00925"></a>00925 <span class="keyword">private</span>:
<a name="l00926"></a>00926
<a name="l00927"></a>00927 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00928"></a>00928 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00929"></a>00929 <a class="code" href="RtAudio_8h.html#a0">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00930"></a>00930 <a class="code" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options ) { <span class="keywordflow">return</span> <span class="keyword">false</span>; };
<a name="l00931"></a>00931 };
<a name="l00932"></a>00932
<a name="l00933"></a>00933 <span class="preprocessor">#endif</span>
<a name="l00934"></a>00934 <span class="preprocessor"></span>
<a name="l00935"></a>00935 <span class="comment">// Indentation settings for Vim and Emacs</span>
<a name="l00936"></a>00936 <span class="comment">//</span>
<a name="l00937"></a>00937 <span class="comment">// Local Variables:</span>
<a name="l00938"></a>00938 <span class="comment">// c-basic-offset: 2</span>
<a name="l00939"></a>00939 <span class="comment">// indent-tabs-mode: nil</span>
<a name="l00940"></a>00940 <span class="comment">// End:</span>
<a name="l00941"></a>00941 <span class="comment">//</span>
<a name="l00942"></a>00942 <span class="comment">// vim: et sts=2 sw=2</span>
<a name="l00935"></a>00935 <span class="preprocessor">#endif</span>
<a name="l00936"></a>00936 <span class="preprocessor"></span>
<a name="l00937"></a>00937 <span class="comment">// Indentation settings for Vim and Emacs</span>
<a name="l00938"></a>00938 <span class="comment">//</span>
<a name="l00939"></a>00939 <span class="comment">// Local Variables:</span>
<a name="l00940"></a>00940 <span class="comment">// c-basic-offset: 2</span>
<a name="l00941"></a>00941 <span class="comment">// indent-tabs-mode: nil</span>
<a name="l00942"></a>00942 <span class="comment">// End:</span>
<a name="l00943"></a>00943 <span class="comment">//</span>
<a name="l00944"></a>00944 <span class="comment">// vim: et sts=2 sw=2</span>
</pre></div><HR>
<table>

View File

@@ -14,7 +14,7 @@
<h1>RtMidi.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/**********************************************************************/</span>
<a name="l00036"></a>00036 <span class="comment">/**********************************************************************/</span>
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <span class="comment">// RtMidi: Version 1.0.5, in development</span>
<a name="l00038"></a>00038 <span class="comment">// RtMidi: Version 1.0.7</span>
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="preprocessor">#ifndef RTMIDI_H</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define RTMIDI_H</span>

View File

@@ -12,246 +12,246 @@
<div class="nav">
<a class="el" href="dir_000000.html">include</a></div>
<h1>Stk.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/***************************************************/</span>
<a name="l00037"></a>00037 <span class="comment">/***************************************************/</span>
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="preprocessor">#ifndef STK_STK_H</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define STK_STK_H</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00044"></a>00044 <span class="preprocessor">#include &lt;sstream&gt;</span>
<a name="l00045"></a>00045 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00046"></a>00046
<a name="l00047"></a>00047 <span class="comment">// Most data in STK is passed and calculated with the</span>
<a name="l00048"></a>00048 <span class="comment">// following user-definable floating-point type. You</span>
<a name="l00049"></a>00049 <span class="comment">// can change this to "float" if you prefer or perhaps</span>
<a name="l00050"></a>00050 <span class="comment">// a "long double" in the future.</span>
<a name="l00051"></a>00051 <span class="keyword">typedef</span> <span class="keywordtype">double</span> StkFloat;
<a name="l00051"></a>00051 <span class="comment">/***************************************************/</span>
<a name="l00052"></a>00052
<a name="l00054"></a>00054
<a name="l00059"></a><a class="code" href="classStkError.html">00059</a> <span class="keyword">class </span><a class="code" href="classStkError.html">StkError</a>
<a name="l00060"></a>00060 {
<a name="l00061"></a>00061 <span class="keyword">public</span>:
<a name="l00062"></a>00062 <span class="keyword">enum</span> Type {
<a name="l00063"></a>00063 STATUS,
<a name="l00064"></a>00064 WARNING,
<a name="l00065"></a>00065 DEBUG_WARNING,
<a name="l00066"></a>00066 MEMORY_ALLOCATION,
<a name="l00067"></a>00067 MEMORY_ACCESS,
<a name="l00068"></a>00068 FUNCTION_ARGUMENT,
<a name="l00069"></a>00069 FILE_NOT_FOUND,
<a name="l00070"></a>00070 FILE_UNKNOWN_FORMAT,
<a name="l00071"></a>00071 FILE_ERROR,
<a name="l00072"></a>00072 PROCESS_THREAD,
<a name="l00073"></a>00073 PROCESS_SOCKET,
<a name="l00074"></a>00074 PROCESS_SOCKET_IPADDR,
<a name="l00075"></a>00075 AUDIO_SYSTEM,
<a name="l00076"></a>00076 MIDI_SYSTEM,
<a name="l00077"></a>00077 UNSPECIFIED
<a name="l00078"></a>00078 };
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <span class="keyword">protected</span>:
<a name="l00081"></a>00081 std::string message_;
<a name="l00082"></a>00082 Type type_;
<a name="l00083"></a>00083
<a name="l00084"></a>00084 <span class="keyword">public</span>:
<a name="l00086"></a><a class="code" href="classStkError.html#a0">00086</a> <a class="code" href="classStkError.html#a0">StkError</a>(<span class="keyword">const</span> std::string&amp; message, Type type = StkError::UNSPECIFIED)
<a name="l00087"></a>00087 : message_(message), type_(type) {}
<a name="l00088"></a>00088
<a name="l00090"></a><a class="code" href="classStkError.html#a1">00090</a> <span class="keyword">virtual</span> <a class="code" href="classStkError.html#a1">~StkError</a>(<span class="keywordtype">void</span>) {};
<a name="l00091"></a>00091
<a name="l00093"></a><a class="code" href="classStkError.html#a2">00093</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classStkError.html#a2">printMessage</a>(<span class="keywordtype">void</span>) { std::cerr &lt;&lt; <span class="charliteral">'\n'</span> &lt;&lt; message_ &lt;&lt; <span class="stringliteral">"\n\n"</span>; }
<a name="l00094"></a>00094
<a name="l00096"></a><a class="code" href="classStkError.html#a3">00096</a> <span class="keyword">virtual</span> <span class="keyword">const</span> Type&amp; <a class="code" href="classStkError.html#a3">getType</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> type_; }
<a name="l00053"></a>00053 <span class="preprocessor">#ifndef STK_STK_H</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#define STK_STK_H</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>
<a name="l00056"></a>00056 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00057"></a>00057 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00058"></a>00058 <span class="preprocessor">#include &lt;sstream&gt;</span>
<a name="l00059"></a>00059 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00060"></a>00060
<a name="l00061"></a>00061 <span class="comment">// Most data in STK is passed and calculated with the</span>
<a name="l00062"></a>00062 <span class="comment">// following user-definable floating-point type. You</span>
<a name="l00063"></a>00063 <span class="comment">// can change this to "float" if you prefer or perhaps</span>
<a name="l00064"></a>00064 <span class="comment">// a "long double" in the future.</span>
<a name="l00065"></a>00065 <span class="keyword">typedef</span> <span class="keywordtype">double</span> StkFloat;
<a name="l00066"></a>00066
<a name="l00068"></a>00068
<a name="l00073"></a><a class="code" href="classStkError.html">00073</a> <span class="keyword">class </span><a class="code" href="classStkError.html">StkError</a>
<a name="l00074"></a>00074 {
<a name="l00075"></a>00075 <span class="keyword">public</span>:
<a name="l00076"></a>00076 <span class="keyword">enum</span> Type {
<a name="l00077"></a>00077 STATUS,
<a name="l00078"></a>00078 WARNING,
<a name="l00079"></a>00079 DEBUG_WARNING,
<a name="l00080"></a>00080 MEMORY_ALLOCATION,
<a name="l00081"></a>00081 MEMORY_ACCESS,
<a name="l00082"></a>00082 FUNCTION_ARGUMENT,
<a name="l00083"></a>00083 FILE_NOT_FOUND,
<a name="l00084"></a>00084 FILE_UNKNOWN_FORMAT,
<a name="l00085"></a>00085 FILE_ERROR,
<a name="l00086"></a>00086 PROCESS_THREAD,
<a name="l00087"></a>00087 PROCESS_SOCKET,
<a name="l00088"></a>00088 PROCESS_SOCKET_IPADDR,
<a name="l00089"></a>00089 AUDIO_SYSTEM,
<a name="l00090"></a>00090 MIDI_SYSTEM,
<a name="l00091"></a>00091 UNSPECIFIED
<a name="l00092"></a>00092 };
<a name="l00093"></a>00093
<a name="l00094"></a>00094 <span class="keyword">protected</span>:
<a name="l00095"></a>00095 std::string message_;
<a name="l00096"></a>00096 Type type_;
<a name="l00097"></a>00097
<a name="l00099"></a><a class="code" href="classStkError.html#a4">00099</a> <span class="keyword">virtual</span> <span class="keyword">const</span> std::string&amp; <a class="code" href="classStkError.html#a4">getMessage</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> message_; }
<a name="l00100"></a>00100
<a name="l00102"></a><a class="code" href="classStkError.html#a5">00102</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classStkError.html#a5">getMessageCString</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> message_.c_str(); }
<a name="l00103"></a>00103 };
<a name="l00104"></a>00104
<a name="l00098"></a>00098 <span class="keyword">public</span>:
<a name="l00100"></a><a class="code" href="classStkError.html#a0">00100</a> <a class="code" href="classStkError.html#a0">StkError</a>(<span class="keyword">const</span> std::string&amp; message, Type type = StkError::UNSPECIFIED)
<a name="l00101"></a>00101 : message_(message), type_(type) {}
<a name="l00102"></a>00102
<a name="l00104"></a><a class="code" href="classStkError.html#a1">00104</a> <span class="keyword">virtual</span> <a class="code" href="classStkError.html#a1">~StkError</a>(<span class="keywordtype">void</span>) {};
<a name="l00105"></a>00105
<a name="l00106"></a><a class="code" href="classStk.html">00106</a> <span class="keyword">class </span><a class="code" href="classStk.html">Stk</a>
<a name="l00107"></a>00107 {
<a name="l00108"></a>00108 <span class="keyword">public</span>:
<a name="l00109"></a>00109
<a name="l00110"></a>00110 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> StkFormat;
<a name="l00111"></a><a class="code" href="classStk.html#s0">00111</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s0">STK_SINT8</a>;
<a name="l00112"></a><a class="code" href="classStk.html#s1">00112</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s1">STK_SINT16</a>;
<a name="l00113"></a><a class="code" href="classStk.html#s2">00113</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s2">STK_SINT24</a>;
<a name="l00114"></a><a class="code" href="classStk.html#s3">00114</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s3">STK_SINT32</a>;
<a name="l00115"></a><a class="code" href="classStk.html#s4">00115</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s4">STK_FLOAT32</a>;
<a name="l00116"></a><a class="code" href="classStk.html#s5">00116</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s5">STK_FLOAT64</a>;
<a name="l00107"></a><a class="code" href="classStkError.html#a2">00107</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classStkError.html#a2">printMessage</a>(<span class="keywordtype">void</span>) { std::cerr &lt;&lt; <span class="charliteral">'\n'</span> &lt;&lt; message_ &lt;&lt; <span class="stringliteral">"\n\n"</span>; }
<a name="l00108"></a>00108
<a name="l00110"></a><a class="code" href="classStkError.html#a3">00110</a> <span class="keyword">virtual</span> <span class="keyword">const</span> Type&amp; <a class="code" href="classStkError.html#a3">getType</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> type_; }
<a name="l00111"></a>00111
<a name="l00113"></a><a class="code" href="classStkError.html#a4">00113</a> <span class="keyword">virtual</span> <span class="keyword">const</span> std::string&amp; <a class="code" href="classStkError.html#a4">getMessage</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> message_; }
<a name="l00114"></a>00114
<a name="l00116"></a><a class="code" href="classStkError.html#a5">00116</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classStkError.html#a5">getMessageCString</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> message_.c_str(); }
<a name="l00117"></a>00117 };
<a name="l00118"></a>00118
<a name="l00119"></a><a class="code" href="classStk.html#e0">00119</a> <span class="keyword">static</span> StkFloat <a class="code" href="classStk.html#e0">sampleRate</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> srate_; }
<a name="l00120"></a>00120
<a name="l00122"></a>00122
<a name="l00139"></a>00139 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e1">setSampleRate</a>( StkFloat rate );
<a name="l00140"></a>00140
<a name="l00142"></a>00142
<a name="l00147"></a><a class="code" href="classStk.html#a0">00147</a> <span class="keywordtype">void</span> <a class="code" href="classStk.html#a0">ignoreSampleRateChange</a>( <span class="keywordtype">bool</span> ignore = <span class="keyword">true</span> ) { ignoreSampleRateChange_ = ignore; };
<a name="l00148"></a>00148
<a name="l00150"></a><a class="code" href="classStk.html#e2">00150</a> <span class="keyword">static</span> std::string <a class="code" href="classStk.html#e2">rawwavePath</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> rawwavepath_; }
<a name="l00151"></a>00151
<a name="l00153"></a>00153 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e3">setRawwavePath</a>( std::string path );
<a name="l00119"></a>00119
<a name="l00120"></a><a class="code" href="classStk.html">00120</a> <span class="keyword">class </span><a class="code" href="classStk.html">Stk</a>
<a name="l00121"></a>00121 {
<a name="l00122"></a>00122 <span class="keyword">public</span>:
<a name="l00123"></a>00123
<a name="l00124"></a>00124 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> StkFormat;
<a name="l00125"></a><a class="code" href="classStk.html#s0">00125</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s0">STK_SINT8</a>;
<a name="l00126"></a><a class="code" href="classStk.html#s1">00126</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s1">STK_SINT16</a>;
<a name="l00127"></a><a class="code" href="classStk.html#s2">00127</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s2">STK_SINT24</a>;
<a name="l00128"></a><a class="code" href="classStk.html#s3">00128</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s3">STK_SINT32</a>;
<a name="l00129"></a><a class="code" href="classStk.html#s4">00129</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s4">STK_FLOAT32</a>;
<a name="l00130"></a><a class="code" href="classStk.html#s5">00130</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classStk.html#s5">STK_FLOAT64</a>;
<a name="l00132"></a>00132
<a name="l00133"></a><a class="code" href="classStk.html#e0">00133</a> <span class="keyword">static</span> StkFloat <a class="code" href="classStk.html#e0">sampleRate</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> srate_; }
<a name="l00134"></a>00134
<a name="l00136"></a>00136
<a name="l00153"></a>00153 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e1">setSampleRate</a>( StkFloat rate );
<a name="l00154"></a>00154
<a name="l00156"></a>00156 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e4">swap16</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *ptr );
<a name="l00157"></a>00157
<a name="l00159"></a>00159 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e5">swap32</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *ptr );
<a name="l00160"></a>00160
<a name="l00162"></a>00162 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e6">swap64</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *ptr );
<a name="l00163"></a>00163
<a name="l00165"></a>00165 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e7">sleep</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> milliseconds );
<a name="l00166"></a>00166
<a name="l00168"></a>00168 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e8">handleError</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *message, StkError::Type type );
<a name="l00169"></a>00169
<a name="l00171"></a>00171 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e8">handleError</a>( std::string message, StkError::Type type );
<a name="l00172"></a>00172
<a name="l00174"></a><a class="code" href="classStk.html#e10">00174</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e10">showWarnings</a>( <span class="keywordtype">bool</span> status ) { showWarnings_ = status; }
<a name="l00175"></a>00175
<a name="l00177"></a><a class="code" href="classStk.html#e11">00177</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e11">printErrors</a>( <span class="keywordtype">bool</span> status ) { printErrors_ = status; }
<a name="l00178"></a>00178
<a name="l00179"></a>00179 <span class="keyword">private</span>:
<a name="l00180"></a>00180 <span class="keyword">static</span> StkFloat srate_;
<a name="l00181"></a>00181 <span class="keyword">static</span> std::string rawwavepath_;
<a name="l00182"></a>00182 <span class="keyword">static</span> <span class="keywordtype">bool</span> showWarnings_;
<a name="l00183"></a>00183 <span class="keyword">static</span> <span class="keywordtype">bool</span> printErrors_;
<a name="l00184"></a>00184 <span class="keyword">static</span> std::vector&lt;Stk *&gt; alertList_;
<a name="l00185"></a>00185
<a name="l00186"></a>00186 <span class="keyword">protected</span>:
<a name="l00187"></a>00187
<a name="l00188"></a>00188 std::ostringstream errorString_;
<a name="l00189"></a>00189 <span class="keywordtype">bool</span> ignoreSampleRateChange_;
<a name="l00190"></a>00190
<a name="l00192"></a>00192 <a class="code" href="classStk.html#b0">Stk</a>( <span class="keywordtype">void</span> );
<a name="l00193"></a>00193
<a name="l00195"></a>00195 <span class="keyword">virtual</span> <a class="code" href="classStk.html#b1">~Stk</a>( <span class="keywordtype">void</span> );
<a name="l00196"></a>00196
<a name="l00198"></a>00198 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#b2">sampleRateChanged</a>( StkFloat newRate, StkFloat oldRate );
<a name="l00156"></a>00156
<a name="l00161"></a><a class="code" href="classStk.html#a0">00161</a> <span class="keywordtype">void</span> <a class="code" href="classStk.html#a0">ignoreSampleRateChange</a>( <span class="keywordtype">bool</span> ignore = <span class="keyword">true</span> ) { ignoreSampleRateChange_ = ignore; };
<a name="l00162"></a>00162
<a name="l00164"></a><a class="code" href="classStk.html#e2">00164</a> <span class="keyword">static</span> std::string <a class="code" href="classStk.html#e2">rawwavePath</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> rawwavepath_; }
<a name="l00165"></a>00165
<a name="l00167"></a>00167 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e3">setRawwavePath</a>( std::string path );
<a name="l00168"></a>00168
<a name="l00170"></a>00170 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e4">swap16</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *ptr );
<a name="l00171"></a>00171
<a name="l00173"></a>00173 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e5">swap32</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *ptr );
<a name="l00174"></a>00174
<a name="l00176"></a>00176 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e6">swap64</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *ptr );
<a name="l00177"></a>00177
<a name="l00179"></a>00179 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e7">sleep</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> milliseconds );
<a name="l00180"></a>00180
<a name="l00182"></a>00182 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e8">handleError</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *message, StkError::Type type );
<a name="l00183"></a>00183
<a name="l00185"></a>00185 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e8">handleError</a>( std::string message, StkError::Type type );
<a name="l00186"></a>00186
<a name="l00188"></a><a class="code" href="classStk.html#e10">00188</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e10">showWarnings</a>( <span class="keywordtype">bool</span> status ) { showWarnings_ = status; }
<a name="l00189"></a>00189
<a name="l00191"></a><a class="code" href="classStk.html#e11">00191</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#e11">printErrors</a>( <span class="keywordtype">bool</span> status ) { printErrors_ = status; }
<a name="l00192"></a>00192
<a name="l00193"></a>00193 <span class="keyword">private</span>:
<a name="l00194"></a>00194 <span class="keyword">static</span> StkFloat srate_;
<a name="l00195"></a>00195 <span class="keyword">static</span> std::string rawwavepath_;
<a name="l00196"></a>00196 <span class="keyword">static</span> <span class="keywordtype">bool</span> showWarnings_;
<a name="l00197"></a>00197 <span class="keyword">static</span> <span class="keywordtype">bool</span> printErrors_;
<a name="l00198"></a>00198 <span class="keyword">static</span> std::vector&lt;Stk *&gt; alertList_;
<a name="l00199"></a>00199
<a name="l00201"></a>00201 <span class="keywordtype">void</span> <a class="code" href="classStk.html#b3">addSampleRateAlert</a>( <a class="code" href="classStk.html">Stk</a> *ptr );
<a name="l00202"></a>00202
<a name="l00204"></a>00204 <span class="keywordtype">void</span> <a class="code" href="classStk.html#b4">removeSampleRateAlert</a>( <a class="code" href="classStk.html">Stk</a> *ptr );
<a name="l00205"></a>00205
<a name="l00207"></a>00207 <span class="keywordtype">void</span> <a class="code" href="classStk.html#e8">handleError</a>( StkError::Type type );
<a name="l00208"></a>00208 };
<a name="l00209"></a>00209
<a name="l00200"></a>00200 <span class="keyword">protected</span>:
<a name="l00201"></a>00201
<a name="l00202"></a>00202 std::ostringstream errorString_;
<a name="l00203"></a>00203 <span class="keywordtype">bool</span> ignoreSampleRateChange_;
<a name="l00204"></a>00204
<a name="l00206"></a>00206 <a class="code" href="classStk.html#b0">Stk</a>( <span class="keywordtype">void</span> );
<a name="l00207"></a>00207
<a name="l00209"></a>00209 <span class="keyword">virtual</span> <a class="code" href="classStk.html#b1">~Stk</a>( <span class="keywordtype">void</span> );
<a name="l00210"></a>00210
<a name="l00211"></a>00211 <span class="comment">/***************************************************/</span>
<a name="l00226"></a>00226 <span class="comment">/***************************************************/</span>
<a name="l00227"></a>00227
<a name="l00228"></a><a class="code" href="classStkFrames.html">00228</a> <span class="keyword">class </span><a class="code" href="classStkFrames.html">StkFrames</a>
<a name="l00229"></a>00229 {
<a name="l00230"></a>00230 <span class="keyword">public</span>:
<a name="l00231"></a>00231
<a name="l00233"></a>00233 <a class="code" href="classStkFrames.html#a0">StkFrames</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nFrames = 0, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 0, <span class="keywordtype">bool</span> <a class="code" href="classStkFrames.html#a16">interleaved</a> = <span class="keyword">true</span> );
<a name="l00234"></a>00234
<a name="l00236"></a>00236 <a class="code" href="classStkFrames.html#a0">StkFrames</a>( <span class="keyword">const</span> StkFloat&amp; value, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nFrames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels, <span class="keywordtype">bool</span> <a class="code" href="classStkFrames.html#a16">interleaved</a> = <span class="keyword">true</span> );
<a name="l00237"></a>00237
<a name="l00239"></a>00239 <a class="code" href="classStkFrames.html#a2">~StkFrames</a>();
<a name="l00240"></a>00240
<a name="l00242"></a>00242
<a name="l00248"></a>00248 StkFloat&amp; <a class="code" href="classStkFrames.html#a3">operator[] </a>( size_t n );
<a name="l00249"></a>00249
<a name="l00212"></a>00212 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classStk.html#b2">sampleRateChanged</a>( StkFloat newRate, StkFloat oldRate );
<a name="l00213"></a>00213
<a name="l00215"></a>00215 <span class="keywordtype">void</span> <a class="code" href="classStk.html#b3">addSampleRateAlert</a>( <a class="code" href="classStk.html">Stk</a> *ptr );
<a name="l00216"></a>00216
<a name="l00218"></a>00218 <span class="keywordtype">void</span> <a class="code" href="classStk.html#b4">removeSampleRateAlert</a>( <a class="code" href="classStk.html">Stk</a> *ptr );
<a name="l00219"></a>00219
<a name="l00221"></a>00221 <span class="keywordtype">void</span> <a class="code" href="classStk.html#e8">handleError</a>( StkError::Type type );
<a name="l00222"></a>00222 };
<a name="l00223"></a>00223
<a name="l00224"></a>00224
<a name="l00225"></a>00225 <span class="comment">/***************************************************/</span>
<a name="l00240"></a>00240 <span class="comment">/***************************************************/</span>
<a name="l00241"></a>00241
<a name="l00242"></a><a class="code" href="classStkFrames.html">00242</a> <span class="keyword">class </span><a class="code" href="classStkFrames.html">StkFrames</a>
<a name="l00243"></a>00243 {
<a name="l00244"></a>00244 <span class="keyword">public</span>:
<a name="l00245"></a>00245
<a name="l00247"></a>00247 <a class="code" href="classStkFrames.html#a0">StkFrames</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nFrames = 0, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 0, <span class="keywordtype">bool</span> <a class="code" href="classStkFrames.html#a16">interleaved</a> = <span class="keyword">true</span> );
<a name="l00248"></a>00248
<a name="l00250"></a>00250 <a class="code" href="classStkFrames.html#a0">StkFrames</a>( <span class="keyword">const</span> StkFloat&amp; value, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nFrames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels, <span class="keywordtype">bool</span> <a class="code" href="classStkFrames.html#a16">interleaved</a> = <span class="keyword">true</span> );
<a name="l00251"></a>00251
<a name="l00255"></a>00255 StkFloat <a class="code" href="classStkFrames.html#a3">operator[] </a>( size_t n ) <span class="keyword">const</span>;
<a name="l00253"></a>00253 <a class="code" href="classStkFrames.html#a2">~StkFrames</a>();
<a name="l00254"></a>00254
<a name="l00256"></a>00256
<a name="l00258"></a>00258
<a name="l00265"></a>00265 StkFloat&amp; <a class="code" href="classStkFrames.html#a5">operator() </a>( size_t frame, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel );
<a name="l00266"></a>00266
<a name="l00268"></a>00268
<a name="l00273"></a>00273 StkFloat <a class="code" href="classStkFrames.html#a5">operator() </a>( size_t frame, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel ) <span class="keyword">const</span>;
<a name="l00274"></a>00274
<a name="l00276"></a>00276
<a name="l00282"></a>00282 StkFloat <a class="code" href="classStkFrames.html#a7">interpolate</a>( StkFloat frame, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 0 ) <span class="keyword">const</span>;
<a name="l00283"></a>00283
<a name="l00285"></a><a class="code" href="classStkFrames.html#a8">00285</a> size_t <a class="code" href="classStkFrames.html#a8">size</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> size_; };
<a name="l00286"></a>00286
<a name="l00288"></a>00288 <span class="keywordtype">bool</span> <a class="code" href="classStkFrames.html#a9">empty</a>() <span class="keyword">const</span>;
<a name="l00289"></a>00289
<a name="l00291"></a>00291
<a name="l00298"></a>00298 <span class="keywordtype">void</span> <a class="code" href="classStkFrames.html#a10">resize</a>( size_t nFrames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1 );
<a name="l00299"></a>00299
<a name="l00301"></a>00301
<a name="l00308"></a>00308 <span class="keywordtype">void</span> <a class="code" href="classStkFrames.html#a10">resize</a>( size_t nFrames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels, StkFloat value );
<a name="l00309"></a>00309
<a name="l00311"></a><a class="code" href="classStkFrames.html#a12">00311</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classStkFrames.html#a12">channels</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> nChannels_; };
<a name="l00312"></a>00312
<a name="l00314"></a><a class="code" href="classStkFrames.html#a13">00314</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classStkFrames.html#a13">frames</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> nFrames_; };
<a name="l00262"></a>00262 StkFloat&amp; <a class="code" href="classStkFrames.html#a3">operator[] </a>( size_t n );
<a name="l00263"></a>00263
<a name="l00265"></a>00265
<a name="l00269"></a>00269 StkFloat <a class="code" href="classStkFrames.html#a3">operator[] </a>( size_t n ) <span class="keyword">const</span>;
<a name="l00270"></a>00270
<a name="l00272"></a>00272
<a name="l00279"></a>00279 StkFloat&amp; <a class="code" href="classStkFrames.html#a5">operator() </a>( size_t frame, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel );
<a name="l00280"></a>00280
<a name="l00282"></a>00282
<a name="l00287"></a>00287 StkFloat <a class="code" href="classStkFrames.html#a5">operator() </a>( size_t frame, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel ) <span class="keyword">const</span>;
<a name="l00288"></a>00288
<a name="l00290"></a>00290
<a name="l00296"></a>00296 StkFloat <a class="code" href="classStkFrames.html#a7">interpolate</a>( StkFloat frame, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 0 ) <span class="keyword">const</span>;
<a name="l00297"></a>00297
<a name="l00299"></a><a class="code" href="classStkFrames.html#a8">00299</a> size_t <a class="code" href="classStkFrames.html#a8">size</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> size_; };
<a name="l00300"></a>00300
<a name="l00302"></a>00302 <span class="keywordtype">bool</span> <a class="code" href="classStkFrames.html#a9">empty</a>() <span class="keyword">const</span>;
<a name="l00303"></a>00303
<a name="l00305"></a>00305
<a name="l00312"></a>00312 <span class="keywordtype">void</span> <a class="code" href="classStkFrames.html#a10">resize</a>( size_t nFrames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1 );
<a name="l00313"></a>00313
<a name="l00315"></a>00315
<a name="l00317"></a>00317
<a name="l00321"></a><a class="code" href="classStkFrames.html#a14">00321</a> <span class="keywordtype">void</span> <a class="code" href="classStkFrames.html#a14">setDataRate</a>( StkFloat rate ) { dataRate_ = rate; };
<a name="l00322"></a>00322
<a name="l00324"></a>00324
<a name="l00328"></a><a class="code" href="classStkFrames.html#a15">00328</a> StkFloat <a class="code" href="classStkFrames.html#a15">dataRate</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> dataRate_; };
<a name="l00322"></a>00322 <span class="keywordtype">void</span> <a class="code" href="classStkFrames.html#a10">resize</a>( size_t nFrames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels, StkFloat value );
<a name="l00323"></a>00323
<a name="l00325"></a><a class="code" href="classStkFrames.html#a12">00325</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classStkFrames.html#a12">channels</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> nChannels_; };
<a name="l00326"></a>00326
<a name="l00328"></a><a class="code" href="classStkFrames.html#a13">00328</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classStkFrames.html#a13">frames</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> nFrames_; };
<a name="l00329"></a>00329
<a name="l00331"></a><a class="code" href="classStkFrames.html#a16">00331</a> <span class="keywordtype">bool</span> <a class="code" href="classStkFrames.html#a16">interleaved</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> interleaved_; };
<a name="l00332"></a>00332
<a name="l00334"></a>00334
<a name="l00339"></a><a class="code" href="classStkFrames.html#a17">00339</a> <span class="keywordtype">void</span> <a class="code" href="classStkFrames.html#a17">setInterleaved</a>( <span class="keywordtype">bool</span> isInterleaved ) { interleaved_ = isInterleaved; };
<a name="l00340"></a>00340
<a name="l00341"></a>00341 <span class="keyword">private</span>:
<a name="l00342"></a>00342
<a name="l00343"></a>00343 StkFloat *data_;
<a name="l00344"></a>00344 StkFloat dataRate_;
<a name="l00345"></a>00345 size_t nFrames_;
<a name="l00346"></a>00346 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels_;
<a name="l00347"></a>00347 size_t size_;
<a name="l00348"></a>00348 size_t bufferSize_;
<a name="l00349"></a>00349 <span class="keywordtype">bool</span> interleaved_;
<a name="l00350"></a>00350
<a name="l00351"></a>00351 };
<a name="l00352"></a>00352
<a name="l00353"></a>00353
<a name="l00354"></a>00354 <span class="comment">// Here are a few other useful typedefs.</span>
<a name="l00355"></a>00355 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> UINT16;
<a name="l00356"></a>00356 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> UINT32;
<a name="l00357"></a>00357 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> SINT16;
<a name="l00358"></a>00358 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">int</span> SINT32;
<a name="l00359"></a>00359 <span class="keyword">typedef</span> <span class="keywordtype">float</span> FLOAT32;
<a name="l00360"></a>00360 <span class="keyword">typedef</span> <span class="keywordtype">double</span> FLOAT64;
<a name="l00361"></a>00361
<a name="l00362"></a>00362 <span class="comment">// The default sampling rate.</span>
<a name="l00363"></a>00363 <span class="keyword">const</span> StkFloat SRATE = 44100.0;
<a name="l00331"></a>00331
<a name="l00335"></a><a class="code" href="classStkFrames.html#a14">00335</a> <span class="keywordtype">void</span> <a class="code" href="classStkFrames.html#a14">setDataRate</a>( StkFloat rate ) { dataRate_ = rate; };
<a name="l00336"></a>00336
<a name="l00338"></a>00338
<a name="l00342"></a><a class="code" href="classStkFrames.html#a15">00342</a> StkFloat <a class="code" href="classStkFrames.html#a15">dataRate</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> dataRate_; };
<a name="l00343"></a>00343
<a name="l00345"></a><a class="code" href="classStkFrames.html#a16">00345</a> <span class="keywordtype">bool</span> <a class="code" href="classStkFrames.html#a16">interleaved</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> interleaved_; };
<a name="l00346"></a>00346
<a name="l00348"></a>00348
<a name="l00353"></a><a class="code" href="classStkFrames.html#a17">00353</a> <span class="keywordtype">void</span> <a class="code" href="classStkFrames.html#a17">setInterleaved</a>( <span class="keywordtype">bool</span> isInterleaved ) { interleaved_ = isInterleaved; };
<a name="l00354"></a>00354
<a name="l00355"></a>00355 <span class="keyword">private</span>:
<a name="l00356"></a>00356
<a name="l00357"></a>00357 StkFloat *data_;
<a name="l00358"></a>00358 StkFloat dataRate_;
<a name="l00359"></a>00359 size_t nFrames_;
<a name="l00360"></a>00360 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels_;
<a name="l00361"></a>00361 size_t size_;
<a name="l00362"></a>00362 size_t bufferSize_;
<a name="l00363"></a>00363 <span class="keywordtype">bool</span> interleaved_;
<a name="l00364"></a>00364
<a name="l00365"></a>00365 <span class="comment">// The default real-time audio input and output buffer size. If</span>
<a name="l00366"></a>00366 <span class="comment">// clicks are occuring in the input and/or output sound stream, a</span>
<a name="l00367"></a>00367 <span class="comment">// larger buffer size may help. Larger buffer sizes, however, produce</span>
<a name="l00368"></a>00368 <span class="comment">// more latency.</span>
<a name="l00369"></a>00369 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> RT_BUFFER_SIZE = 512;
<a name="l00370"></a>00370
<a name="l00371"></a>00371 <span class="comment">// The default rawwave path value is set with the preprocessor</span>
<a name="l00372"></a>00372 <span class="comment">// definition RAWWAVE_PATH. This can be specified as an argument to</span>
<a name="l00373"></a>00373 <span class="comment">// the configure script, in an integrated development environment, or</span>
<a name="l00374"></a>00374 <span class="comment">// below. The global STK rawwave path variable can be dynamically set</span>
<a name="l00375"></a>00375 <span class="comment">// with the Stk::setRawwavePath() function. This value is</span>
<a name="l00376"></a>00376 <span class="comment">// concatenated to the beginning of all references to rawwave files in</span>
<a name="l00377"></a>00377 <span class="comment">// the various STK core classes (ex. Clarinet.cpp). If you wish to</span>
<a name="l00378"></a>00378 <span class="comment">// move the rawwaves directory to a different location in your file</span>
<a name="l00379"></a>00379 <span class="comment">// system, you will need to set this path definition appropriately.</span>
<a name="l00380"></a>00380 <span class="preprocessor">#if !defined(RAWWAVE_PATH)</span>
<a name="l00381"></a>00381 <span class="preprocessor"></span><span class="preprocessor"> #define RAWWAVE_PATH "../../rawwaves/"</span>
<a name="l00382"></a>00382 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00383"></a>00383 <span class="preprocessor"></span>
<a name="l00384"></a>00384 <span class="keyword">const</span> StkFloat PI = 3.14159265358979;
<a name="l00385"></a>00385 <span class="keyword">const</span> StkFloat TWO_PI = 2 * PI;
<a name="l00386"></a>00386 <span class="keyword">const</span> StkFloat ONE_OVER_128 = 0.0078125;
<a name="l00387"></a>00387
<a name="l00388"></a>00388 <span class="preprocessor">#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_MM__)</span>
<a name="l00389"></a>00389 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_WINDOWS__</span>
<a name="l00390"></a>00390 <span class="preprocessor"></span><span class="preprocessor"> #define __STK_REALTIME__</span>
<a name="l00391"></a>00391 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__LINUX_OSS__) || defined(__LINUX_ALSA__) || defined(__UNIX_JACK__)</span>
<a name="l00392"></a>00392 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_LINUX__</span>
<a name="l00393"></a>00393 <span class="preprocessor"></span><span class="preprocessor"> #define __STK_REALTIME__</span>
<a name="l00394"></a>00394 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__IRIX_AL__)</span>
<a name="l00395"></a>00395 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_IRIX__</span>
<a name="l00396"></a>00396 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__MACOSX_CORE__) || defined(__UNIX_JACK__)</span>
<a name="l00397"></a>00397 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_MACOSX__</span>
<a name="l00398"></a>00398 <span class="preprocessor"></span><span class="preprocessor"> #define __STK_REALTIME__</span>
<a name="l00399"></a>00399 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00400"></a>00400 <span class="preprocessor"></span>
<a name="l00401"></a>00401 <span class="comment">//#define _STK_DEBUG_</span>
<a name="l00402"></a>00402
<a name="l00403"></a>00403 <span class="preprocessor">#endif</span>
<a name="l00365"></a>00365 };
<a name="l00366"></a>00366
<a name="l00367"></a>00367
<a name="l00368"></a>00368 <span class="comment">// Here are a few other useful typedefs.</span>
<a name="l00369"></a>00369 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> UINT16;
<a name="l00370"></a>00370 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> UINT32;
<a name="l00371"></a>00371 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> SINT16;
<a name="l00372"></a>00372 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">int</span> SINT32;
<a name="l00373"></a>00373 <span class="keyword">typedef</span> <span class="keywordtype">float</span> FLOAT32;
<a name="l00374"></a>00374 <span class="keyword">typedef</span> <span class="keywordtype">double</span> FLOAT64;
<a name="l00375"></a>00375
<a name="l00376"></a>00376 <span class="comment">// The default sampling rate.</span>
<a name="l00377"></a>00377 <span class="keyword">const</span> StkFloat SRATE = 44100.0;
<a name="l00378"></a>00378
<a name="l00379"></a>00379 <span class="comment">// The default real-time audio input and output buffer size. If</span>
<a name="l00380"></a>00380 <span class="comment">// clicks are occuring in the input and/or output sound stream, a</span>
<a name="l00381"></a>00381 <span class="comment">// larger buffer size may help. Larger buffer sizes, however, produce</span>
<a name="l00382"></a>00382 <span class="comment">// more latency.</span>
<a name="l00383"></a>00383 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> RT_BUFFER_SIZE = 512;
<a name="l00384"></a>00384
<a name="l00385"></a>00385 <span class="comment">// The default rawwave path value is set with the preprocessor</span>
<a name="l00386"></a>00386 <span class="comment">// definition RAWWAVE_PATH. This can be specified as an argument to</span>
<a name="l00387"></a>00387 <span class="comment">// the configure script, in an integrated development environment, or</span>
<a name="l00388"></a>00388 <span class="comment">// below. The global STK rawwave path variable can be dynamically set</span>
<a name="l00389"></a>00389 <span class="comment">// with the Stk::setRawwavePath() function. This value is</span>
<a name="l00390"></a>00390 <span class="comment">// concatenated to the beginning of all references to rawwave files in</span>
<a name="l00391"></a>00391 <span class="comment">// the various STK core classes (ex. Clarinet.cpp). If you wish to</span>
<a name="l00392"></a>00392 <span class="comment">// move the rawwaves directory to a different location in your file</span>
<a name="l00393"></a>00393 <span class="comment">// system, you will need to set this path definition appropriately.</span>
<a name="l00394"></a>00394 <span class="preprocessor">#if !defined(RAWWAVE_PATH)</span>
<a name="l00395"></a>00395 <span class="preprocessor"></span><span class="preprocessor"> #define RAWWAVE_PATH "../../rawwaves/"</span>
<a name="l00396"></a>00396 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00397"></a>00397 <span class="preprocessor"></span>
<a name="l00398"></a>00398 <span class="keyword">const</span> StkFloat PI = 3.14159265358979;
<a name="l00399"></a>00399 <span class="keyword">const</span> StkFloat TWO_PI = 2 * PI;
<a name="l00400"></a>00400 <span class="keyword">const</span> StkFloat ONE_OVER_128 = 0.0078125;
<a name="l00401"></a>00401
<a name="l00402"></a>00402 <span class="preprocessor">#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_MM__)</span>
<a name="l00403"></a>00403 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_WINDOWS__</span>
<a name="l00404"></a>00404 <span class="preprocessor"></span><span class="preprocessor"> #define __STK_REALTIME__</span>
<a name="l00405"></a>00405 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__LINUX_OSS__) || defined(__LINUX_ALSA__) || defined(__UNIX_JACK__)</span>
<a name="l00406"></a>00406 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_LINUX__</span>
<a name="l00407"></a>00407 <span class="preprocessor"></span><span class="preprocessor"> #define __STK_REALTIME__</span>
<a name="l00408"></a>00408 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__IRIX_AL__)</span>
<a name="l00409"></a>00409 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_IRIX__</span>
<a name="l00410"></a>00410 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__MACOSX_CORE__) || defined(__UNIX_JACK__)</span>
<a name="l00411"></a>00411 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_MACOSX__</span>
<a name="l00412"></a>00412 <span class="preprocessor"></span><span class="preprocessor"> #define __STK_REALTIME__</span>
<a name="l00413"></a>00413 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00414"></a>00414 <span class="preprocessor"></span>
<a name="l00415"></a>00415 <span class="comment">//#define _STK_DEBUG_</span>
<a name="l00416"></a>00416
<a name="l00417"></a>00417 <span class="preprocessor">#endif</span>
</pre></div><HR>
<table>

View File

@@ -15,14 +15,14 @@
<tr class="memlist"><td><a class="el" href="classFileRead.html#a4">close</a>(void)</td><td><a class="el" href="classFileRead.html">FileRead</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classFileRead.html#a8">fileRate</a>(void) const </td><td><a class="el" href="classFileRead.html">FileRead</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classFileRead.html#a0">FileRead</a>()</td><td><a class="el" href="classFileRead.html">FileRead</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classFileRead.html#a1">FileRead</a>(std::string fileName, bool typeRaw=false)</td><td><a class="el" href="classFileRead.html">FileRead</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classFileRead.html#a1">FileRead</a>(std::string fileName, bool typeRaw=false, unsigned int nChannels=1, StkFormat format=STK_SINT16, StkFloat rate=22050.0)</td><td><a class="el" href="classFileRead.html">FileRead</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classFileRead.html#a6">fileSize</a>(void) const </td><td><a class="el" href="classFileRead.html">FileRead</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classStk.html#e8">handleError</a>(const char *message, StkError::Type type)</td><td><a class="el" href="classStk.html">Stk</a></td><td><code> [static]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classStk.html#e9">handleError</a>(std::string message, StkError::Type type)</td><td><a class="el" href="classStk.html">Stk</a></td><td><code> [static]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classStk.html#b5">handleError</a>(StkError::Type type)</td><td><a class="el" href="classStk.html">Stk</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classStk.html#a0">ignoreSampleRateChange</a>(bool ignore=true)</td><td><a class="el" href="classStk.html">Stk</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classFileRead.html#a5">isOpen</a>(void)</td><td><a class="el" href="classFileRead.html">FileRead</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classFileRead.html#a3">open</a>(std::string fileName, bool typeRaw=false)</td><td><a class="el" href="classFileRead.html">FileRead</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classFileRead.html#a3">open</a>(std::string fileName, bool typeRaw=false, unsigned int nChannels=1, StkFormat format=STK_SINT16, StkFloat rate=22050.0)</td><td><a class="el" href="classFileRead.html">FileRead</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classStk.html#e11">printErrors</a>(bool status)</td><td><a class="el" href="classStk.html">Stk</a></td><td><code> [inline, static]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classStk.html#e2">rawwavePath</a>(void)</td><td><a class="el" href="classStk.html">Stk</a></td><td><code> [inline, static]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classFileRead.html#a9">read</a>(StkFrames &amp;buffer, unsigned long startFrame=0, bool doNormalize=true)</td><td><a class="el" href="classFileRead.html">FileRead</a></td><td></td></tr>

View File

@@ -31,14 +31,14 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2007.
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFileRead.html#a0">FileRead</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFileRead.html#a1">FileRead</a> (std::string fileName, bool typeRaw=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFileRead.html#a1">FileRead</a> (std::string fileName, bool typeRaw=false, unsigned int nChannels=1, StkFormat format=<a class="el" href="classStk.html#s1">STK_SINT16</a>, StkFloat rate=22050.0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Overloaded constructor that opens a file during instantiation. <a href="#a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="FileRead::~FileRead" ref="a2" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFileRead.html#a2">~FileRead</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFileRead.html#a3">open</a> (std::string fileName, bool typeRaw=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFileRead.html#a3">open</a> (std::string fileName, bool typeRaw=false, unsigned int nChannels=1, StkFormat format=<a class="el" href="classStk.html#s1">STK_SINT16</a>, StkFloat rate=22050.0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open the specified file and determine its formatting. <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4"></a><!-- doxytag: member="FileRead::close" ref="a4" args="(void)" -->
@@ -65,7 +65,7 @@ unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" hr
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read sample frames from the file into an <a class="el" href="classStkFrames.html">StkFrames</a> object. <a href="#a9"></a><br></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a1"></a><!-- doxytag: member="FileRead::FileRead" ref="a1" args="(std::string fileName, bool typeRaw=false)" --><p>
<a class="anchor" name="a1"></a><!-- doxytag: member="FileRead::FileRead" ref="a1" args="(std::string fileName, bool typeRaw=false, unsigned int nChannels=1, StkFormat format=STK_SINT16, StkFloat rate=22050.0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
@@ -80,7 +80,25 @@ unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" hr
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>bool&nbsp;</td>
<td class="mdname" nowrap> <em>typeRaw</em> = <code>false</code></td>
<td class="mdname" nowrap> <em>typeRaw</em> = <code>false</code>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int&nbsp;</td>
<td class="mdname" nowrap> <em>nChannels</em> = <code>1</code>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>StkFormat&nbsp;</td>
<td class="mdname" nowrap> <em>format</em> = <code><a class="el" href="classStk.html#s1">STK_SINT16</a></code>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>StkFloat&nbsp;</td>
<td class="mdname" nowrap> <em>rate</em> = <code>22050.0</code></td>
</tr>
<tr>
<td class="md"></td>
@@ -101,11 +119,11 @@ unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" hr
<p>
Overloaded constructor that opens a file during instantiation.
<p>
An <a class="el" href="classStkError.html">StkError</a> will be thrown if the file is not found or its format is unknown or unsupported. </td>
An <a class="el" href="classStkError.html">StkError</a> will be thrown if the file is not found or its format is unknown or unsupported. The optional arguments allow a headerless file type to be supported. If <code>typeRaw</code> is false (the default), the subsequent parameters are ignored. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a3"></a><!-- doxytag: member="FileRead::open" ref="a3" args="(std::string fileName, bool typeRaw=false)" --><p>
<a class="anchor" name="a3"></a><!-- doxytag: member="FileRead::open" ref="a3" args="(std::string fileName, bool typeRaw=false, unsigned int nChannels=1, StkFormat format=STK_SINT16, StkFloat rate=22050.0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
@@ -120,7 +138,25 @@ An <a class="el" href="classStkError.html">StkError</a> will be thrown if the fi
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>bool&nbsp;</td>
<td class="mdname" nowrap> <em>typeRaw</em> = <code>false</code></td>
<td class="mdname" nowrap> <em>typeRaw</em> = <code>false</code>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int&nbsp;</td>
<td class="mdname" nowrap> <em>nChannels</em> = <code>1</code>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>StkFormat&nbsp;</td>
<td class="mdname" nowrap> <em>format</em> = <code><a class="el" href="classStk.html#s1">STK_SINT16</a></code>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>StkFloat&nbsp;</td>
<td class="mdname" nowrap> <em>rate</em> = <code>22050.0</code></td>
</tr>
<tr>
<td class="md"></td>
@@ -141,7 +177,7 @@ An <a class="el" href="classStkError.html">StkError</a> will be thrown if the fi
<p>
Open the specified file and determine its formatting.
<p>
An <a class="el" href="classStkError.html">StkError</a> will be thrown if the file is not found or its format is unknown or unsupported. An optional parameter is provided to specify whether the input file is of type STK RAW (default = false). </td>
An <a class="el" href="classStkError.html">StkError</a> will be thrown if the file is not found or its format is unknown or unsupported. The optional arguments allow a headerless file type to be supported. If <code>typeRaw</code> is false (the default), the subsequent parameters are ignored. </td>
</tr>
</table>
<a class="anchor" name="a8"></a><!-- doxytag: member="FileRead::fileRate" ref="a8" args="(void) const " --><p>

View File

@@ -22,7 +22,7 @@ An abstract base class for realtime MIDI input/output.
<p>
This class implements some common functionality for the realtime MIDI input/output subclasses <a class="el" href="classRtMidiIn.html">RtMidiIn</a> and <a class="el" href="classRtMidiOut.html">RtMidiOut</a>.<p>
RtMidi WWW site: <a href="http://music.mcgill.ca/~gary/rtmidi/">http://music.mcgill.ca/~gary/rtmidi/</a><p>
RtMidi: realtime MIDI i/o C++ classes Copyright (c) 2003-2005 Gary P. Scavone<p>
RtMidi: realtime MIDI i/o C++ classes Copyright (c) 2003-2007 Gary P. Scavone<p>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<p>
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version.<p>

View File

@@ -42,7 +42,7 @@ typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el"
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a MIDI input connection. <a href="#a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidiIn.html#a3">openVirtualPort</a> (const std::string portName=std::string(&quot;RtMidi Input&quot;))</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a virtual input port to allow software connections (OS X and ALSA only). <a href="#a3"></a><br></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a virtual input port, with optional name, to allow software connections (OS X and ALSA only). <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidiIn.html#a4">setCallback</a> (<a class="el" href="classRtMidiIn.html#w0">RtMidiCallback</a> callback, void *userData=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set a callback function to be invoked for incoming MIDI messages. <a href="#a4"></a><br></td></tr>
@@ -158,7 +158,7 @@ Implements <a class="el" href="classRtMidi.html#a0">RtMidi</a>. </td>
<td>
<p>
Create a virtual input port to allow software connections (OS X and ALSA only).
Create a virtual input port, with optional name, to allow software connections (OS X and ALSA only).
<p>
This function creates a virtual MIDI input port to which other software applications can connect. This type of functionality is currently only supported by the Macintosh OS-X and Linux ALSA APIs (the function does nothing for the other APIs).
<p>

View File

@@ -41,7 +41,7 @@ void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="clas
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close an open MIDI connection (if one exists). <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidiOut.html#a4">openVirtualPort</a> (const std::string portName=std::string(&quot;RtMidi Output&quot;))</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a virtual output port to allow software connections (OS X and ALSA only). <a href="#a4"></a><br></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a virtual output port, with optional name, to allow software connections (OS X and ALSA only). <a href="#a4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5"></a><!-- doxytag: member="RtMidiOut::getPortCount" ref="a5" args="()" -->
unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidiOut.html#a5">getPortCount</a> ()</td></tr>
@@ -141,7 +141,7 @@ Implements <a class="el" href="classRtMidi.html#a0">RtMidi</a>. </td>
<td>
<p>
Create a virtual output port to allow software connections (OS X and ALSA only).
Create a virtual output port, with optional name, to allow software connections (OS X and ALSA only).
<p>
This function creates a virtual MIDI output port to which other software applications can connect. This type of functionality is currently only supported by the Macintosh OS-X and Linux ALSA APIs (the function does nothing with the other APIs). An exception is thrown if an error occurs while attempting to create the virtual port.
<p>

View File

@@ -38,7 +38,9 @@
STK base class.
<p>
Nearly all STK classes inherit from this class. The global sample rate and rawwave path variables can be queried and modified via Stk. In addition, this class provides error handling and byte-swapping functions.<p>
by Perry R. Cook and Gary P. Scavone, 1995 - 2007.<p>
The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language. STK was designed to facilitate rapid development of music synthesis and audio processing software, with an emphasis on cross-platform functionality, realtime control, ease of use, and educational example code. STK currently runs with realtime support (audio and MIDI) on Linux, Macintosh OS X, and Windows computer platforms. Generic, non-realtime support has been tested under NeXTStep, Sun, and other platforms and should work with any standard C++ compiler.<p>
STK WWW site: <a href="http://ccrma.stanford.edu/software/stk/">http://ccrma.stanford.edu/software/stk/</a><p>
The Synthesis ToolKit in C++ (STK) Copyright (c) 1995-2007 Perry R. Cook and Gary P. Scavone<p>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<p>
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
Any person wishing to distribute modifications to the Software is asked to send the modifications to the original developer so that they can be incorporated into the canonical version. This is, however, not a binding provision of this license.<p>

View File

@@ -33,10 +33,8 @@ In the following example, we'll modify the <code>bethree.cpp</code> program from
<span class="preprocessor">#include "SKINI.msg"</span>
<span class="preprocessor">#include &lt;math.h&gt;</span>
<span class="preprocessor">#include &lt;algorithm&gt;</span>
<span class="preprocessor">#if !defined(__OS_WINDOWS__) // Windoze bogosity for VC++ 6.0</span>
<span class="preprocessor"></span> <span class="keyword">using</span> std::min;
<span class="preprocessor">#endif</span>
<span class="preprocessor"></span>
<span class="keyword">using</span> std::min;
<span class="keywordtype">void</span> usage(<span class="keywordtype">void</span>) {
<span class="comment">// Error function in case of incorrect command-line</span>
<span class="comment">// argument specifications.</span>

View File

@@ -10,19 +10,31 @@
<HR>
<!-- Generated by Doxygen 1.4.4 -->
<h1><a class="anchor" name="download">Download, Release Notes, and Bug Fixes</a></h1><h2><a class="anchor" name="down">
Download Version 4.3.0 (13 August 2007):</a></h2>
Download Version 4.3.1 (7 December 2007):</a></h2>
<ul>
<li>
<a href="http://ccrma.stanford.edu/software/stk/release/stk-4.3.0.tar.gz">Source distribution</a> </li>
<li>
<a href="http://ccrma.stanford.edu/software/stk/release/stk-4.3.0.binaries.tar.gz">Source with precompiled Windows binaries</a> </li>
<a href="http://ccrma.stanford.edu/software/stk/release/stk-4.3.1.tar.gz">Source distribution</a> </li>
<li>
<a href="http://ccrma.stanford.edu/planetccrma/software/">Linux RPMs from Planet CCRMA</a> </li>
</ul>
<h2><a class="anchor" name="notes">
Release Notes:</a></h2>
<h3><a class="anchor" name="v4dot3dot0">
Version 4.3.0</a></h3>
Version 4.3.1</a></h3>
<ul>
<li>
Further headerless file support in <a class="el" href="classFileRead.html">FileRead</a>. </li>
<li>
Bug fix in RtWvOut.cpp. </li>
<li>
Added configure support for MinGW. </li>
<li>
Updates to <a class="el" href="classRtAudio.html">RtAudio</a> and <a class="el" href="classRtMidi.html">RtMidi</a> for MinGW. </li>
<li>
Changes to channel assignment in demo.cpp. </li>
</ul>
<h3><a class="anchor" name="v4dot3dot0">
Version 4.3.1</a></h3>
<ul>
<li>
An official MIT-like license. </li>

View File

@@ -14,10 +14,46 @@
<h2><a class="anchor" name="license">
Does STK have a license?</a></h2>
Yes, we finally made something official for release 4.3.0. It is listed in the <a class="el" href="classStk.html">Stk</a> class and a few other places in the distribution, but I'll repeat it here for clarity:<p>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<p>
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
Any person wishing to distribute modifications to the Software is asked to send the modifications to the original developer so that they can be incorporated into the canonical version. This is, however, not a binding provision of this license.<p>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<h2><a class="anchor" name="filerate">
<div class="fragment"><pre class="fragment">The Synthesis ToolKit in C++ (STK) is a set of open source audio
signal processing and algorithmic synthesis classes written in the
C++ programming language. STK was designed to facilitate rapid
development of music synthesis and audio processing software, with
an emphasis on cross-platform functionality, realtime control,
ease of use, and educational example code. STK currently runs
with realtime support (audio and MIDI) on Linux, Macintosh OS X,
and Windows computer platforms. Generic, non-realtime support has
been tested under NeXTStep, Sun, and other platforms and should
work with any standard C++ compiler.
STK WWW site: http://ccrma.stanford.edu/software/stk/
The Synthesis ToolKit in C++ (STK)
Copyright (c) 1995-2007 Perry R. Cook and Gary P. Scavone
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Any person wishing to distribute modifications to the Software is
asked to send the modifications to the original developer so that they
can be incorporated into the canonical version. This is, however, not
a binding provision of this license.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</pre></div><h2><a class="anchor" name="filerate">
Why is my file sample rate wrong?</a></h2>
When the <a class="el" href="classFileWvIn.html">FileWvIn</a> class loads a soundfile, it automatically sets its internal read increment based on the soundfile rate and the current STK sample rate. For example, if the current STK sample rate is 44100 Hz and the soundfile rate is 22050 Hz, the read increment, or rate, will be set to 0.5 and the file will be interpolated so that is sounds correct at 44100 Hz. For most cases, this works fine. However, consider the following example:<p>
<div class="fragment"><pre class="fragment"><a class="code" href="classFileWvIn.html">FileWvIn</a> input( <span class="stringliteral">"infile"</span> ); <span class="comment">// read an input soundfile</span>

View File

@@ -27,9 +27,9 @@ Here is a list of all documented class members with links to the class documenta
: <a class="el" href="structSkini_1_1Message.html#o2">Skini::Message</a><li>TubeBell()
: <a class="el" href="classTubeBell.html#a0">TubeBell</a><li>TwoPole()
: <a class="el" href="classTwoPole.html#a0">TwoPole</a><li>TwoZero()
: <a class="el" href="classTwoZero.html#a0">TwoZero</a><li>type
: <a class="el" href="structSkini_1_1Message.html#o0">Skini::Message</a><li>Type
: <a class="el" href="classRtError.html#w11">RtError</a></ul>
: <a class="el" href="classTwoZero.html#a0">TwoZero</a><li>Type
: <a class="el" href="classRtError.html#w11">RtError</a><li>type
: <a class="el" href="structSkini_1_1Message.html#o0">Skini::Message</a></ul>
<HR>
<table>

View File

@@ -65,7 +65,7 @@ The ToolKit has some basic C++ error handling functionality built in. Classes th
output.<a class="code" href="classFileWvOut.html#a3">openFile</a>( <span class="stringliteral">"hellosine.wav"</span>, 1, <a class="code" href="classFileWrite.html#s1">FileWrite::FILE_WAV</a>, <a class="code" href="classStk.html#s1">Stk::STK_SINT16</a> );
}
<span class="keywordflow">catch</span> ( <a class="code" href="classStkError.html">StkError</a> &amp; ) {
exit(0);
exit( 1 );
}
input.<a class="code" href="classWaveLoop.html#a5">setFrequency</a>( 440.0 );
@@ -78,9 +78,8 @@ The ToolKit has some basic C++ error handling functionality built in. Classes th
output.<a class="code" href="classWvOut.html#a6">tick</a>( input.<a class="code" href="classWvIn.html#a5">tick</a>() );
}
<span class="keywordflow">catch</span> ( <a class="code" href="classStkError.html">StkError</a> &amp; ) {
exit(0);
exit( 1 );
}
}
<span class="keywordflow">return</span> 0;

View File

@@ -11,7 +11,7 @@
<!-- Generated by Doxygen 1.4.4 -->
<h1><em>The Synthesis ToolKit in C++ (STK)</em> </h1>
<p>
<h3 align="center">4.3 </h3>
<h3 align="center">4.3.1 </h3>
<BODY BGCOLOR="white">
<h3><center><a href="http://www.cs.princeton.edu/~prc/">Perry R. Cook</a> & <a href="http://music.mcgill.ca/~gary/">Gary P. Scavone</a></center></h3>
<p>

View File

@@ -36,7 +36,7 @@ The following example demonstrates the use of the <a class="el" href="classFileW
output.<a class="code" href="classFileWvOut.html#a3">openFile</a>( <span class="stringliteral">"foursine.aif"</span>, 4, <a class="code" href="classFileWrite.html#s3">FileWrite::FILE_AIF</a>, <a class="code" href="classStk.html#s1">Stk::STK_SINT16</a> );
}
<span class="keywordflow">catch</span> (<a class="code" href="classStkError.html">StkError</a> &amp;) {
exit(0);
exit( 1 );
}
<span class="comment">// Write two seconds of four sines to the output file</span>

View File

@@ -21,10 +21,8 @@ In the following example, we modify the <code>controlbee.cpp</code> program to m
<span class="preprocessor">#include "SKINI.msg"</span>
<span class="preprocessor">#include &lt;algorithm&gt;</span>
<span class="preprocessor">#if !defined(__OS_WINDOWS__) // Windoze bogosity for VC++ 6.0</span>
<span class="preprocessor"></span> <span class="keyword">using</span> std::min;
<span class="preprocessor">#endif</span>
<span class="preprocessor"></span>
<span class="keyword">using</span> std::min;
<span class="comment">// The TickData structure holds all the class instances and data that</span>
<span class="comment">// are shared by the various processing functions.</span>
<span class="keyword">struct </span>TickData {

View File

@@ -29,7 +29,7 @@
dac = <span class="keyword">new</span> <a class="code" href="classRtWvOut.html">RtWvOut</a>( 1 );
}
<span class="keywordflow">catch</span> ( <a class="code" href="classStkError.html">StkError</a> &amp; ) {
exit(0);
exit( 1 );
}
sine.<a class="code" href="classSineWave.html#a4">setFrequency</a>( 441.0 );