Compare commits
1 Commits
v2.1.14
...
wxPy-2-1-4
Author | SHA1 | Date | |
---|---|---|---|
|
c5691153e4 |
11
.cvsignore
11
.cvsignore
@@ -19,8 +19,6 @@ linux-gnu.system.cache
|
||||
*.pro
|
||||
*.opt
|
||||
*.d
|
||||
*.swp
|
||||
*.swo
|
||||
Release
|
||||
Debug
|
||||
ReleaseDLL
|
||||
@@ -33,12 +31,3 @@ setup.h
|
||||
stamp-h
|
||||
libtool
|
||||
aclocal.m4
|
||||
base
|
||||
gtk
|
||||
motif
|
||||
win32
|
||||
base-release
|
||||
gtk-release
|
||||
motif-release
|
||||
win32-release
|
||||
*tags
|
||||
|
60
BuildCVS.txt
60
BuildCVS.txt
@@ -35,27 +35,6 @@ and its make.exe).
|
||||
-> Set your path so that it includes the directory
|
||||
where your compiler and tools reside
|
||||
|
||||
b-2) Using Mingw32 with gcc-2.95 and Anders Norlander's
|
||||
Win32 headers
|
||||
|
||||
Using the newer gcc-2.95/Noralander header combination
|
||||
will allow you to compile more of the MSW code, such
|
||||
as OLE and Drag-n-Drop.
|
||||
|
||||
Instructions are similar to those for Regular Mingw32 except
|
||||
|
||||
->Get the compiler from
|
||||
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/gcc-2.95/
|
||||
|
||||
->patch the gcc headers with info in wxWin\Mingw32-gcc295.patches.
|
||||
PLEASE APPLY THESE PATCHES BY HAND! There are apparently a few
|
||||
different versions of the headers floating around.
|
||||
|
||||
->Edit wx/src/makeg95.env and set the MINGW32 variable at the top of
|
||||
the file to either 1 (you have Mingw32) or 0 (you have Cygwin32).
|
||||
If using MINGW32, also set the MINGW32VERSION variable
|
||||
appropriately.
|
||||
|
||||
|
||||
c) Build instructions
|
||||
|
||||
@@ -79,12 +58,9 @@ c) Build instructions
|
||||
|
||||
and iostreams ares disabled with
|
||||
#define wxUSE_STD_IOSTREAM 0
|
||||
|
||||
note: ODBC and SOCKETS can be 1 for gcc-2.95
|
||||
|
||||
-> type: cd c:\wxWin\src\msw
|
||||
-> type: make -f makefile.g95 (if using GNU tools)
|
||||
or type: make -f makefile.vc (if using MS VC++)
|
||||
-> type: make -f makefile.g95 (if using GNU tools)
|
||||
or type: make -f makefile.vc (if using MS VC++)
|
||||
|
||||
|
||||
II) Unix ports
|
||||
@@ -165,7 +141,7 @@ To cross compile the windows library, do
|
||||
(or whatever you called it)
|
||||
Now run configure. There are two ways to do this
|
||||
-> ../configure --host=i586-mingw32 --build=i586-linux --with-mingw \
|
||||
--enable-dnd=no --without-odbc
|
||||
--enable-dnd=no
|
||||
where --build= should read whatever platform you're building on. Configure
|
||||
will notice that build and host platforms differ, and automatically prepend
|
||||
i586-mingw32- to gcc, ar, ld, etc (make sure they're in the PATH!).
|
||||
@@ -181,9 +157,6 @@ Drag'n'drop is disabled because mingw32 lacks (AFAIK) OLE headers.
|
||||
[ Update: some new mingw32 versions now have a new set of windows header
|
||||
files, which apparently can handle ole. Untested at the moment ]
|
||||
|
||||
ODBC files don't compile as of 13.10.99 - may be this will be fixed by the
|
||||
moment you're reading these lines.
|
||||
|
||||
Configure will conclude that shared libraries are out of the question and
|
||||
opt for a static one. I haven't looked into DLL creation yet.
|
||||
|
||||
@@ -192,37 +165,14 @@ Type
|
||||
and wait, wait, wait. Don't leave the room, because the minute you do there
|
||||
will be a compile error :-)
|
||||
|
||||
NB: you risk to get quite a few warnings about "ANSI C++ forbids implicit
|
||||
conversion from 'void *'" in all places where va_arg macro is used. This
|
||||
is due to a bug in (some versions of) mingw32 headers which may be
|
||||
corrected by editing the file
|
||||
|
||||
${install_prefix}/lib/gcc-lib/i586-mingw32/egcs-2.91.57/include/stdarg.h
|
||||
|
||||
(instead of egcs-2.91.57 you may have something different), searching for
|
||||
the lines
|
||||
|
||||
/* Define __gnuc_va_list. */
|
||||
|
||||
#ifndef __GNUC_VA_LIST
|
||||
#define __GNUC_VA_LIST
|
||||
#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__)
|
||||
typedef char *__gnuc_va_list;
|
||||
#else
|
||||
typedef void *__gnuc_va_list;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
and adding "|| defined(_WIN32)" to the list of platforms on which
|
||||
__gnuc_va_list is char *.
|
||||
|
||||
If this is successful, you end up with a libwx_msw.a in win32/lib. Now try
|
||||
building the minimal sample:
|
||||
|
||||
-> cd samples/minimal
|
||||
-> make
|
||||
-> mv minimal minimal.exe
|
||||
|
||||
and run it with wine, for example (or copy to a Windows box)
|
||||
and run it with wine, for example
|
||||
-> wine minimal.exe
|
||||
|
||||
If all is well, do an install; from win32
|
||||
|
2450
Makefile.in
2450
Makefile.in
File diff suppressed because it is too large
Load Diff
@@ -75,7 +75,8 @@
|
||||
STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
|
||||
! STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID)
|
||||
PURE;
|
||||
! STDMETHOD(Invoked)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
|
||||
! STDMETHOD(Invoked)(THIS_
|
||||
DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -85,7 +86,8 @@ PURE;
|
||||
STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
|
||||
! STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*)
|
||||
PURE;
|
||||
! STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
|
||||
! STDMETHOD(Invoke)(THIS_
|
||||
DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -112,58 +114,5 @@ PURE;
|
||||
STDMETHOD(EnumDAdvise)(THIS_ IEnumSTATDATA**);
|
||||
|
||||
|
||||
--- i386-mingw32\include\stdio.h Sun Aug 1 06:18:20 1999
|
||||
+++ stdio.h Sun Nov 7 03:41:40 1999
|
||||
@@ -203,9 +203,12 @@
|
||||
int fprintf (FILE* filePrintTo, const char* szFormat, ...);
|
||||
int printf (const char* szFormat, ...);
|
||||
int sprintf (char* caBuffer, const char* szFormat, ...);
|
||||
+int _snprintf (char* caBuffer, size_t n, const char* szFormat, ...);
|
||||
int vfprintf (FILE* filePrintTo, const char* szFormat, va_list varg);
|
||||
int vprintf (const char* szFormat, va_list varg);
|
||||
int vsprintf (char* caBuffer, const char* szFormat, va_list varg);
|
||||
+int _vsnprintf (char* caBuffer, size_t n, const char* szFormat,
|
||||
+ va_list varg);
|
||||
|
||||
/* Wide character versions */
|
||||
int fwprintf (FILE* filePrintTo, const wchar_t* wsFormat, ...);
|
||||
|
||||
|
||||
|
||||
--- i386-mingw32\include\winbase.h Sat Jul 31 17:48:48 1999
|
||||
+++ winbase.h Fri Feb 25 01:49:08 2000
|
||||
@@ -989,7 +989,7 @@
|
||||
BOOL WINAPI CopyFileExW(LPCWSTR,LPCWSTR,LPPROGRESS_ROUTINE,LPVOID,LPBOOL,DWORD);
|
||||
#define RtlMoveMemory memmove
|
||||
#define RtlCopyMemory memcpy
|
||||
-#define RtlFillMemory memset
|
||||
+#define RtlFillMemory(d,l,f) memset ((d),(f),(l))
|
||||
#define RtlZeroMemory(d,l) memset((d),0,(l))
|
||||
#define MoveMemory RtlMoveMemory
|
||||
#define CopyMemory RtlCopyMemory
|
||||
|
||||
--- i386-mingw32\include\winsock.h Sat Jul 31 17:48:50 1999
|
||||
+++ winsock.h Mon Mar 20 13:47:12 2000
|
||||
@@ -13,6 +13,10 @@
|
||||
#define _GNU_H_WINDOWS32_SOCKETS
|
||||
#include <windows.h>
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
#ifndef _SYS_TYPES_H
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
@@ -495,4 +499,9 @@
|
||||
typedef struct timeval TIMEVAL;
|
||||
typedef struct timeval *PTIMEVAL;
|
||||
typedef struct timeval *LPTIMEVAL;
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
#endif
|
||||
+#endif
|
||||
+
|
||||
|
||||
|
||||
|
1758
configure.in
1758
configure.in
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
#
|
||||
# Makefile : Builds wxWindows utils for Unix.
|
||||
#
|
||||
|
||||
all:
|
||||
cd src; make
|
||||
|
||||
clean:
|
||||
cd src; make clean
|
||||
cd samples; make clean
|
||||
|
||||
samples:
|
||||
cd samples; make
|
974
contrib/configure
vendored
974
contrib/configure
vendored
@@ -1,974 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# From configure.in Id: configure.in
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.13
|
||||
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy, distribute and modify it.
|
||||
|
||||
# Defaults:
|
||||
ac_help=
|
||||
ac_default_prefix=/usr/local
|
||||
# Any additions from configure.in:
|
||||
|
||||
# Initialize some variables set by options.
|
||||
# The variables have the same names as the options, with
|
||||
# dashes changed to underlines.
|
||||
build=NONE
|
||||
cache_file=./config.cache
|
||||
exec_prefix=NONE
|
||||
host=NONE
|
||||
no_create=
|
||||
nonopt=NONE
|
||||
no_recursion=
|
||||
prefix=NONE
|
||||
program_prefix=NONE
|
||||
program_suffix=NONE
|
||||
program_transform_name=s,x,x,
|
||||
silent=
|
||||
site=
|
||||
srcdir=
|
||||
target=NONE
|
||||
verbose=
|
||||
x_includes=NONE
|
||||
x_libraries=NONE
|
||||
bindir='${exec_prefix}/bin'
|
||||
sbindir='${exec_prefix}/sbin'
|
||||
libexecdir='${exec_prefix}/libexec'
|
||||
datadir='${prefix}/share'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
libdir='${exec_prefix}/lib'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
infodir='${prefix}/info'
|
||||
mandir='${prefix}/man'
|
||||
|
||||
# Initialize some other variables.
|
||||
subdirs=
|
||||
MFLAGS= MAKEFLAGS=
|
||||
SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Maximum number of lines to put in a shell here document.
|
||||
ac_max_here_lines=12
|
||||
|
||||
ac_prev=
|
||||
for ac_option
|
||||
do
|
||||
|
||||
# If the previous option needs an argument, assign it.
|
||||
if test -n "$ac_prev"; then
|
||||
eval "$ac_prev=\$ac_option"
|
||||
ac_prev=
|
||||
continue
|
||||
fi
|
||||
|
||||
case "$ac_option" in
|
||||
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) ac_optarg= ;;
|
||||
esac
|
||||
|
||||
# Accept the important Cygnus configure options, so we can diagnose typos.
|
||||
|
||||
case "$ac_option" in
|
||||
|
||||
-bindir | --bindir | --bindi | --bind | --bin | --bi)
|
||||
ac_prev=bindir ;;
|
||||
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
|
||||
bindir="$ac_optarg" ;;
|
||||
|
||||
-build | --build | --buil | --bui | --bu)
|
||||
ac_prev=build ;;
|
||||
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
||||
build="$ac_optarg" ;;
|
||||
|
||||
-cache-file | --cache-file | --cache-fil | --cache-fi \
|
||||
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
|
||||
ac_prev=cache_file ;;
|
||||
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
|
||||
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
|
||||
cache_file="$ac_optarg" ;;
|
||||
|
||||
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
|
||||
ac_prev=datadir ;;
|
||||
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
|
||||
| --da=*)
|
||||
datadir="$ac_optarg" ;;
|
||||
|
||||
-disable-* | --disable-*)
|
||||
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
|
||||
# Reject names that are not valid shell variable names.
|
||||
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
|
||||
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
|
||||
fi
|
||||
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
|
||||
eval "enable_${ac_feature}=no" ;;
|
||||
|
||||
-enable-* | --enable-*)
|
||||
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
|
||||
# Reject names that are not valid shell variable names.
|
||||
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
|
||||
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
|
||||
fi
|
||||
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
|
||||
case "$ac_option" in
|
||||
*=*) ;;
|
||||
*) ac_optarg=yes ;;
|
||||
esac
|
||||
eval "enable_${ac_feature}='$ac_optarg'" ;;
|
||||
|
||||
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
|
||||
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
|
||||
| --exec | --exe | --ex)
|
||||
ac_prev=exec_prefix ;;
|
||||
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
|
||||
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
|
||||
| --exec=* | --exe=* | --ex=*)
|
||||
exec_prefix="$ac_optarg" ;;
|
||||
|
||||
-gas | --gas | --ga | --g)
|
||||
# Obsolete; use --with-gas.
|
||||
with_gas=yes ;;
|
||||
|
||||
-help | --help | --hel | --he)
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat << EOF
|
||||
Usage: configure [options] [host]
|
||||
Options: [defaults in brackets after descriptions]
|
||||
Configuration:
|
||||
--cache-file=FILE cache test results in FILE
|
||||
--help print this message
|
||||
--no-create do not create output files
|
||||
--quiet, --silent do not print \`checking...' messages
|
||||
--version print the version of autoconf that created configure
|
||||
Directory and file names:
|
||||
--prefix=PREFIX install architecture-independent files in PREFIX
|
||||
[$ac_default_prefix]
|
||||
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
||||
[same as prefix]
|
||||
--bindir=DIR user executables in DIR [EPREFIX/bin]
|
||||
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
|
||||
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
|
||||
--datadir=DIR read-only architecture-independent data in DIR
|
||||
[PREFIX/share]
|
||||
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data in DIR
|
||||
[PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
|
||||
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
|
||||
--includedir=DIR C header files in DIR [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
|
||||
--infodir=DIR info documentation in DIR [PREFIX/info]
|
||||
--mandir=DIR man documentation in DIR [PREFIX/man]
|
||||
--srcdir=DIR find the sources in DIR [configure dir or ..]
|
||||
--program-prefix=PREFIX prepend PREFIX to installed program names
|
||||
--program-suffix=SUFFIX append SUFFIX to installed program names
|
||||
--program-transform-name=PROGRAM
|
||||
run sed PROGRAM on installed program names
|
||||
EOF
|
||||
cat << EOF
|
||||
Host type:
|
||||
--build=BUILD configure for building on BUILD [BUILD=HOST]
|
||||
--host=HOST configure for HOST [guessed]
|
||||
--target=TARGET configure for TARGET [TARGET=HOST]
|
||||
Features and packages:
|
||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--x-includes=DIR X include files are in DIR
|
||||
--x-libraries=DIR X library files are in DIR
|
||||
EOF
|
||||
if test -n "$ac_help"; then
|
||||
echo "--enable and --with options recognized:$ac_help"
|
||||
fi
|
||||
exit 0 ;;
|
||||
|
||||
-host | --host | --hos | --ho)
|
||||
ac_prev=host ;;
|
||||
-host=* | --host=* | --hos=* | --ho=*)
|
||||
host="$ac_optarg" ;;
|
||||
|
||||
-includedir | --includedir | --includedi | --included | --include \
|
||||
| --includ | --inclu | --incl | --inc)
|
||||
ac_prev=includedir ;;
|
||||
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
|
||||
| --includ=* | --inclu=* | --incl=* | --inc=*)
|
||||
includedir="$ac_optarg" ;;
|
||||
|
||||
-infodir | --infodir | --infodi | --infod | --info | --inf)
|
||||
ac_prev=infodir ;;
|
||||
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
|
||||
infodir="$ac_optarg" ;;
|
||||
|
||||
-libdir | --libdir | --libdi | --libd)
|
||||
ac_prev=libdir ;;
|
||||
-libdir=* | --libdir=* | --libdi=* | --libd=*)
|
||||
libdir="$ac_optarg" ;;
|
||||
|
||||
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
|
||||
| --libexe | --libex | --libe)
|
||||
ac_prev=libexecdir ;;
|
||||
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
|
||||
| --libexe=* | --libex=* | --libe=*)
|
||||
libexecdir="$ac_optarg" ;;
|
||||
|
||||
-localstatedir | --localstatedir | --localstatedi | --localstated \
|
||||
| --localstate | --localstat | --localsta | --localst \
|
||||
| --locals | --local | --loca | --loc | --lo)
|
||||
ac_prev=localstatedir ;;
|
||||
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
|
||||
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
|
||||
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
|
||||
localstatedir="$ac_optarg" ;;
|
||||
|
||||
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
|
||||
ac_prev=mandir ;;
|
||||
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
|
||||
mandir="$ac_optarg" ;;
|
||||
|
||||
-nfp | --nfp | --nf)
|
||||
# Obsolete; use --without-fp.
|
||||
with_fp=no ;;
|
||||
|
||||
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
|
||||
| --no-cr | --no-c)
|
||||
no_create=yes ;;
|
||||
|
||||
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
|
||||
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
|
||||
no_recursion=yes ;;
|
||||
|
||||
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
|
||||
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
|
||||
| --oldin | --oldi | --old | --ol | --o)
|
||||
ac_prev=oldincludedir ;;
|
||||
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
|
||||
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
|
||||
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
|
||||
oldincludedir="$ac_optarg" ;;
|
||||
|
||||
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
|
||||
ac_prev=prefix ;;
|
||||
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
|
||||
prefix="$ac_optarg" ;;
|
||||
|
||||
-program-prefix | --program-prefix | --program-prefi | --program-pref \
|
||||
| --program-pre | --program-pr | --program-p)
|
||||
ac_prev=program_prefix ;;
|
||||
-program-prefix=* | --program-prefix=* | --program-prefi=* \
|
||||
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
|
||||
program_prefix="$ac_optarg" ;;
|
||||
|
||||
-program-suffix | --program-suffix | --program-suffi | --program-suff \
|
||||
| --program-suf | --program-su | --program-s)
|
||||
ac_prev=program_suffix ;;
|
||||
-program-suffix=* | --program-suffix=* | --program-suffi=* \
|
||||
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
|
||||
program_suffix="$ac_optarg" ;;
|
||||
|
||||
-program-transform-name | --program-transform-name \
|
||||
| --program-transform-nam | --program-transform-na \
|
||||
| --program-transform-n | --program-transform- \
|
||||
| --program-transform | --program-transfor \
|
||||
| --program-transfo | --program-transf \
|
||||
| --program-trans | --program-tran \
|
||||
| --progr-tra | --program-tr | --program-t)
|
||||
ac_prev=program_transform_name ;;
|
||||
-program-transform-name=* | --program-transform-name=* \
|
||||
| --program-transform-nam=* | --program-transform-na=* \
|
||||
| --program-transform-n=* | --program-transform-=* \
|
||||
| --program-transform=* | --program-transfor=* \
|
||||
| --program-transfo=* | --program-transf=* \
|
||||
| --program-trans=* | --program-tran=* \
|
||||
| --progr-tra=* | --program-tr=* | --program-t=*)
|
||||
program_transform_name="$ac_optarg" ;;
|
||||
|
||||
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
|
||||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
| --sbi=* | --sb=*)
|
||||
sbindir="$ac_optarg" ;;
|
||||
|
||||
-sharedstatedir | --sharedstatedir | --sharedstatedi \
|
||||
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
|
||||
| --sharedst | --shareds | --shared | --share | --shar \
|
||||
| --sha | --sh)
|
||||
ac_prev=sharedstatedir ;;
|
||||
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
|
||||
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
|
||||
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
|
||||
| --sha=* | --sh=*)
|
||||
sharedstatedir="$ac_optarg" ;;
|
||||
|
||||
-site | --site | --sit)
|
||||
ac_prev=site ;;
|
||||
-site=* | --site=* | --sit=*)
|
||||
site="$ac_optarg" ;;
|
||||
|
||||
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
|
||||
ac_prev=srcdir ;;
|
||||
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
||||
srcdir="$ac_optarg" ;;
|
||||
|
||||
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
|
||||
| --syscon | --sysco | --sysc | --sys | --sy)
|
||||
ac_prev=sysconfdir ;;
|
||||
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
|
||||
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
|
||||
sysconfdir="$ac_optarg" ;;
|
||||
|
||||
-target | --target | --targe | --targ | --tar | --ta | --t)
|
||||
ac_prev=target ;;
|
||||
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
||||
target="$ac_optarg" ;;
|
||||
|
||||
-v | -verbose | --verbose | --verbos | --verbo | --verb)
|
||||
verbose=yes ;;
|
||||
|
||||
-version | --version | --versio | --versi | --vers)
|
||||
echo "configure generated by autoconf version 2.13"
|
||||
exit 0 ;;
|
||||
|
||||
-with-* | --with-*)
|
||||
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
|
||||
# Reject names that are not valid shell variable names.
|
||||
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
|
||||
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
|
||||
fi
|
||||
ac_package=`echo $ac_package| sed 's/-/_/g'`
|
||||
case "$ac_option" in
|
||||
*=*) ;;
|
||||
*) ac_optarg=yes ;;
|
||||
esac
|
||||
eval "with_${ac_package}='$ac_optarg'" ;;
|
||||
|
||||
-without-* | --without-*)
|
||||
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
|
||||
# Reject names that are not valid shell variable names.
|
||||
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
|
||||
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
|
||||
fi
|
||||
ac_package=`echo $ac_package| sed 's/-/_/g'`
|
||||
eval "with_${ac_package}=no" ;;
|
||||
|
||||
--x)
|
||||
# Obsolete; use --with-x.
|
||||
with_x=yes ;;
|
||||
|
||||
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
|
||||
| --x-incl | --x-inc | --x-in | --x-i)
|
||||
ac_prev=x_includes ;;
|
||||
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
|
||||
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
|
||||
x_includes="$ac_optarg" ;;
|
||||
|
||||
-x-libraries | --x-libraries | --x-librarie | --x-librari \
|
||||
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
|
||||
ac_prev=x_libraries ;;
|
||||
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
|
||||
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
|
||||
x_libraries="$ac_optarg" ;;
|
||||
|
||||
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
|
||||
echo "configure: warning: $ac_option: invalid host type" 1>&2
|
||||
fi
|
||||
if test "x$nonopt" != xNONE; then
|
||||
{ echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
|
||||
fi
|
||||
nonopt="$ac_option"
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
if test -n "$ac_prev"; then
|
||||
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
|
||||
|
||||
# File descriptor usage:
|
||||
# 0 standard input
|
||||
# 1 file creation
|
||||
# 2 errors and warnings
|
||||
# 3 some systems may open it to /dev/tty
|
||||
# 4 used on the Kubota Titan
|
||||
# 6 checking for... messages and results
|
||||
# 5 compiler messages saved in config.log
|
||||
if test "$silent" = yes; then
|
||||
exec 6>/dev/null
|
||||
else
|
||||
exec 6>&1
|
||||
fi
|
||||
exec 5>./config.log
|
||||
|
||||
echo "\
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
" 1>&5
|
||||
|
||||
# Strip out --no-create and --no-recursion so they do not pile up.
|
||||
# Also quote any args containing shell metacharacters.
|
||||
ac_configure_args=
|
||||
for ac_arg
|
||||
do
|
||||
case "$ac_arg" in
|
||||
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
|
||||
| --no-cr | --no-c) ;;
|
||||
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
|
||||
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
|
||||
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
|
||||
ac_configure_args="$ac_configure_args '$ac_arg'" ;;
|
||||
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# NLS nuisances.
|
||||
# Only set these to C if already set. These must not be set unconditionally
|
||||
# because not all systems understand e.g. LANG=C (notably SCO).
|
||||
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
|
||||
# Non-C LC_CTYPE values break the ctype check.
|
||||
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
|
||||
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
|
||||
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
|
||||
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
|
||||
|
||||
# confdefs.h avoids OS command line length limits that DEFS can exceed.
|
||||
rm -rf conftest* confdefs.h
|
||||
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
|
||||
echo > confdefs.h
|
||||
|
||||
# A filename unique to this package, relative to the directory that
|
||||
# configure is in, which we can look for to find out if srcdir is correct.
|
||||
ac_unique_file=Makefile.in
|
||||
|
||||
# Find the source files, if location was not specified.
|
||||
if test -z "$srcdir"; then
|
||||
ac_srcdir_defaulted=yes
|
||||
# Try the directory containing this script, then its parent.
|
||||
ac_prog=$0
|
||||
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
|
||||
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
|
||||
srcdir=$ac_confdir
|
||||
if test ! -r $srcdir/$ac_unique_file; then
|
||||
srcdir=..
|
||||
fi
|
||||
else
|
||||
ac_srcdir_defaulted=no
|
||||
fi
|
||||
if test ! -r $srcdir/$ac_unique_file; then
|
||||
if test "$ac_srcdir_defaulted" = yes; then
|
||||
{ echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
|
||||
else
|
||||
{ echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
|
||||
fi
|
||||
fi
|
||||
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
|
||||
|
||||
# Prefer explicitly selected file to automatically selected ones.
|
||||
if test -z "$CONFIG_SITE"; then
|
||||
if test "x$prefix" != xNONE; then
|
||||
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
|
||||
else
|
||||
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
|
||||
fi
|
||||
fi
|
||||
for ac_site_file in $CONFIG_SITE; do
|
||||
if test -r "$ac_site_file"; then
|
||||
echo "loading site script $ac_site_file"
|
||||
. "$ac_site_file"
|
||||
fi
|
||||
done
|
||||
|
||||
if test -r "$cache_file"; then
|
||||
echo "loading cache $cache_file"
|
||||
. $cache_file
|
||||
else
|
||||
echo "creating cache $cache_file"
|
||||
> $cache_file
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
ac_exeext=
|
||||
ac_objext=o
|
||||
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
|
||||
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
|
||||
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
|
||||
ac_n= ac_c='
|
||||
' ac_t=' '
|
||||
else
|
||||
ac_n=-n ac_c= ac_t=
|
||||
fi
|
||||
else
|
||||
ac_n= ac_c='\c' ac_t=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ESD_LINK=
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:531: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
fi
|
||||
if test -z "$CPP"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
# This must be in double quotes, not single quotes, because CPP may get
|
||||
# substituted into the Makefile and "${CC-cc}" will confuse make.
|
||||
CPP="${CC-cc} -E"
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 546 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 563 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
CPP="${CC-cc} -nologo -E"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 580 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
CPP=/lib/cpp
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
rm -f conftest*
|
||||
ac_cv_prog_CPP="$CPP"
|
||||
fi
|
||||
CPP="$ac_cv_prog_CPP"
|
||||
else
|
||||
ac_cv_prog_CPP="$CPP"
|
||||
fi
|
||||
echo "$ac_t""$CPP" 1>&6
|
||||
|
||||
ac_safe=`echo "esd.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for esd.h""... $ac_c" 1>&6
|
||||
echo "configure:612: checking for esd.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 617 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <esd.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=yes"
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
|
||||
echo $ac_n "checking for esd_close in -lesd""... $ac_c" 1>&6
|
||||
echo "configure:640: checking for esd_close in -lesd" >&5
|
||||
ac_lib_var=`echo esd'_'esd_close | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lesd $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 648 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char esd_close();
|
||||
|
||||
int main() {
|
||||
esd_close()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
|
||||
ESD_LINK="-lesd"
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
|
||||
if test "$ESD_LINK" != "" ; then
|
||||
echo "ESound detected"
|
||||
fi
|
||||
|
||||
|
||||
PATH_IFS=$wx_cv_path_ifs
|
||||
WX_TARGET_LIBRARY=$wx_cv_target_library
|
||||
WX_TARGET_LIBRARY_TYPE=$wx_cv_target_libtype
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
# scripts and configure runs. It is not useful on other systems.
|
||||
# If it contains results you don't want to keep, you may remove or edit it.
|
||||
#
|
||||
# By default, configure uses ./config.cache as the cache file,
|
||||
# creating it if it does not exist already. You can give configure
|
||||
# the --cache-file=FILE option to use a different cache file; that is
|
||||
# what configure does when it calls configure scripts in
|
||||
# subdirectories, so they share the cache.
|
||||
# Giving --cache-file=/dev/null disables caching, for debugging configure.
|
||||
# config.status only pays attention to the cache file if you give it the
|
||||
# --recheck option to rerun configure.
|
||||
#
|
||||
EOF
|
||||
# The following way of writing the cache mishandles newlines in values,
|
||||
# but we know of no workaround that is simple, portable, and efficient.
|
||||
# So, don't put newlines in cache variables' values.
|
||||
# Ultrix sh set writes to stderr and can't be redirected directly,
|
||||
# and sets the high bit in the cache file unless we assign to the vars.
|
||||
(set) 2>&1 |
|
||||
case `(ac_space=' '; set | grep ac_space) 2>&1` in
|
||||
*ac_space=\ *)
|
||||
# `set' does not quote correctly, so add quotes (double-quote substitution
|
||||
# turns \\\\ into \\, and sed turns \\ into \).
|
||||
sed -n \
|
||||
-e "s/'/'\\\\''/g" \
|
||||
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
|
||||
;;
|
||||
*)
|
||||
# `set' quotes correctly as required by POSIX, so do not add quotes.
|
||||
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
|
||||
;;
|
||||
esac >> confcache
|
||||
if cmp -s $cache_file confcache; then
|
||||
:
|
||||
else
|
||||
if test -w $cache_file; then
|
||||
echo "updating cache $cache_file"
|
||||
cat confcache > $cache_file
|
||||
else
|
||||
echo "not updating unwritable cache $cache_file"
|
||||
fi
|
||||
fi
|
||||
rm -f confcache
|
||||
|
||||
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
|
||||
|
||||
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
||||
# Let make expand exec_prefix.
|
||||
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
||||
|
||||
# Any assignment to VPATH causes Sun make to only execute
|
||||
# the first set of double-colon rules, so remove it if not needed.
|
||||
# If there is a colon in the path, we need to keep it.
|
||||
if test "x$srcdir" = x.; then
|
||||
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
|
||||
fi
|
||||
|
||||
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
|
||||
|
||||
# Transform confdefs.h into DEFS.
|
||||
# Protect against shell expansion while executing Makefile rules.
|
||||
# Protect against Makefile macro expansion.
|
||||
cat > conftest.defs <<\EOF
|
||||
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
|
||||
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
|
||||
s%\[%\\&%g
|
||||
s%\]%\\&%g
|
||||
s%\$%$$%g
|
||||
EOF
|
||||
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
|
||||
rm -f conftest.defs
|
||||
|
||||
|
||||
# Without the "./", some shells look in PATH for config.status.
|
||||
: ${CONFIG_STATUS=./config.status}
|
||||
|
||||
echo creating $CONFIG_STATUS
|
||||
rm -f $CONFIG_STATUS
|
||||
cat > $CONFIG_STATUS <<EOF
|
||||
#! /bin/sh
|
||||
# Generated automatically by configure.
|
||||
# Run this file to recreate the current configuration.
|
||||
# This directory was configured as follows,
|
||||
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
|
||||
#
|
||||
# $0 $ac_configure_args
|
||||
#
|
||||
# Compiler output produced by configure, useful for debugging
|
||||
# configure, is in ./config.log if it exists.
|
||||
|
||||
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
|
||||
for ac_option
|
||||
do
|
||||
case "\$ac_option" in
|
||||
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
|
||||
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.13"
|
||||
exit 0 ;;
|
||||
-help | --help | --hel | --he | --h)
|
||||
echo "\$ac_cs_usage"; exit 0 ;;
|
||||
*) echo "\$ac_cs_usage"; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
ac_given_srcdir=$srcdir
|
||||
|
||||
trap 'rm -fr `echo "
|
||||
Makefile
|
||||
src/Makefile
|
||||
src/ogl/Makefile
|
||||
src/mmedia/Makefile
|
||||
src/stc/Makefile
|
||||
samples/Makefile
|
||||
samples/mmedia/Makefile
|
||||
samples/stc/Makefile
|
||||
" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
# Protect against being on the right side of a sed subst in config.status.
|
||||
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
|
||||
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
|
||||
$ac_vpsub
|
||||
$extrasub
|
||||
s%@SHELL@%$SHELL%g
|
||||
s%@CFLAGS@%$CFLAGS%g
|
||||
s%@CPPFLAGS@%$CPPFLAGS%g
|
||||
s%@CXXFLAGS@%$CXXFLAGS%g
|
||||
s%@FFLAGS@%$FFLAGS%g
|
||||
s%@DEFS@%$DEFS%g
|
||||
s%@LDFLAGS@%$LDFLAGS%g
|
||||
s%@LIBS@%$LIBS%g
|
||||
s%@exec_prefix@%$exec_prefix%g
|
||||
s%@prefix@%$prefix%g
|
||||
s%@program_transform_name@%$program_transform_name%g
|
||||
s%@bindir@%$bindir%g
|
||||
s%@sbindir@%$sbindir%g
|
||||
s%@libexecdir@%$libexecdir%g
|
||||
s%@datadir@%$datadir%g
|
||||
s%@sysconfdir@%$sysconfdir%g
|
||||
s%@sharedstatedir@%$sharedstatedir%g
|
||||
s%@localstatedir@%$localstatedir%g
|
||||
s%@libdir@%$libdir%g
|
||||
s%@includedir@%$includedir%g
|
||||
s%@oldincludedir@%$oldincludedir%g
|
||||
s%@infodir@%$infodir%g
|
||||
s%@mandir@%$mandir%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@PATH_IFS@%$PATH_IFS%g
|
||||
s%@ESD_LINK@%$ESD_LINK%g
|
||||
s%@WX_TARGET_LIBRARY@%$WX_TARGET_LIBRARY%g
|
||||
s%@WX_TARGET_LIBRARY_TYPE@%$WX_TARGET_LIBRARY_TYPE%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
|
||||
# Split the substitutions into bite-sized pieces for seds with
|
||||
# small command number limits, like on Digital OSF/1 and HP-UX.
|
||||
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
|
||||
ac_file=1 # Number of current file.
|
||||
ac_beg=1 # First line for current file.
|
||||
ac_end=$ac_max_sed_cmds # Line after last line for current file.
|
||||
ac_more_lines=:
|
||||
ac_sed_cmds=""
|
||||
while $ac_more_lines; do
|
||||
if test $ac_beg -gt 1; then
|
||||
sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
|
||||
else
|
||||
sed "${ac_end}q" conftest.subs > conftest.s$ac_file
|
||||
fi
|
||||
if test ! -s conftest.s$ac_file; then
|
||||
ac_more_lines=false
|
||||
rm -f conftest.s$ac_file
|
||||
else
|
||||
if test -z "$ac_sed_cmds"; then
|
||||
ac_sed_cmds="sed -f conftest.s$ac_file"
|
||||
else
|
||||
ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
|
||||
fi
|
||||
ac_file=`expr $ac_file + 1`
|
||||
ac_beg=$ac_end
|
||||
ac_end=`expr $ac_end + $ac_max_sed_cmds`
|
||||
fi
|
||||
done
|
||||
if test -z "$ac_sed_cmds"; then
|
||||
ac_sed_cmds=cat
|
||||
fi
|
||||
EOF
|
||||
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"Makefile
|
||||
src/Makefile
|
||||
src/ogl/Makefile
|
||||
src/mmedia/Makefile
|
||||
src/stc/Makefile
|
||||
samples/Makefile
|
||||
samples/mmedia/Makefile
|
||||
samples/stc/Makefile
|
||||
"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
|
||||
case "$ac_file" in
|
||||
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
|
||||
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||
*) ac_file_in="${ac_file}.in" ;;
|
||||
esac
|
||||
|
||||
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
|
||||
|
||||
# Remove last slash and all that follows it. Not all systems have dirname.
|
||||
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
|
||||
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
|
||||
# The file is in a subdirectory.
|
||||
test ! -d "$ac_dir" && mkdir "$ac_dir"
|
||||
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
|
||||
# A "../" for each directory in $ac_dir_suffix.
|
||||
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
|
||||
else
|
||||
ac_dir_suffix= ac_dots=
|
||||
fi
|
||||
|
||||
case "$ac_given_srcdir" in
|
||||
.) srcdir=.
|
||||
if test -z "$ac_dots"; then top_srcdir=.
|
||||
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
|
||||
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
|
||||
*) # Relative path.
|
||||
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
|
||||
top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
|
||||
|
||||
echo creating "$ac_file"
|
||||
rm -f "$ac_file"
|
||||
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
|
||||
case "$ac_file" in
|
||||
*Makefile*) ac_comsub="1i\\
|
||||
# $configure_input" ;;
|
||||
*) ac_comsub= ;;
|
||||
esac
|
||||
|
||||
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
|
||||
sed -e "$ac_comsub
|
||||
s%@configure_input@%$configure_input%g
|
||||
s%@srcdir@%$srcdir%g
|
||||
s%@top_srcdir@%$top_srcdir%g
|
||||
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
|
||||
fi; done
|
||||
rm -f conftest.s*
|
||||
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
chmod +x $CONFIG_STATUS
|
||||
rm -fr confdefs* $ac_clean_files
|
||||
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|
||||
|
@@ -1,48 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_REVISION($Id$)dnl
|
||||
|
||||
AC_INIT(Makefile.in)
|
||||
|
||||
dnl ---------------
|
||||
dnl MMedia specific
|
||||
dnl ---------------
|
||||
|
||||
dnl Check for ESD
|
||||
|
||||
ESD_LINK=
|
||||
AC_CHECK_HEADER(esd.h, [
|
||||
AC_CHECK_LIB(esd, esd_close, [
|
||||
ESD_LINK="-lesd"
|
||||
])
|
||||
])
|
||||
|
||||
if test "$ESD_LINK" != "" ; then
|
||||
echo "ESound detected"
|
||||
fi
|
||||
|
||||
dnl -----------
|
||||
dnl Final subst
|
||||
|
||||
PATH_IFS=$wx_cv_path_ifs
|
||||
WX_TARGET_LIBRARY=$wx_cv_target_library
|
||||
WX_TARGET_LIBRARY_TYPE=$wx_cv_target_libtype
|
||||
|
||||
AC_SUBST(PATH_IFS)
|
||||
AC_SUBST(ESD_LINK)
|
||||
AC_SUBST(WX_TARGET_LIBRARY)
|
||||
AC_SUBST(WX_TARGET_LIBRARY_TYPE)
|
||||
|
||||
dnl -----------
|
||||
dnl File output
|
||||
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
src/ogl/Makefile
|
||||
src/mmedia/Makefile
|
||||
src/stc/Makefile
|
||||
samples/Makefile
|
||||
samples/mmedia/Makefile
|
||||
samples/stc/Makefile
|
||||
])
|
@@ -1,9 +0,0 @@
|
||||
\chapter{Bugs}\label{bugs}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
These are the known bugs.
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item No bugs
|
||||
\end{itemize}
|
@@ -1,24 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdbase.h at 26/Feb/00 14:52:12
|
||||
%
|
||||
|
||||
\section{\class{wxCDAudio}}\label{wxcdaudio}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxObject
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small
|
||||
\begin{verbatim}
|
||||
typedef struct wxCDtime {
|
||||
wxUint8 track
|
||||
};
|
||||
\end{verbatim}
|
||||
}
|
||||
{\small \begin{verbatim}
|
||||
typedef enum { PLAYING, PAUSED, STOPPED } CDstatus
|
||||
\end{verbatim}}
|
||||
|
@@ -1,66 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdunix.h at 26/Feb/00 14:52:10
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxCDAudioLinux}}\label{wxcdaudiolinux}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxCDAudio}{wxcdaudio}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxCDAudioLinux::wxCDAudioLinux}\label{wxcdaudiolinuxwxcdaudiolinux}
|
||||
|
||||
\func{}{wxCDAudioLinux}{\void}
|
||||
|
||||
\func{}{wxCDAudioLinux}{\param{const char* }{dev\_name}}
|
||||
|
||||
\membersection{wxCDAudioLinux::\destruct{wxCDAudioLinux}}\label{wxcdaudiolinuxdtor}
|
||||
|
||||
\func{}{\destruct{wxCDAudioLinux}}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::Play}\label{wxcdaudiolinuxplay}
|
||||
|
||||
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_time}, \param{const wxCDtime\& }{end\_time}}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::Pause}\label{wxcdaudiolinuxpause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::Resume}\label{wxcdaudiolinuxresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::GetStatus}\label{wxcdaudiolinuxgetstatus}
|
||||
|
||||
\func{CDstatus}{GetStatus}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::GetTime}\label{wxcdaudiolinuxgettime}
|
||||
|
||||
\func{wxCDtime}{GetTime}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::GetToc}\label{wxcdaudiolinuxgettoc}
|
||||
|
||||
\func{CDtoc\&}{GetToc}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::Ok}\label{wxcdaudiolinuxok}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::OpenDevice}\label{wxcdaudiolinuxopendevice}
|
||||
|
||||
\func{void}{OpenDevice}{\param{const char* }{dev\_name}}
|
||||
|
@@ -1,78 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdwin.h at 26/Feb/00 14:52:15
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxCDAudioWin}}\label{wxcdaudiowin}
|
||||
|
||||
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxCDAudio}{wxcdaudio}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small
|
||||
\begin{verbatim}
|
||||
typedef struct CDAW\_Internal {
|
||||
MCIDEVICEID dev\_id
|
||||
};
|
||||
\end{verbatim}
|
||||
}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::wxCDAudioWin}\label{wxcdaudiowinwxcdaudiowin}
|
||||
|
||||
\func{}{wxCDAudioWin}{\void}
|
||||
|
||||
\func{}{wxCDAudioWin}{\param{const char* }{dev\_name}}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::\destruct{wxCDAudioWin}}\label{wxcdaudiowindtor}
|
||||
|
||||
\func{}{\destruct{wxCDAudioWin}}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::Play}\label{wxcdaudiowinplay}
|
||||
|
||||
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_time}, \param{const wxCDtime\& }{end\_time}}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::Pause}\label{wxcdaudiowinpause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::Resume}\label{wxcdaudiowinresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::GetStatus}\label{wxcdaudiowingetstatus}
|
||||
|
||||
\func{CDstatus}{GetStatus}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::GetTime}\label{wxcdaudiowingettime}
|
||||
|
||||
\func{wxCDtime}{GetTime}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::GetToc}\label{wxcdaudiowingettoc}
|
||||
|
||||
\func{const CDtoc\&}{GetToc}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::Ok}\label{wxcdaudiowinok}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::PrepareToc}\label{wxcdaudiowinpreparetoc}
|
||||
|
||||
\func{void}{PrepareToc}{\void}
|
||||
|
@@ -1,111 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdbase.h at 26/Feb/00 14:52:12
|
||||
%
|
||||
|
||||
|
||||
\section{\class{CDtoc}}\label{cdtoc}
|
||||
|
||||
|
||||
Table of contents manager
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
No base class
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{CDtoc::CDtoc}\label{cdtoccdtoc}
|
||||
|
||||
\func{}{CDtoc}{\param{wxCDtime\& }{tot\_tm}, \param{wxCDtime* }{trks\_tm}, \param{wxCDtime* }{trks\_pos}}
|
||||
|
||||
|
||||
\membersection{CDtoc::GetTrackTime}\label{cdtocgettracktime}
|
||||
|
||||
\constfunc{wxCDtime}{GetTrackTime}{\param{wxUint8 }{track}}
|
||||
|
||||
Returns the length of the specified track
|
||||
track: track to get length
|
||||
|
||||
|
||||
\membersection{CDtoc::GetTrackPos}\label{cdtocgettrackpos}
|
||||
|
||||
\constfunc{wxCDtime}{GetTrackPos}{\param{wxUint8 }{track}}
|
||||
|
||||
Returns the position of the specified track
|
||||
track: track to get position
|
||||
|
||||
|
||||
\membersection{CDtoc::GetTotalTime}\label{cdtocgettotaltime}
|
||||
|
||||
\constfunc{wxCDtime}{GetTotalTime}{\void}
|
||||
|
||||
Returns the total time
|
||||
|
||||
|
||||
\membersection{wxCDAudio::wxCDAudio}\label{wxcdaudiowxcdaudio}
|
||||
|
||||
\func{}{wxCDAudio}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudio::\destruct{wxCDAudio}}\label{wxcdaudiodtor}
|
||||
|
||||
\func{}{\destruct{wxCDAudio}}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudio::Play}\label{wxcdaudioplay}
|
||||
|
||||
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_play}, \param{const wxCDtime\& }{end\_play}}
|
||||
|
||||
Play audio at the specified position
|
||||
|
||||
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_play}}
|
||||
|
||||
Play audio from the specified to the end of the CD audio
|
||||
|
||||
\func{bool}{Play}{\param{wxUint8 }{beg\_track}, \param{wxUint8 }{end\_track = 0}}
|
||||
|
||||
|
||||
\membersection{wxCDAudio::Pause}\label{wxcdaudiopause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
Pause the audio playing
|
||||
|
||||
|
||||
\membersection{wxCDAudio::Resume}\label{wxcdaudioresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
Resume a paused audio playing
|
||||
|
||||
|
||||
\membersection{wxCDAudio::GetStatus}\label{wxcdaudiogetstatus}
|
||||
|
||||
\func{CDstatus}{GetStatus}{\void}
|
||||
|
||||
Get the current CD status
|
||||
|
||||
|
||||
\membersection{wxCDAudio::GetTime}\label{wxcdaudiogettime}
|
||||
|
||||
\func{wxCDtime}{GetTime}{\void}
|
||||
|
||||
Get the current playing time
|
||||
|
||||
|
||||
\membersection{wxCDAudio::GetToc}\label{wxcdaudiogettoc}
|
||||
|
||||
\func{const CDtoc\&}{GetToc}{\void}
|
||||
|
||||
Returns the table of contents
|
||||
|
||||
|
||||
\membersection{wxCDAudio::Ok}\label{wxcdaudiook}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
|
||||
CD ok
|
||||
|
@@ -1,3 +0,0 @@
|
||||
\chapter{Change log}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
@@ -1,13 +0,0 @@
|
||||
\chapter{Class reference}\label{classref}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
These are the main Mmedia classes.
|
||||
|
||||
\input cdaudio.tex
|
||||
\input cdaudlnx.tex
|
||||
\input cdaudwin.tex
|
||||
\input cdtoc.tex
|
||||
\input sndbase.tex
|
||||
\input sndfile.tex
|
||||
\input sndfrmt.tex
|
@@ -1,47 +0,0 @@
|
||||
\chapter{Introduction}
|
||||
\pagenumbering{arabic}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
The MMedia wxWindows extension is a wxWindows library which provides you
|
||||
a full set of multimedia classes including sound recording/playing,
|
||||
cd audio playing and video playing. The API is portable and can be used
|
||||
on any supported systems with the insurance the behaviour will be the
|
||||
same.
|
||||
|
||||
\section{File structure}
|
||||
|
||||
These are the files that comprise the mmedia library.
|
||||
|
||||
\begin{description}\itemsep=0pt
|
||||
\item[sndbase.h] Header for wxSoundStream base class and wxSoundFormat base class.
|
||||
\item[sndbase.cpp] Basic objects implementation.
|
||||
\item[sndfile.h] wxSoundFileStream base class header.
|
||||
\item[sndfile.cpp] wxSoundFileStream base class implementation.
|
||||
\item[sndpcm.h] wxSoundFormatPcm class header.
|
||||
\item[sndpcm.cpp] wxSoundFormatPcm class implementation.
|
||||
\item[sndcpcm.h] wxSoundCodecPcm class header (PCM converter).
|
||||
\item[sndcpcm.cpp] wxSoundCodecPcm class implementation (PCM converter).
|
||||
\item[sndulaw.h]
|
||||
\item[sndulaw.cpp]
|
||||
\item[sndg72x.h]
|
||||
\item[sndg72x.cpp]
|
||||
\item[sndoss.h]
|
||||
\item[sndoss.cpp]
|
||||
\item[sndesd.h]
|
||||
\item[sndesd.cpp]
|
||||
\item[sndwin.h]
|
||||
\item[sndwin.cpp]
|
||||
\item[cdbase.h]
|
||||
\item[cdbase.cpp]
|
||||
\item[cdunix.h]
|
||||
\item[cdunix.cpp]
|
||||
\item[cdwin.h]
|
||||
\item[cdwin.cpp]
|
||||
\item[vidbase.h]
|
||||
\item[vidbase.cpp]
|
||||
\item[vidxanm.h]
|
||||
\item[vidxanm.cpp]
|
||||
\item[vidwin.h]
|
||||
\item[vidwin.cpp]
|
||||
\end{description}
|
@@ -1,45 +0,0 @@
|
||||
\documentstyle[a4,makeidx,verbatim,texhelp,fancyheadings]{report}
|
||||
\definecolour{black}{0}{0}{0}%
|
||||
\definecolour{cyan}{0}{255}{255}%
|
||||
\definecolour{green}{0}{255}{0}%
|
||||
\definecolour{magenta}{255}{0}{255}%
|
||||
\definecolour{red}{255}{0}{0}%
|
||||
\definecolour{blue}{0}{0}{200}%
|
||||
\definecolour{yellow}{255}{255}{0}%
|
||||
\definecolour{white}{255}{255}{255}%
|
||||
\input psbox.tex
|
||||
\parindent 0pt
|
||||
\parskip 11pt
|
||||
\title{MMedia for wxWindows}
|
||||
\author{Guilhem Lavaux}
|
||||
\date{March 2000}
|
||||
|
||||
\makeindex
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\pagestyle{fancyplain}
|
||||
\bibliographystyle{plain}
|
||||
\pagenumbering{roman}
|
||||
\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
\tableofcontents%
|
||||
|
||||
\input{intro.tex}
|
||||
%
|
||||
\input{sample.tex}
|
||||
%
|
||||
\input{classes.tex}
|
||||
%
|
||||
\input{topics.tex}
|
||||
%
|
||||
\input{bugs.tex}
|
||||
%
|
||||
\input{changes.tex}
|
||||
|
||||
%
|
||||
\addcontentsline{toc}{chapter}{Index}
|
||||
\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
\printindex
|
||||
\end{document}
|
@@ -1,520 +0,0 @@
|
||||
%
|
||||
% %%%%%%% %%%%% %%%%%% %%%%% % %
|
||||
% % % % % % % % % %
|
||||
% % % % % % % % % %
|
||||
% %%%%%%% %%%%% %%%%%% % % %
|
||||
% % % % % % % % %
|
||||
% % % % % % % % %
|
||||
% % %%%%%% %%%%%% %%%%% % %
|
||||
%
|
||||
% By Jean Orloff
|
||||
% Comments & suggestions by e-mail: ORLOFF@surya11.cern.ch
|
||||
% No modification of this file allowed if not e-sent to me.
|
||||
%
|
||||
% A simple way to measure the size of encapsulated postscript figures
|
||||
% from inside TeX, and to use it for automatically formatting texts
|
||||
% with inserted figures. Works both under Plain TeX-based macros
|
||||
% (Phyzzx, Harvmac, Psizzl, ...) and LaTeX environment.
|
||||
% Provides exactly the same result on any PostScript printer provided
|
||||
% the single instruction \psfor... is changed to fit the needs of the
|
||||
% particular dvi->ps translator used.
|
||||
% History:
|
||||
% 1.31: adds \psforDVIALW(?)
|
||||
% 1.30: adds \splitfile & \joinfiles for multi-file management
|
||||
% 1.24: fix error handling & add \psonlyboxes
|
||||
% 1.23: adds \putsp@ce for OzTeX fix
|
||||
% 1.22: makes \drawingBox \global for use in Phyzzx
|
||||
% 1.21: accepts %%BoundingBox: (atend)
|
||||
% 1.20: tries to add \psfordvitps for the TeXPS package.
|
||||
% 1.10: adds \psforoztex, error handling...
|
||||
%2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 2345678 6 2345678 7 23456789
|
||||
%
|
||||
\def\temp{1.31}
|
||||
\let\tempp=\relax
|
||||
\expandafter\ifx\csname psboxversion\endcsname\relax
|
||||
\message{version: \temp}
|
||||
\else
|
||||
\ifdim\temp cm>\psboxversion cm
|
||||
\message{version: \temp}
|
||||
\else
|
||||
\message{psbox(\psboxversion) is already loaded: I won't load
|
||||
psbox(\temp)!}
|
||||
\let\temp=\psboxversion
|
||||
\let\tempp=\endinput
|
||||
\fi
|
||||
\fi
|
||||
\tempp
|
||||
\let\psboxversion=\temp
|
||||
\catcode`\@=11
|
||||
% Every macro likes a little privacy...
|
||||
%
|
||||
% Some common defs
|
||||
%
|
||||
\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
|
||||
\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
|
||||
\def\executeinspecs#1{%
|
||||
\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}
|
||||
%
|
||||
%Trying to tame the variety of \special commands for Postscript: the
|
||||
% universal internal command \PSspeci@l##1##2 takes ##1 to be the
|
||||
% filename and ##2 to be the integer scale factor*1000 (as for usual
|
||||
% TeX \scale commands)
|
||||
%
|
||||
\def\psfortextures{% For TeXtures on the Macintosh
|
||||
%-----------------
|
||||
\def\PSspeci@l##1##2{%
|
||||
\special{illustration ##1\space scaled ##2}%
|
||||
}}
|
||||
%
|
||||
\def\psfordvitops{% For the DVItoPS converter on IBM mainframes
|
||||
%----------------
|
||||
\def\PSspeci@l##1##2{%
|
||||
\special{dvitops: import ##1\space \the\drawingwd \the\drawinght}%
|
||||
}}
|
||||
%
|
||||
\def\psfordvips{% For DVIPS converter on VAX, UNIX and PC's
|
||||
%--------------
|
||||
\def\PSspeci@l##1##2{%
|
||||
% \special{/@scaleunit 1000 def}% never read dox without trying!
|
||||
\d@my=0.1bp \d@mx=\drawingwd \divide\d@mx by\d@my%
|
||||
\special{PSfile=##1\space llx=\psllx\space lly=\pslly\space%
|
||||
urx=\psurx\space ury=\psury\space rwi=\number\d@mx}%
|
||||
}}
|
||||
%
|
||||
\def\psforoztex{% For the OzTeX shareware on the Macintosh
|
||||
%--------------
|
||||
\def\PSspeci@l##1##2{%
|
||||
\special{##1 \space
|
||||
##2 1000 div dup scale
|
||||
\putsp@ce{\number-\psllx} \putsp@ce{\number-\pslly} translate
|
||||
}%
|
||||
}}
|
||||
\def\putsp@ce#1{#1 }
|
||||
%
|
||||
\def\psfordvitps{% From the UNIX TeXPS package, vers.>3.12
|
||||
%---------------
|
||||
% Convert a dimension into the number \psn@sp (in scaled points)
|
||||
\def\psdimt@n@sp##1{\d@mx=##1\relax\edef\psn@sp{\number\d@mx}}
|
||||
\def\PSspeci@l##1##2{%
|
||||
% psfig.psr contains the def of "startTexFig": if you can locate it
|
||||
% and include the correct pathname, it should work
|
||||
\special{dvitps: Include0 "psfig.psr"}% contains def of "startTexFig"
|
||||
\psdimt@n@sp{\drawingwd}
|
||||
\special{dvitps: Literal "\psn@sp\space"}
|
||||
\psdimt@n@sp{\drawinght}
|
||||
\special{dvitps: Literal "\psn@sp\space"}
|
||||
\psdimt@n@sp{\psllx bp}
|
||||
\special{dvitps: Literal "\psn@sp\space"}
|
||||
\psdimt@n@sp{\pslly bp}
|
||||
\special{dvitps: Literal "\psn@sp\space"}
|
||||
\psdimt@n@sp{\psurx bp}
|
||||
\special{dvitps: Literal "\psn@sp\space"}
|
||||
\psdimt@n@sp{\psury bp}
|
||||
\special{dvitps: Literal "\psn@sp\space startTexFig\space"}
|
||||
\special{dvitps: Include1 "##1"}
|
||||
\special{dvitps: Literal "endTexFig\space"}
|
||||
}}
|
||||
\def\psforDVIALW{% Try for dvialw, a UNIX public domain
|
||||
%---------------
|
||||
\def\PSspeci@l##1##2{
|
||||
\special{language "PS"
|
||||
literal "##2 1000 div dup scale"
|
||||
include "##1"}}}
|
||||
\def\psonlyboxes{% Draft-like behaviour if none of the others works
|
||||
%---------------
|
||||
\def\PSspeci@l##1##2{%
|
||||
\at(0cm;0cm){\boxit{\vbox to\drawinght
|
||||
{\vss
|
||||
\hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1)}}\hss}
|
||||
}}}
|
||||
}%
|
||||
}
|
||||
%
|
||||
\def\psloc@lerr#1{%
|
||||
\let\savedPSspeci@l=\PSspeci@l%
|
||||
\def\PSspeci@l##1##2{%
|
||||
\at(0cm;0cm){\boxit{\vbox to\drawinght
|
||||
{\vss
|
||||
\hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1) #1}}\hss}
|
||||
}}}
|
||||
\let\PSspeci@l=\savedPSspeci@l% restore normal output for other figs!
|
||||
}%
|
||||
}
|
||||
%
|
||||
%\def\psfor... add your own!
|
||||
%
|
||||
% \ReadPSize{PSfilename} reads the dimensions of a PostScript drawing
|
||||
% and stores it in \drawinght(wd)
|
||||
\newread\pst@mpin
|
||||
\newdimen\drawinght\newdimen\drawingwd
|
||||
\newdimen\psxoffset\newdimen\psyoffset
|
||||
\newbox\drawingBox
|
||||
\newif\ifNotB@undingBox
|
||||
\newhelp\PShelp{Proceed: you'll have a 5cm square blank box instead of
|
||||
your graphics (Jean Orloff).}
|
||||
\def\@mpty{}
|
||||
\def\s@tsize#1 #2 #3 #4\@ndsize{
|
||||
\def\psllx{#1}\def\pslly{#2}%
|
||||
\def\psurx{#3}\def\psury{#4}% needed by a crazyness of dvips!
|
||||
\ifx\psurx\@mpty\NotB@undingBoxtrue% this is not a valid one!
|
||||
\else
|
||||
\drawinght=#4bp\advance\drawinght by-#2bp
|
||||
\drawingwd=#3bp\advance\drawingwd by-#1bp
|
||||
% !Units related by crazy factors as bp/pt=72.27/72 should be BANNED!
|
||||
\fi
|
||||
}
|
||||
\def\sc@nline#1:#2\@ndline{\edef\p@rameter{#1}\edef\v@lue{#2}}
|
||||
\def\g@bblefirstblank#1#2:{\ifx#1 \else#1\fi#2}
|
||||
\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
|
||||
\def\execute#1{#1}% Seems stupid, but cs are identified BEFORE execution
|
||||
{\catcode`\%=12
|
||||
\xdef\B@undingBox{%%BoundingBox}
|
||||
} %% is not a true comment in PostScript, even if % is!
|
||||
\def\ReadPSize#1{
|
||||
\edef\PSfilename{#1}
|
||||
\openin\pst@mpin=#1\relax
|
||||
\ifeof\pst@mpin \errhelp=\PShelp
|
||||
\errmessage{I haven't found your postscript file (\PSfilename)}
|
||||
\psloc@lerr{was not found}
|
||||
\s@tsize 0 0 142 142\@ndsize
|
||||
\closein\pst@mpin
|
||||
\else
|
||||
\immediate\write\psbj@inaux{#1,}
|
||||
\loop
|
||||
\executeinspecs{\catcode`\ =10\global\read\pst@mpin to\n@xtline}
|
||||
\ifeof\pst@mpin
|
||||
\errhelp=\PShelp
|
||||
\errmessage{(\PSfilename) is not an Encapsulated PostScript File:
|
||||
I could not find any \B@undingBox: line.}
|
||||
\edef\v@lue{0 0 142 142:}
|
||||
\psloc@lerr{is not an EPSFile}
|
||||
\NotB@undingBoxfalse
|
||||
\else
|
||||
\expandafter\sc@nline\n@xtline:\@ndline
|
||||
\ifx\p@rameter\B@undingBox\NotB@undingBoxfalse
|
||||
\edef\t@mp{%
|
||||
\expandafter\g@bblefirstblank\v@lue\space\space\space}
|
||||
\expandafter\s@tsize\t@mp\@ndsize
|
||||
\else\NotB@undingBoxtrue
|
||||
\fi
|
||||
\fi
|
||||
\ifNotB@undingBox\repeat
|
||||
\closein\pst@mpin
|
||||
\fi
|
||||
\message{#1}
|
||||
}
|
||||
%
|
||||
% \psboxto(xdim;ydim){psfilename}: you specify the dimensions and
|
||||
% TeX uniformly scales to fit the largest one. If xdim=0pt, the
|
||||
% scale is fully determined by ydim and vice versa.
|
||||
% Notice: psboxes are a real vboxes; couldn't take hbox otherwise all
|
||||
% indentation and all cr's would be interpreted as spaces (hugh!).
|
||||
%
|
||||
\newcount\xscale \newcount\yscale \newdimen\pscm\pscm=1cm
|
||||
\newdimen\d@mx \newdimen\d@my
|
||||
\let\ps@nnotation=\relax
|
||||
\def\psboxto(#1;#2)#3{\vbox{
|
||||
\ReadPSize{#3}
|
||||
\divide\drawingwd by 1000
|
||||
\divide\drawinght by 1000
|
||||
\d@mx=#1
|
||||
\ifdim\d@mx=0pt\xscale=1000
|
||||
\else \xscale=\d@mx \divide \xscale by \drawingwd\fi
|
||||
\d@my=#2
|
||||
\ifdim\d@my=0pt\yscale=1000
|
||||
\else \yscale=\d@my \divide \yscale by \drawinght\fi
|
||||
\ifnum\yscale=1000
|
||||
\else\ifnum\xscale=1000\xscale=\yscale
|
||||
\else\ifnum\yscale<\xscale\xscale=\yscale\fi
|
||||
\fi
|
||||
\fi
|
||||
\divide \psxoffset by 1000\multiply\psxoffset by \xscale
|
||||
\divide \psyoffset by 1000\multiply\psyoffset by \xscale
|
||||
\global\divide\pscm by 1000
|
||||
\global\multiply\pscm by\xscale
|
||||
\multiply\drawingwd by\xscale \multiply\drawinght by\xscale
|
||||
\ifdim\d@mx=0pt\d@mx=\drawingwd\fi
|
||||
\ifdim\d@my=0pt\d@my=\drawinght\fi
|
||||
\message{scaled \the\xscale}
|
||||
\hbox to\d@mx{\hss\vbox to\d@my{\vss
|
||||
\global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
|
||||
\kern-\psyoffset
|
||||
\PSspeci@l{\PSfilename}{\the\xscale}
|
||||
\vss}\hss\ps@nnotation}
|
||||
\global\ht\drawingBox=\the\drawinght
|
||||
\global\wd\drawingBox=\the\drawingwd
|
||||
\baselineskip=0pt
|
||||
\copy\drawingBox
|
||||
\vss}\hss}
|
||||
\global\psxoffset=0pt
|
||||
\global\psyoffset=0pt% These are local to one figure
|
||||
\global\pscm=1cm
|
||||
\global\drawingwd=\drawingwd
|
||||
\global\drawinght=\drawinght
|
||||
}}
|
||||
%
|
||||
% \psboxscaled{scalefactor*1000}{PSfilename} allows to bypass the
|
||||
% rounding errors of TeX integer divisions for situations where the
|
||||
% TeX box should fit the original BoundingBox with a precision better
|
||||
% than 1/1000.
|
||||
%
|
||||
\def\psboxscaled#1#2{\vbox{
|
||||
\ReadPSize{#2}
|
||||
\xscale=#1
|
||||
\message{scaled \the\xscale}
|
||||
\divide\drawingwd by 1000\multiply\drawingwd by\xscale
|
||||
\divide\drawinght by 1000\multiply\drawinght by\xscale
|
||||
\divide \psxoffset by 1000\multiply\psxoffset by \xscale
|
||||
\divide \psyoffset by 1000\multiply\psyoffset by \xscale
|
||||
\global\divide\pscm by 1000
|
||||
\global\multiply\pscm by\xscale
|
||||
\global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
|
||||
\kern-\psyoffset
|
||||
\PSspeci@l{\PSfilename}{\the\xscale}
|
||||
\vss}\hss\ps@nnotation}
|
||||
\global\ht\drawingBox=\the\drawinght
|
||||
\global\wd\drawingBox=\the\drawingwd
|
||||
\baselineskip=0pt
|
||||
\copy\drawingBox
|
||||
\global\psxoffset=0pt
|
||||
\global\psyoffset=0pt% These are local to one figure
|
||||
\global\pscm=1cm
|
||||
\global\drawingwd=\drawingwd
|
||||
\global\drawinght=\drawinght
|
||||
}}
|
||||
%
|
||||
% \psbox{PSfilename} makes a TeX box having the minimal size to
|
||||
% enclose the picture
|
||||
\def\psbox#1{\psboxscaled{1000}{#1}}
|
||||
%
|
||||
%
|
||||
% \joinfiles file1, file2, ...n \into joinedfilename .
|
||||
% makes one file out of many
|
||||
% \splitfile joinedfilename
|
||||
% the opposite
|
||||
%
|
||||
%\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
|
||||
%\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
|
||||
%\def\executeinspecs#1{%
|
||||
%\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}
|
||||
%\newread\pst@mpin
|
||||
\newif\ifn@teof\n@teoftrue
|
||||
\newif\ifc@ntrolline
|
||||
\newif\ifmatch
|
||||
\newread\j@insplitin
|
||||
\newwrite\j@insplitout
|
||||
\newwrite\psbj@inaux
|
||||
\immediate\openout\psbj@inaux=psbjoin.aux
|
||||
\immediate\write\psbj@inaux{\string\joinfiles}
|
||||
\immediate\write\psbj@inaux{\jobname,}
|
||||
%
|
||||
% We redefine input to keep track of the various files inputted
|
||||
%
|
||||
\immediate\let\oldinput=\input
|
||||
\def\input#1 {
|
||||
\immediate\write\psbj@inaux{#1,}
|
||||
\oldinput #1 }
|
||||
\def\empty{}
|
||||
\def\setmatchif#1\contains#2{
|
||||
\def\match##1#2##2\endmatch{
|
||||
\def\tmp{##2}
|
||||
\ifx\empty\tmp
|
||||
\matchfalse
|
||||
\else
|
||||
\matchtrue
|
||||
\fi}
|
||||
\match#1#2\endmatch}
|
||||
\def\warnopenout#1#2{
|
||||
\setmatchif{TrashMe,psbjoin.aux,psbjoin.all}\contains{#2}
|
||||
\ifmatch
|
||||
\else
|
||||
\immediate\openin\pst@mpin=#2
|
||||
\ifeof\pst@mpin
|
||||
\else
|
||||
\errhelp{If the content of this file is so precious to you, abort (ie
|
||||
press x or e) and rename it before retrying.}
|
||||
\errmessage{I'm just about to replace your file named #2}
|
||||
\fi
|
||||
\immediate\closein\pst@mpin
|
||||
\fi
|
||||
\message{#2}
|
||||
\immediate\openout#1=#2}
|
||||
% No comments allowed below: % will have an unusual catcode
|
||||
{
|
||||
\catcode`\%=12
|
||||
\gdef\splitfile#1 {
|
||||
\immediate\openin\j@insplitin=#1
|
||||
\message{Splitting file #1 into:}
|
||||
\warnopenout\j@insplitout{TrashMe}
|
||||
\loop
|
||||
\ifeof
|
||||
\j@insplitin\immediate\closein\j@insplitin\n@teoffalse
|
||||
\else
|
||||
\n@teoftrue
|
||||
\executeinspecs{\global\read\j@insplitin to\spl@tinline\expandafter
|
||||
\ch@ckbeginnewfile\spl@tinline%Beginning-Of-File-Named:%\endcheck}
|
||||
\ifc@ntrolline
|
||||
\else
|
||||
\toks0=\expandafter{\spl@tinline}
|
||||
\immediate\write\j@insplitout{\the\toks0}
|
||||
\fi
|
||||
\fi
|
||||
\ifn@teof\repeat
|
||||
\immediate\closeout\j@insplitout}
|
||||
\gdef\ch@ckbeginnewfile#1%Beginning-Of-File-Named:#2%#3\endcheck{
|
||||
\def\t@mp{#1}
|
||||
\ifx\empty\t@mp
|
||||
\def\t@mp{#3}
|
||||
\ifx\empty\t@mp
|
||||
\global\c@ntrollinefalse
|
||||
\else
|
||||
\immediate\closeout\j@insplitout
|
||||
\warnopenout\j@insplitout{#2}
|
||||
\global\c@ntrollinetrue
|
||||
\fi
|
||||
\else
|
||||
\global\c@ntrollinefalse
|
||||
\fi}
|
||||
\gdef\joinfiles#1\into#2 {
|
||||
\message{Joining following files into}
|
||||
\warnopenout\j@insplitout{#2}
|
||||
\message{:}
|
||||
{
|
||||
\edef\w@##1{\immediate\write\j@insplitout{##1}}
|
||||
\w@{% This text was produced with psbox's \string\joinfiles.}
|
||||
\w@{% To decompose and tex it:}
|
||||
\w@{%-save this with a filename CONTAINING ONLY LETTERS, and no extensions}
|
||||
\w@{% (say, JOINTFIL), in some uncrowded directory;}
|
||||
\w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);}
|
||||
\w@{%-tex JOINTFIL using Plain, or LaTeX, or whatever is needed by}
|
||||
\w@{% the first part in the joining (after splitting JOINTFIL into}
|
||||
\w@{% it's constituents, TeX will try to process it as it stands).}
|
||||
\w@{\string\input\space psbox.tex}
|
||||
\w@{\string\splitfile{\string\jobname}}
|
||||
}
|
||||
\tre@tfilelist#1, \endtre@t
|
||||
\immediate\closeout\j@insplitout}
|
||||
\gdef\tre@tfilelist#1, #2\endtre@t{
|
||||
\def\t@mp{#1}
|
||||
\ifx\empty\t@mp
|
||||
\else
|
||||
\llj@in{#1}
|
||||
\tre@tfilelist#2, \endtre@t
|
||||
\fi}
|
||||
\gdef\llj@in#1{
|
||||
\immediate\openin\j@insplitin=#1
|
||||
\ifeof\j@insplitin
|
||||
\errmessage{I couldn't find file #1.}
|
||||
\else
|
||||
\message{#1}
|
||||
\toks0={%Beginning-Of-File-Named:#1}
|
||||
\immediate\write\j@insplitout{\the\toks0}
|
||||
\executeinspecs{\global\read\j@insplitin to\oldj@ininline}
|
||||
\loop
|
||||
\ifeof\j@insplitin\immediate\closein\j@insplitin\n@teoffalse
|
||||
\else\n@teoftrue
|
||||
\executeinspecs{\global\read\j@insplitin to\j@ininline}
|
||||
\toks0=\expandafter{\oldj@ininline}
|
||||
\let\oldj@ininline=\j@ininline
|
||||
\immediate\write\j@insplitout{\the\toks0}
|
||||
\fi
|
||||
\ifn@teof
|
||||
\repeat
|
||||
\immediate\closein\j@insplitin
|
||||
\fi}
|
||||
}
|
||||
% To be put at the end of a file, for making an tar-like file containing
|
||||
% everything it used.
|
||||
\def\autojoin{
|
||||
\immediate\write\psbj@inaux{\string\into\space psbjoin.all}
|
||||
\immediate\closeout\psbj@inaux
|
||||
\input psbjoin.aux
|
||||
}
|
||||
%
|
||||
% Annotations & Captions etc...
|
||||
%
|
||||
%
|
||||
% \centinsert{anybox} is just a centered \midinsert, but is included as
|
||||
% people barely use the original inserts from TeX.
|
||||
%
|
||||
\def\centinsert#1{\midinsert\line{\hss#1\hss}\endinsert}
|
||||
\def\psannotate#1#2{\def\ps@nnotation{#2\global\let\ps@nnotation=\relax}#1}
|
||||
\def\pscaption#1#2{\vbox{
|
||||
\setbox\drawingBox=#1
|
||||
\copy\drawingBox
|
||||
\vskip\baselineskip
|
||||
\vbox{\hsize=\wd\drawingBox\setbox0=\hbox{#2}
|
||||
\ifdim\wd0>\hsize
|
||||
\noindent\unhbox0\tolerance=5000
|
||||
\else\centerline{\box0}
|
||||
\fi
|
||||
}}}
|
||||
% for compatibility with older versions
|
||||
\def\psfig#1#2#3{\pscaption{\psannotate{#1}{#2}}{#3}}
|
||||
\def\psfigurebox#1#2#3{\pscaption{\psannotate{\psbox{#1}}{#2}}{#3}}
|
||||
%
|
||||
% \at(#1;#2)#3 puts #3 at #1-higher and #2-right of the current
|
||||
% position without moving it (to be used in annotations).
|
||||
\def\at(#1;#2)#3{\setbox0=\hbox{#3}\ht0=0pt\dp0=0pt
|
||||
\rlap{\kern#1\vbox to0pt{\kern-#2\box0\vss}}}
|
||||
%
|
||||
% \gridfill(ht;wd) makes a 1cm*1cm grid of ht by wd whose lower-left
|
||||
% corner is the current point
|
||||
\newdimen\gridht \newdimen\gridwd
|
||||
\def\gridfill(#1;#2){
|
||||
\setbox0=\hbox to 1\pscm
|
||||
{\vrule height1\pscm width.4pt\leaders\hrule\hfill}
|
||||
\gridht=#1
|
||||
\divide\gridht by \ht0
|
||||
\multiply\gridht by \ht0
|
||||
\gridwd=#2
|
||||
\divide\gridwd by \wd0
|
||||
\multiply\gridwd by \wd0
|
||||
\advance \gridwd by \wd0
|
||||
\vbox to \gridht{\leaders\hbox to\gridwd{\leaders\box0\hfill}\vfill}}
|
||||
%
|
||||
% Useful to measure where to put annotations
|
||||
\def\fillinggrid{\at(0cm;0cm){\vbox{
|
||||
\gridfill(\drawinght;\drawingwd)}}}
|
||||
%
|
||||
% \textleftof\anybox: Sample text\endtext
|
||||
% inserts "Sample text" on the left of \anybox ie \vbox, \psbox.
|
||||
% \textrightof is the symmetric (not documented, too uggly)
|
||||
% Welcome any suggestion about clean wraparound macros from
|
||||
% TeXhackers reading this
|
||||
%
|
||||
\def\textleftof#1:{
|
||||
\setbox1=#1
|
||||
\setbox0=\vbox\bgroup
|
||||
\advance\hsize by -\wd1 \advance\hsize by -2em}
|
||||
\def\textrightof#1:{
|
||||
\setbox0=#1
|
||||
\setbox1=\vbox\bgroup
|
||||
\advance\hsize by -\wd0 \advance\hsize by -2em}
|
||||
\def\endtext{
|
||||
\egroup
|
||||
\hbox to \hsize{\valign{\vfil##\vfil\cr%
|
||||
\box0\cr%
|
||||
\noalign{\hss}\box1\cr}}}
|
||||
%
|
||||
% \frameit{\thick}{\skip}{\anybox}
|
||||
% draws with thickness \thick a box around \anybox, leaving \skip of
|
||||
% blank around it. eg \frameit{0.5pt}{1pt}{\hbox{hello}}
|
||||
% \boxit{\anybox} is a shortcut.
|
||||
\def\frameit#1#2#3{\hbox{\vrule width#1\vbox{
|
||||
\hrule height#1\vskip#2\hbox{\hskip#2\vbox{#3}\hskip#2}%
|
||||
\vskip#2\hrule height#1}\vrule width#1}}
|
||||
\def\boxit#1{\frameit{0.4pt}{0pt}{#1}}
|
||||
%
|
||||
%
|
||||
\catcode`\@=12 % cs containing @ are unreachable
|
||||
%
|
||||
% CUSTOMIZE YOUR DEFAULT DRIVER:
|
||||
% Uncomment the line corresponding to your TeX system:
|
||||
%\psfortextures% For TeXtures on the Macintosh
|
||||
%\psforoztex % For OzTeX shareware on the Macintosh
|
||||
%\psfordvitops % For the DVItoPS converter for TeX on IBM mainframes
|
||||
\psfordvips % For DVIPS converter on VAX and UNIX
|
||||
%\psfordvitps % For dvitps from TeXPS package under UNIX
|
||||
%\psforDVIALW % For DVIALW, UNIX public domain
|
||||
%\psonlyboxes % Blank Boxes (when all else fails).
|
@@ -1,6 +0,0 @@
|
||||
\chapter{MMboard: a sample MMedia application}\label{mmboard}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
To be written.
|
||||
|
@@ -1,68 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndaiff.h at 26/Feb/00 14:52:29
|
||||
%
|
||||
|
||||
\section{\class{wxSoundAiff}}\label{wxsoundaiff}
|
||||
|
||||
AIFF codec
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundFileStream}{wxsoundfilestream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::wxSoundAiff}\label{wxsoundaiffwxsoundaiff}
|
||||
|
||||
\func{}{wxSoundAiff}{\param{wxInputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
\func{}{wxSoundAiff}{\param{wxOutputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
\membersection{wxSoundAiff::\destruct{wxSoundAiff}}\label{wxsoundaiffdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundAiff}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::CanRead}\label{wxsoundaiffcanread}
|
||||
|
||||
\func{bool}{CanRead}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::GetCodecName}\label{wxsoundaiffgetcodecname}
|
||||
|
||||
\constfunc{wxString}{GetCodecName}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::PrepareToPlay}\label{wxsoundaiffpreparetoplay}
|
||||
|
||||
\func{bool}{PrepareToPlay}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::PrepareToRecord}\label{wxsoundaiffpreparetorecord}
|
||||
|
||||
\func{bool}{PrepareToRecord}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::FinishRecording}\label{wxsoundaifffinishrecording}
|
||||
|
||||
\func{bool}{FinishRecording}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::RepositionStream}\label{wxsoundaiffrepositionstream}
|
||||
|
||||
\func{bool}{RepositionStream}{\param{wxUint32 }{position}}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::GetData}\label{wxsoundaiffgetdata}
|
||||
|
||||
\func{wxUint32}{GetData}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::PutData}\label{wxsoundaiffputdata}
|
||||
|
||||
\func{wxUint32}{PutData}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
@@ -1,294 +0,0 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Name: sndbase.tex
|
||||
%% Purpose: wxMMedia docs
|
||||
%% Author: Guilhem Lavaux <lavaux@easynet.fr>
|
||||
%% Modified by:
|
||||
%% Created: 2000
|
||||
%% RCS-ID: $Id$
|
||||
%% Copyright: (c) wxWindows team
|
||||
%% Licence: wxWindows licence
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\section{\class{wxSoundStream}}\label{wxsoundstream}
|
||||
|
||||
Base class for sound streams
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
No base class
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/mmedia/sndbase.h>
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
%%
|
||||
%% wxSoundStream errors
|
||||
%%
|
||||
|
||||
\wxheading{wxSoundStream errors}
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxSOUND\_NOERR}}{No error occured}
|
||||
\twocolitem{{\bf wxSOUND\_IOERR}}{An input/output error occured, it may concern
|
||||
either a driver or a file}
|
||||
\twocolitem{{\bf wxSOUND\_INVFRMT}}{The sound format passed to the function is
|
||||
invalid. Generally, it means that you passed out of range values to the codec
|
||||
stream or you don't pass the right sound format object to the right sound codec
|
||||
stream.}
|
||||
\twocolitem{{\bf wxSOUND\_INVDEV}}{Invalid device. Generally, it means that the
|
||||
sound stream didn't manage to open the device driver due to an invalid parameter
|
||||
or to the fact that sound is not supported on this computer.}
|
||||
\twocolitem{{\bf wxSOUND\_NOEXACT}}{No exact matching sound codec has been found for
|
||||
this sound format. It means that the sound driver didn't manage to setup the sound
|
||||
card with the specified values.}
|
||||
\twocolitem{{\bf wxSOUND\_NOCODEC}}{No matching codec has been found. Generally, it
|
||||
may happen when you call wxSoundRouterStream::SetSoundFormat().}
|
||||
\twocolitem{{\bf wxSOUND\_MEMERR}}{Not enough memory.}
|
||||
\end{twocollist}
|
||||
|
||||
%%
|
||||
%% C callback
|
||||
%%
|
||||
|
||||
\wxheading{C callback for wxSound event}
|
||||
|
||||
When a sound event is generated, it may either call the internal sound event
|
||||
processor (which can be inherited) or call a C function. Its definition is:
|
||||
|
||||
\begin{verbatim}
|
||||
typedef void (*wxSoundCallback)(wxSoundStream *stream, int evt,
|
||||
void *cdata);
|
||||
\end{verbatim}
|
||||
|
||||
The {\bf stream} parameter represents the current wxSoundStream.
|
||||
|
||||
The {\bf evt} parameter represents the sound event which is the cause of the calling. (See \helpref{wxSound events}{wxsoundstream}).
|
||||
|
||||
The {\bf cdata} parameter represents the user callback data which were specified
|
||||
when the user called \helpref{wxSoundStream::Register}{wxsoundstreamregister}.
|
||||
|
||||
{\it Note:} There are two other ways to catch sound events: you can inherit the
|
||||
sound stream and redefine \helpref{wxSoundStream::OnSoundEvent}{wxsoundstreamonsoundevent}, or you can reroute the events to another sound stream using \helpref{wxSoundStream::SetEventHandler}{wxsoundstreamseteventhandler}.
|
||||
|
||||
%%
|
||||
%% wxSoundStream streaming mode
|
||||
%%
|
||||
|
||||
\wxheading{wxSound streaming mode}
|
||||
|
||||
The wxSoundStream object can work in three different modes. These modes are specified
|
||||
at the call to \helpref{wxSoundStream::StartProduction}{wxsoundstreamstartproduction}
|
||||
and cannot be changed until you call
|
||||
\helpref{wxSoundStream::StopProduction}{wxsoundstreamstopproduction}.
|
||||
|
||||
The {\bf wxSOUND\_INPUT} mode is the recording mode. It generates {\bf wxSOUND\_INPUT}
|
||||
events and you cannot use wxSoundStream::Write().
|
||||
|
||||
The {\bf wxSOUND\_OUTPUT} mode is the playing mode. It generates {\bf wxSOUND\_OUTPUT}
|
||||
events and you cannot use wxSoundStream::Read().
|
||||
|
||||
The {\bf wxSOUND\_DUPLEX} mode activates the full duplex mode. The full duplex requires
|
||||
you to make synchronous call to \helpref{wxSoundStream::Read}{wxsoundstreamread} and
|
||||
\helpref{wxSoundStream::Write}{wxsoundstreamwrite}. This means that you must be
|
||||
careful with realtime problems. Each time you call Read you must call Write.
|
||||
|
||||
%%
|
||||
%% wxSoundStream events
|
||||
%%
|
||||
|
||||
\wxheading{wxSoundStream events}
|
||||
|
||||
The sound events are generated when the sound driver (or the sound stream) completes
|
||||
a previous sound buffer. There are two possible sound events and two meanings.
|
||||
|
||||
The {\bf wxSOUND\_INPUT} event is generated when the sound stream has a new input
|
||||
buffer ready to be read. You know that you can read a buffer of the size
|
||||
\helpref{GetBestSize()}{wxsoundstreamgetbestsize} without blocking.
|
||||
|
||||
The {\bf wxSOUND\_OUTPUT} event is generated when the sound stream has completed a
|
||||
previous buffer. This buffer has been sent to the sound driver and it is ready to
|
||||
process a new buffer. Consequently, \helpref{Write}{wxsoundstreamwrite} will not
|
||||
block too.
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
%% Ctor && Dtor
|
||||
|
||||
\membersection{wxSoundStream::wxSoundStream}\label{wxsoundstreamwxsoundstream}
|
||||
|
||||
\func{}{wxSoundStream}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\membersection{wxSoundStream::\destruct{wxSoundStream}}\label{wxsoundstreamdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStream}}{\void}
|
||||
|
||||
Destructor. The destructor stops automatically all started production and destroys
|
||||
any temporary buffer.
|
||||
|
||||
%%
|
||||
%% Read
|
||||
%%
|
||||
|
||||
\membersection{wxSoundStream::Read}\label{wxsoundstreamread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
Reads {\it len} bytes from the sound stream. This call may block the user so
|
||||
use it carefully when you need to intensively refresh the GUI. You may be
|
||||
interested by sound events: see \helpref{wxSoundStream::OnSoundEvent}{wxsoundstreamonsoundevent}.
|
||||
|
||||
It is better to use the size returned by \helpref{wxSoundStream::GetBestSize}{wxsoundstreamgetbestsize}: this may improve performance or accuracy of the
|
||||
sound event system.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{len}{{\it len} is expressed in bytes. If you need to do conversions between bytes
|
||||
and seconds use wxSoundFormat.
|
||||
See \helpref{wxSoundFormatBase}{wxsoundformatbase}, \helpref{wxSoundStream::GetSoundFormat}{wxsoundstreamgetsoundformat}.}
|
||||
|
||||
\docparam{data}{Data in \it{buffer} are coded using the sound format attached to this sound
|
||||
stream. The format is specified with
|
||||
\helpref{SetSoundFormat}{wxsoundstreamsetsoundformat}.}
|
||||
|
||||
%%
|
||||
%% Write
|
||||
%%
|
||||
|
||||
\membersection{wxSoundStream::Write}\label{wxsoundstreamwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
Writes \it{len} bytes to the sound stream. This call may block the user so
|
||||
use it carefully. You may be interested by sound events: see
|
||||
\helpref{wxSoundStream::OnSoundEvent}{wxsoundstreamonsoundevent}.
|
||||
|
||||
It is better to use the size returned by \helpref{wxSoundStream::GetBestSize}{wxsoundstreamgetbestsize}: this may improve performance or accuracy of the
|
||||
sound event system.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{len}{This is expressed in bytes. If you need to do conversions between bytes
|
||||
and seconds use wxSoundFormat.
|
||||
See \helpref{wxSoundFormatBase}{wxsoundformatbase}, \helpref{wxSoundStream::GetSoundFormat}{wxsoundstreamgetsoundformat}.}
|
||||
|
||||
\docparam{buffer}{Data in \it{buffer} are coded using the sound format attached to this sound
|
||||
stream. The format is specified with
|
||||
\helpref{SetSoundFormat}{wxsoundstreamsetsoundformat}.}
|
||||
|
||||
%%
|
||||
%% GetBestSize
|
||||
%%
|
||||
|
||||
\membersection{wxSoundStream::GetBestSize}\label{wxsoundstreamgetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
||||
This function returns the best size for IO calls. The best size provides you
|
||||
a good alignment for data to be written (or read) to (or from) the sound stream.
|
||||
So, when, for example, a sound event is sent, you are sure the sound stream
|
||||
will not block for this buffer size.
|
||||
|
||||
%%
|
||||
%% wxSoundStream:SetSoundFormat
|
||||
%%
|
||||
|
||||
\membersection{wxSoundStream::SetSoundFormat}\label{wxsoundstreamsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
SetSoundFormat is one of the key function of the wxSoundStream object.
|
||||
It specifies the sound format the user needs. SetSoundFormat tries to
|
||||
apply the format to the current sound stream (it can be a sound file or a
|
||||
sound driver). Then, either it manages to apply it and it returns {\bf TRUE},
|
||||
or it could not and it returns {\bf FALSE}. In this case, you must check
|
||||
the error with
|
||||
\helpref{wxSoundStream::GetError}{wxsoundstreamgeterror}. See
|
||||
\helpref{wxSoundStream errors section}{wxsoundstream} for more details.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
The {\bf format} object can be destroyed after the call. The object does not need it.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
If the error is {\bf wxSOUND\_NOTEXACT}, the stream tries to find the best
|
||||
approaching format and setups it. You can check the format which it applied
|
||||
with \helpref{wxSoundStream::GetSoundFormat}{wxsoundstreamgetsoundformat}.
|
||||
|
||||
%%
|
||||
%% GetSoundFormat
|
||||
%%
|
||||
\membersection{wxSoundStream::GetSoundFormat}\label{wxsoundstreamgetsoundformat}
|
||||
\constfunc{wxSoundFormatBase\&}{GetSoundFormat}{\void}
|
||||
|
||||
It returns a reference to the current sound format of the stream represented by a
|
||||
wxSoundFormatBase object. This object {\it must not} be destroyed by anyone except
|
||||
the stream itself.
|
||||
|
||||
%%
|
||||
%% SetCallback
|
||||
%%
|
||||
\membersection{wxSoundStream::SetCallback}\label{wxsoundstreamregister}
|
||||
|
||||
\func{void}{Register}{\param{int }{evt}, \param{wxSoundCallback }{cbk}, \param{void* }{cdata}}
|
||||
|
||||
It installs a C callback for wxSoundStream events. The C callbacks are still
|
||||
useful to avoid hard inheritance. You can install only one callback per event.
|
||||
Each callback has its callback data.
|
||||
|
||||
%%
|
||||
%% StartProduction
|
||||
%%
|
||||
\membersection{wxSoundStream::StartProduction}\label{wxsoundstreamstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
StartProduction starts the sound streaming. {\it evt} may be one of
|
||||
{\bf wxSOUND\_INPUT}, {\bf wxSOUND\_OUTPUT} or {\bf wxSOUND\_DUPLEX}.
|
||||
You cannot specify several flags at the same time. Starting the production
|
||||
may automaticaly in position of buffer underrun (only in the case you activated
|
||||
recording). Actually this may happen the sound IO queue is too short.
|
||||
It is also advised that you fill quickly enough the sound IO queue when the
|
||||
driver requests it (through a wxSoundEvent).
|
||||
|
||||
\membersection{wxSoundStream::StopProduction}\label{wxsoundstreamstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
I stops the async notifier and the sound streaming straightly.
|
||||
|
||||
\membersection{wxSoundStream::SetEventHandler}\label{wxsoundstreamseteventhandler}
|
||||
|
||||
\func{void}{SetEventHandler}{\param{wxSoundStream* }{handler}}
|
||||
|
||||
Sets the event handler: if it is non-null, all events are routed to it.
|
||||
|
||||
\membersection{wxSoundStream::GetError}\label{wxsoundstreamgeterror}
|
||||
|
||||
\constfunc{wxSoundError}{GetError}{\void}
|
||||
|
||||
It returns the last error which occured.
|
||||
|
||||
\membersection{wxSoundStream::GetLastAccess}\label{wxsoundstreamgetlastaccess}
|
||||
|
||||
\constfunc{wxUint32}{GetLastAccess}{\void}
|
||||
|
||||
It returns the number of bytes which were effectively written to/read from the sound stream.
|
||||
|
||||
\membersection{wxSoundStream::QueueFilled}\label{wxsoundstreamqueuefilled}
|
||||
|
||||
\constfunc{bool}{QueueFilled}{\void}
|
||||
|
||||
It returns whether the sound IO queue is full. When it is full, the next IO call will block
|
||||
until the IO queue has at least one empty entry.
|
||||
|
||||
\membersection{wxSoundStream::OnSoundEvent}\label{wxsoundstreamonsoundevent}
|
||||
|
||||
\func{void}{OnSoundEvent}{\param{int }{evt}}
|
||||
|
||||
It is called by the wxSoundStream when a new sound event occured.
|
||||
|
@@ -1,39 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndcodec.h at 26/Feb/00 14:26:29
|
||||
%
|
||||
|
||||
\section{\class{wxSoundStreamCodec}}\label{wxsoundstreamcodec}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStream}{wxsoundstream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxSoundStreamCodec::wxSoundStreamCodec}\label{wxsoundstreamcodecwxsoundstreamcodec}
|
||||
|
||||
\func{}{wxSoundStreamCodec}{\param{wxSoundStream\& }{snd\_io}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamCodec::\destruct{wxSoundStreamCodec}}\label{wxsoundstreamcodecdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamCodec}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamCodec::StartProduction}\label{wxsoundstreamcodecstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamCodec::StopProduction}\label{wxsoundstreamcodecstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamCodec::GetBestSize}\label{wxsoundstreamcodecgetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
@@ -1,64 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndesd.h at 26/Feb/00 14:26:56
|
||||
%
|
||||
|
||||
\section{\class{wxSoundStreamESD}}\label{wxsoundstreamesd}
|
||||
|
||||
ESD output class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStream}{wxsoundstream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::wxSoundStreamESD}\label{wxsoundstreamesdwxsoundstreamesd}
|
||||
|
||||
\func{}{wxSoundStreamESD}{\param{const wxString\& }{hostname = "localhost"}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::\destruct{wxSoundStreamESD}}\label{wxsoundstreamesddtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamESD}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::Read}\label{wxsoundstreamesdread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::Write}\label{wxsoundstreamesdwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::SetSoundFormat}\label{wxsoundstreamesdsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::StartProduction}\label{wxsoundstreamesdstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::StopProduction}\label{wxsoundstreamesdstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::WakeUpEvt}\label{wxsoundstreamesdwakeupevt}
|
||||
|
||||
\func{void}{WakeUpEvt}{\param{int }{evt}}
|
||||
|
||||
You should not call this.
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::QueueFilled}\label{wxsoundstreamesdqueuefilled}
|
||||
|
||||
\constfunc{bool}{QueueFilled}{\void}
|
||||
|
@@ -1,87 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndg72x.h at 26/Feb/00 14:52:19
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundFormatG72X}}\label{wxsoundformatg72x}
|
||||
|
||||
|
||||
G72X format
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundFormatBase}{wxsoundformatbase}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef enum {
|
||||
wxSOUND\_G721,
|
||||
wxSOUND\_G723\_24,
|
||||
wxSOUND\_G723\_40
|
||||
} wxSoundG72XType
|
||||
\end{verbatim}}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef struct g72x\_state g72state
|
||||
\end{verbatim}}
|
||||
|
||||
This fixes a bug in Mingw95
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxSoundFormatG72X::wxSoundFormatG72X}\label{wxsoundformatg72xwxsoundformatg72x}
|
||||
|
||||
\func{}{wxSoundFormatG72X}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::\destruct{wxSoundFormatG72X}}\label{wxsoundformatg72xdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundFormatG72X}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::SetG72XType}\label{wxsoundformatg72xsetg72xtype}
|
||||
|
||||
\func{void}{SetG72XType}{\param{wxSoundG72XType }{type}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::GetG72XType}\label{wxsoundformatg72xgetg72xtype}
|
||||
|
||||
\constfunc{wxSoundG72XType}{GetG72XType}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::SetSampleRate}\label{wxsoundformatg72xsetsamplerate}
|
||||
|
||||
\func{void}{SetSampleRate}{\param{wxUint32 }{srate}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::GetSampleRate}\label{wxsoundformatg72xgetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::GetType}\label{wxsoundformatg72xgettype}
|
||||
|
||||
\constfunc{wxSoundFormatType}{GetType}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::Clone}\label{wxsoundformatg72xclone}
|
||||
|
||||
\constfunc{wxSoundFormatBase*}{Clone}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::GetTimeFromBytes}\label{wxsoundformatg72xgettimefrombytes}
|
||||
|
||||
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::GetBytesFromTime}\label{wxsoundformatg72xgetbytesfromtime}
|
||||
|
||||
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::operator!=}\label{wxsoundformatg72xoperatorneq}
|
||||
|
||||
\constfunc{bool}{operator!=}{\param{const wxSoundFormatBase\& }{frmt2}}
|
||||
|
@@ -1,228 +0,0 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Name: sndfile.tex
|
||||
%% Purpose: wxMMedia docs
|
||||
%% Author: Guilhem Lavaux <lavaux@easynet.fr>
|
||||
%% Modified by:
|
||||
%% Created: 2000
|
||||
%% RCS-ID: $Id$
|
||||
%% Copyright: (c) wxWindows team
|
||||
%% Licence: wxWindows licence
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\section{\class{wxSoundFileStream}}\label{wxsoundfilestream}
|
||||
|
||||
Base class for file coders/decoders. This class is not constructor (it is an abstract
|
||||
class).
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStream}{wxsoundstream}
|
||||
|
||||
\wxheading{Include file}
|
||||
|
||||
wx/sndfile.h
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxSoundFileStream::wxSoundFileStream}\label{wxsoundfilestreamwxsoundfilestream}
|
||||
|
||||
\func{}{wxSoundFileStream}{\param{wxInputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
It constructs a new file decoder object which will send
|
||||
audio data to the specified sound stream.
|
||||
The {\it stream} is the input stream to be decoded. The
|
||||
{\it io\_sound} is the destination sound stream.
|
||||
Once it has been constructed, you cannot change any of
|
||||
the specified streams nor the direction of the stream.
|
||||
|
||||
You will have access to the playback functions.
|
||||
|
||||
\func{}{wxSoundFileStream}{\param{wxOutputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
It constructs a new file coder object which will get
|
||||
data to be recorded from the specified sound stream.
|
||||
The {\it stream} is the output wxStream. The {\it io\_sound}
|
||||
is the source sound stream of the audio data. Once
|
||||
it has been constructed, you cannot change any of
|
||||
the specified streams nor the direction of the stream.
|
||||
|
||||
\membersection{wxSoundFileStream::\destruct{wxSoundFileStream}}\label{wxsoundfilestreamdtor}
|
||||
\func{}{\destruct{wxSoundFileStream}}{\void}
|
||||
|
||||
It destroys the current sound file codec.
|
||||
|
||||
\membersection{wxSoundFileStream::Play}\label{wxsoundfilestreamplay}
|
||||
\func{bool}{Play}{\void}
|
||||
|
||||
It starts playing the file. The playing begins, in background
|
||||
in nearly all cases, after the return of the function. The
|
||||
codec returns to a {\bf stopped} state when it reaches the
|
||||
end of the file.
|
||||
On success, it returns TRUE.
|
||||
|
||||
\membersection{wxSoundFileStream::Record}\label{wxsoundfilestreamrecord}
|
||||
\func{bool}{Record}{\param{wxUint32 }{time}}
|
||||
|
||||
It starts recording data from the sound stream and writing them
|
||||
to the output stream. You have to precise the recording length in
|
||||
parameter. This length is expressed in seconds. If you want to
|
||||
control the record length (using \helpref{Stop}{wxsoundfilestreamstop}),
|
||||
you can set it to wxSOUND\_INFINITE\_TIME.
|
||||
|
||||
On success, it returns TRUE.
|
||||
|
||||
\membersection{wxSoundFileStream::Stop}\label{wxsoundfilestreamstop}
|
||||
\func{bool}{Stop}{\void}
|
||||
|
||||
It stops either recording or playing. Whatever happens (even unexpected
|
||||
errors), the stream is stopped when the function returns. When you are
|
||||
in recording mode, the file headers are updated and flushed if possible
|
||||
(ie: if the output stream is seekable).
|
||||
|
||||
On success, it returns TRUE.
|
||||
|
||||
\membersection{wxSoundFileStream::Pause}\label{wxsoundfilestreampause}
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
The file codec tries to pause the stream: it means that it stops audio
|
||||
production but keep the file pointer at the place.
|
||||
|
||||
If the file codec is already paused, it returns FALSE.
|
||||
|
||||
On success, it returns TREE.
|
||||
|
||||
\membersection{wxSoundFileStream::Resume}\label{wxsoundfilestreamresume}
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
When the file codec has been paused using
|
||||
\helpref{Pause}{wxsoundfilestreampause}, you could be interrested in
|
||||
resuming it. This is the goal of this function.
|
||||
|
||||
\membersection{wxSoundFileStream::IsStopped}\label{wxsoundfilestreamisstopped}
|
||||
\constfunc{bool}{IsStopped}{\void}
|
||||
|
||||
It returns TRUE when the stream is stopped, in another case it returns
|
||||
FALSE.
|
||||
|
||||
\membersection{wxSoundFileStream::IsPaused}\label{wxsoundfilestreamispaused}
|
||||
\constfunc{bool}{IsPaused}{\void}
|
||||
|
||||
It returns TRUE when the stream is paused, in another case it returns
|
||||
FALSE.
|
||||
|
||||
\membersection{wxSoundFileStream::StartProduction}\label{wxsoundfilestreamstartproduction}
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
It is really not advised you call this function. From the wxSoundFileStream
|
||||
point of view it is an internal function. Internally, it is called after
|
||||
the file stream has been prepared to be played or to receive audio data and
|
||||
when it wants to start processing audio data.
|
||||
|
||||
\membersection{wxSoundFileStream::StopProduction}\label{wxsoundfilestreamstopproduction}
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
As for \helpref{StartProduction}{wxsoundfilestreamstopproduction}, it is not
|
||||
advised for you to call this function. It is called by
|
||||
\helpref{Stop}{wxsoundfilestreamstop} when it needs to stop the audio data
|
||||
processing.
|
||||
|
||||
\membersection{wxSoundFileStream::GetLength}\label{wxsoundfilestreamgetlength}
|
||||
\func{wxUint32}{GetLength}{\void}
|
||||
|
||||
It returns the audio data length of the file stream. This length is expressed
|
||||
in bytes. If you need the length in seconds, you will need to use
|
||||
\helpref{GetSoundFormat}{wxsoundstreamgetsoundformat} and
|
||||
\helpref{GetTimeFromBytes}{wxsoundformatbasegettimefrombytes}.
|
||||
|
||||
\membersection{wxSoundFileStream::GetPosition}\label{wxsoundfilestreamgetposition}
|
||||
\func{wxUint32}{GetPosition}{\void}
|
||||
|
||||
It returns the current position in the soundfile stream. The position
|
||||
is expressed in bytes. If you need the length in seconds, you will need to use
|
||||
\helpref{GetSoundFormat}{wxsoundstreamgetsoundformat} and
|
||||
\helpref{GetTimeFromBytes}{wxsoundformatbasegettimefrombytes}.
|
||||
|
||||
\membersection{wxSoundFileStream::SetPosition}\label{wxsoundfilestreamsetposition}
|
||||
\func{wxUint32}{SetPosition}{\param{wxUint32 }{new\_position}}
|
||||
|
||||
It sets the current in the soundfile stream. The position
|
||||
{\it new\_position} must be expressed in bytes. You can get
|
||||
a length/position in bytes from a time value using
|
||||
\helpref{GetSoundFormat}{wxsoundstreamgetsoundformat} and
|
||||
\helpref{GetTimeFromBytes}{wxsoundformatbasegettimefrombytes}.
|
||||
|
||||
On success, it returns TRUE.
|
||||
|
||||
\wxheading{Warning}
|
||||
|
||||
Some wxStream may not be capable to support this function as
|
||||
it may not support the seekable functionnality. If this happens,
|
||||
it returns FALSE and leave the stream at the same position.
|
||||
|
||||
\membersection{wxSoundFileStream::Read}\label{wxsoundfilestreamread}
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
You can obtain the audio data encoded in the file using this function.
|
||||
But it must be considered as an internal function. Used carelessly, it
|
||||
may corrupt the current state of the stream.
|
||||
Data are returned using in the original file coding (You must use a sound
|
||||
format object to decode it).
|
||||
|
||||
\membersection{wxSoundFileStream::Write}\label{wxsoundfilestreamwrite}
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
You can put encoded audio data to the file using this function.
|
||||
But it must be considered as an internal function. Used carelessly, it
|
||||
may corrupt the current state of the stream.
|
||||
Data must be coded with the specified file coding (You must use a sound
|
||||
format object to do this).
|
||||
|
||||
\membersection{wxSoundFileStream::SetSoundFormat}\label{wxsoundfilestreamsetsoundformat}
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
\membersection{wxSoundFileStream::GetCodecName}\label{wxsoundfilestreamgetcodecname}
|
||||
\constfunc{wxString}{GetCodecName}{\void}
|
||||
|
||||
This function returns the Codec name. This is useful for those who
|
||||
want to build a player (But also in some other case).
|
||||
|
||||
\membersection{wxSoundFileStream::CanRead}\label{wxsoundfilestreamcanread}
|
||||
\func{bool}{CanRead}{\void}
|
||||
|
||||
You should use this function to test whether this file codec can read
|
||||
the stream you passed to it.
|
||||
|
||||
\membersection{wxSoundFileStream::PrepareToPlay}\label{wxsoundfilestreampreparetoplay}
|
||||
\func{bool}{PrepareToPlay}{\void}
|
||||
|
||||
It is called by wxSoundFileStream to prepare the specific file loader
|
||||
to prepare itself to play the file. Actually, this includes reading
|
||||
headers and setting the various parameters of the sound format.
|
||||
This should not be called by an external user but it should be
|
||||
implemented when you inherit wxSoundFileStream to build a new codec.
|
||||
|
||||
It must return when the file is identified and the parameters have
|
||||
been set. In all other cases, you must return FALSE.
|
||||
|
||||
\membersection{wxSoundFileStream::PrepareToRecord}\label{wxsoundfilestreampreparetorecord}
|
||||
\func{bool}{PrepareToRecord}{\param{wxUint32 }{time}}
|
||||
|
||||
\membersection{wxSoundFileStream::FinishRecording}\label{wxsoundfilestreamfinishrecording}
|
||||
\func{bool}{FinishRecording}{\void}
|
||||
|
||||
\membersection{wxSoundFileStream::RepositionStream}\label{wxsoundfilestreamrepositionstream}
|
||||
\func{bool}{RepositionStream}{\param{wxUint32 }{position}}
|
||||
|
||||
|
||||
\membersection{wxSoundFileStream::FinishPreparation}\label{wxsoundfilestreamfinishpreparation}
|
||||
\func{void}{FinishPreparation}{\param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundFileStream::GetData}\label{wxsoundfilestreamgetdata}
|
||||
\func{wxUint32}{GetData}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundFileStream::PutData}\label{wxsoundfilestreamputdata}
|
||||
\func{wxUint32}{PutData}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
@@ -1,104 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndpcm.h at 26/Feb/00 14:26:33
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundFormatPcm}}\label{wxsoundformatpcm}
|
||||
|
||||
|
||||
PCM specification class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundFormatBase}{wxsoundformatbase}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::wxSoundFormatPcm}\label{wxsoundformatpcmwxsoundformatpcm}
|
||||
|
||||
\func{}{wxSoundFormatPcm}{\param{wxUint32 }{srate = 22500}, \param{wxUint8 }{bps = 8}, \param{wxUint16 }{channels = 2}, \param{bool }{sign = TRUE}, \param{int }{order = wxLITTLE\_ENDIAN}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::\destruct{wxSoundFormatPcm}}\label{wxsoundformatpcmdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundFormatPcm}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::SetSampleRate}\label{wxsoundformatpcmsetsamplerate}
|
||||
|
||||
\func{void}{SetSampleRate}{\param{wxUint32 }{srate}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::SetBPS}\label{wxsoundformatpcmsetbps}
|
||||
|
||||
\func{void}{SetBPS}{\param{wxUint8 }{bps}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::SetChannels}\label{wxsoundformatpcmsetchannels}
|
||||
|
||||
\func{void}{SetChannels}{\param{wxUint16 }{nchannels}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::SetOrder}\label{wxsoundformatpcmsetorder}
|
||||
|
||||
\func{void}{SetOrder}{\param{int }{order}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::Signed}\label{wxsoundformatpcmsigned}
|
||||
|
||||
\func{void}{Signed}{\param{bool }{sign}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetSampleRate}\label{wxsoundformatpcmgetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetBPS}\label{wxsoundformatpcmgetbps}
|
||||
|
||||
\constfunc{wxUint8}{GetBPS}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetChannels}\label{wxsoundformatpcmgetchannels}
|
||||
|
||||
\constfunc{wxUint16}{GetChannels}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetOrder}\label{wxsoundformatpcmgetorder}
|
||||
|
||||
\constfunc{int}{GetOrder}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::Signed}\label{wxsoundformatpcmgetsigned}
|
||||
|
||||
\constfunc{bool}{Signed}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetType}\label{wxsoundformatpcmgettype}
|
||||
|
||||
\constfunc{wxSoundFormatType}{GetType}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::Clone}\label{wxsoundformatpcmclone}
|
||||
|
||||
\constfunc{wxSoundFormatBase*}{Clone}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetTimeFromBytes}\label{wxsoundformatpcmgettimefrombytes}
|
||||
|
||||
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetBytesFromTime}\label{wxsoundformatpcmgetbytesfromtime}
|
||||
|
||||
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::operator!}\label{wxsoundformatpcmoperatornot}
|
||||
|
||||
\constfunc{bool}{operator!}{\param{const wxSoundFormatBase\& }{frmt2}}
|
||||
|
@@ -1,69 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndbase.h at 26/Feb/00 14:23:29
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundFormatBase}}\label{wxsoundformatbase}
|
||||
|
||||
|
||||
Base class for sound format specification
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
No base class
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef enum {
|
||||
wxSOUND\_NOFORMAT,
|
||||
wxSOUND\_PCM,
|
||||
wxSOUND\_ULAW,
|
||||
wxSOUND\_G72X,
|
||||
wxSOUND\_MSADPCM
|
||||
} wxSoundFormatType
|
||||
\end{verbatim}}
|
||||
|
||||
wxSoundFormatType: it specifies the format family of the sound data
|
||||
which will be passed to the stream.
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxSoundFormatBase::wxSoundFormatBase}\label{wxsoundformatbasewxsoundformatbase}
|
||||
|
||||
\func{}{wxSoundFormatBase}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::\destruct{wxSoundFormatBase}}\label{wxsoundformatbasedtor}
|
||||
|
||||
\func{}{\destruct{wxSoundFormatBase}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::GetType}\label{wxsoundformatbasegettype}
|
||||
|
||||
\constfunc{wxSoundFormatType}{GetType}{\void}
|
||||
|
||||
It returns a "standard" format type.
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::Clone}\label{wxsoundformatbaseclone}
|
||||
|
||||
\constfunc{wxSoundFormatBase*}{Clone}{\void}
|
||||
|
||||
It clones the current format.
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::GetTimeFromBytes}\label{wxsoundformatbasegettimefrombytes}
|
||||
|
||||
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::GetBytesFromTime}\label{wxsoundformatbasegetbytesfromtime}
|
||||
|
||||
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::operator!=}\label{wxsoundformatbaseoperatorneq}
|
||||
|
||||
\constfunc{bool}{operator!=}{\param{const wxSoundFormatBase\& }{frmt2}}
|
@@ -1,74 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndulaw.h at 26/Feb/00 14:52:25
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundFormatUlaw}}\label{wxsoundformatulaw}
|
||||
|
||||
|
||||
ULAW format
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundFormatBase}{wxsoundformatbase}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::wxSoundFormatUlaw}\label{wxsoundformatulawwxsoundformatulaw}
|
||||
|
||||
\func{}{wxSoundFormatUlaw}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::\destruct{wxSoundFormatUlaw}}\label{wxsoundformatulawdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundFormatUlaw}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::SetSampleRate}\label{wxsoundformatulawsetsamplerate}
|
||||
|
||||
\func{void}{SetSampleRate}{\param{wxUint32 }{srate}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::GetSampleRate}\label{wxsoundformatulawgetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::SetChannels}\label{wxsoundformatulawsetchannels}
|
||||
|
||||
\func{void}{SetChannels}{\param{wxUint8 }{channels}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::GetChannels}\label{wxsoundformatulawgetchannels}
|
||||
|
||||
\constfunc{wxUint8}{GetChannels}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::GetType}\label{wxsoundformatulawgettype}
|
||||
|
||||
\constfunc{wxSoundFormatType}{GetType}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::Clone}\label{wxsoundformatulawclone}
|
||||
|
||||
\constfunc{wxSoundFormatBase*}{Clone}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::GetTimeFromBytes}\label{wxsoundformatulawgettimefrombytes}
|
||||
|
||||
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::GetBytesFromTime}\label{wxsoundformatulawgetbytesfromtime}
|
||||
|
||||
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::operator!=}\label{wxsoundformatulawoperatorneq}
|
||||
|
||||
\constfunc{bool}{operator!=}{\param{const wxSoundFormatBase\& }{frmt2}}
|
||||
|
@@ -1,54 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndg72x.h at 26/Feb/00 14:52:19
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundStreamG72X}}\label{wxsoundstreamg72x}
|
||||
|
||||
|
||||
ULAW converter class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::wxSoundStreamG72X}\label{wxsoundstreamg72xwxsoundstreamg72x}
|
||||
|
||||
\func{}{wxSoundStreamG72X}{\param{wxSoundStream\& }{sndio}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::\destruct{wxSoundStreamG72X}}\label{wxsoundstreamg72xdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamG72X}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::Read}\label{wxsoundstreamg72xread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::Write}\label{wxsoundstreamg72xwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::SetSoundFormat}\label{wxsoundstreamg72xsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::PutBits}\label{wxsoundstreamg72xputbits}
|
||||
|
||||
\func{void}{PutBits}{\param{wxUint8 }{bits}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::GetBits}\label{wxsoundstreamg72xgetbits}
|
||||
|
||||
\func{wxUint8}{GetBits}{\void}
|
||||
|
@@ -1,71 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndoss.h at 26/Feb/00 14:26:53
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundStreamOSS}}\label{wxsoundstreamoss}
|
||||
|
||||
|
||||
OSS output class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStream}{wxsoundstream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::wxSoundStreamOSS}\label{wxsoundstreamosswxsoundstreamoss}
|
||||
|
||||
\func{}{wxSoundStreamOSS}{\param{const wxString\& }{dev\_name = \_T("/dev/dsp")}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::\destruct{wxSoundStreamOSS}}\label{wxsoundstreamossdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamOSS}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::Read}\label{wxsoundstreamossread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::Write}\label{wxsoundstreamosswrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::GetBestSize}\label{wxsoundstreamossgetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::SetSoundFormat}\label{wxsoundstreamosssetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::StartProduction}\label{wxsoundstreamossstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::StopProduction}\label{wxsoundstreamossstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::QueueFilled}\label{wxsoundstreamossqueuefilled}
|
||||
|
||||
\constfunc{bool}{QueueFilled}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::WakeUpEvt}\label{wxsoundstreamosswakeupevt}
|
||||
|
||||
\func{void}{WakeUpEvt}{\param{int }{evt}}
|
||||
|
||||
You should not call this.
|
||||
|
@@ -1,48 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndcpcm.h at 26/Feb/00 14:26:35
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundStreamPcm}}\label{wxsoundstreampcm}
|
||||
|
||||
|
||||
PCM converter class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef void (*ConverterType)(const char *buf\_in, char *buf\_out, wxUint32 len) ConverterType
|
||||
\end{verbatim}}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamPcm::wxSoundStreamPcm}\label{wxsoundstreampcmwxsoundstreampcm}
|
||||
|
||||
\func{}{wxSoundStreamPcm}{\param{wxSoundStream\& }{sndio}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamPcm::\destruct{wxSoundStreamPcm}}\label{wxsoundstreampcmdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamPcm}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamPcm::Read}\label{wxsoundstreampcmread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamPcm::Write}\label{wxsoundstreampcmwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamPcm::SetSoundFormat}\label{wxsoundstreampcmsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
@@ -1,59 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndfile.h at 26/Feb/00 14:26:42
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundRouterStream}}\label{wxsoundrouterstream}
|
||||
|
||||
|
||||
Codec router class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::wxSoundRouterStream}\label{wxsoundrouterstreamwxsoundrouterstream}
|
||||
|
||||
\func{}{wxSoundRouterStream}{\param{wxSoundStream\& }{sndio}}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::\destruct{wxSoundRouterStream}}\label{wxsoundrouterstreamdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundRouterStream}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::Read}\label{wxsoundrouterstreamread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::Write}\label{wxsoundrouterstreamwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::SetSoundFormat}\label{wxsoundrouterstreamsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::StartProduction}\label{wxsoundrouterstreamstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::StopProduction}\label{wxsoundrouterstreamstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::GetBestSize}\label{wxsoundrouterstreamgetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
@@ -1,49 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndulaw.h at 26/Feb/00 14:52:25
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundStreamUlaw}}\label{wxsoundstreamulaw}
|
||||
|
||||
|
||||
ULAW converter class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::wxSoundStreamUlaw}\label{wxsoundstreamulawwxsoundstreamulaw}
|
||||
|
||||
\func{}{wxSoundStreamUlaw}{\param{wxSoundStream\& }{sndio}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::\destruct{wxSoundStreamUlaw}}\label{wxsoundstreamulawdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamUlaw}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::Read}\label{wxsoundstreamulawread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::Write}\label{wxsoundstreamulawwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::SetSoundFormat}\label{wxsoundstreamulawsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::GetBestSize}\label{wxsoundstreamulawgetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
@@ -1,91 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndwav.h at 26/Feb/00 14:26:40
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundWave}}\label{wxsoundwave}
|
||||
|
||||
|
||||
WAVE codec
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundFileStream}{wxsoundfilestream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::wxSoundWave}\label{wxsoundwavewxsoundwave}
|
||||
|
||||
\func{}{wxSoundWave}{\param{wxInputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
\func{}{wxSoundWave}{\param{wxOutputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::\destruct{wxSoundWave}}\label{wxsoundwavedtor}
|
||||
|
||||
\func{}{\destruct{wxSoundWave}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::CanRead}\label{wxsoundwavecanread}
|
||||
|
||||
\func{bool}{CanRead}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::GetCodecName}\label{wxsoundwavegetcodecname}
|
||||
|
||||
\constfunc{wxString}{GetCodecName}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::PrepareToPlay}\label{wxsoundwavepreparetoplay}
|
||||
|
||||
\func{bool}{PrepareToPlay}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::PrepareToRecord}\label{wxsoundwavepreparetorecord}
|
||||
|
||||
\func{bool}{PrepareToRecord}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::FinishRecording}\label{wxsoundwavefinishrecording}
|
||||
|
||||
\func{bool}{FinishRecording}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::RepositionStream}\label{wxsoundwaverepositionstream}
|
||||
|
||||
\func{bool}{RepositionStream}{\param{wxUint32 }{position}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::GetData}\label{wxsoundwavegetdata}
|
||||
|
||||
\func{wxUint32}{GetData}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::PutData}\label{wxsoundwaveputdata}
|
||||
|
||||
\func{wxUint32}{PutData}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::HandleOutputPCM}\label{wxsoundwavehandleoutputpcm}
|
||||
|
||||
\func{bool}{HandleOutputPCM}{\param{wxDataInputStream\& }{data}, \param{wxUint16 }{channels}, \param{wxUint32 }{sample\_fq}, \param{wxUint32 }{byte\_p\_sec}, \param{wxUint16 }{byte\_p\_spl}, \param{wxUint16 }{bits\_p\_spl}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::HandleOutputG721}\label{wxsoundwavehandleoutputg721}
|
||||
|
||||
\func{bool}{HandleOutputG721}{\param{wxDataInputStream\& }{data}, \param{wxUint16 }{channels}, \param{wxUint32 }{sample\_fq}, \param{wxUint32 }{byte\_p\_sec}, \param{wxUint16 }{byte\_p\_spl}, \param{wxUint16 }{bits\_p\_spl}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::HandleInputPCM}\label{wxsoundwavehandleinputpcm}
|
||||
|
||||
\func{wxSoundFormatBase*}{HandleInputPCM}{\param{wxDataOutputStream\& }{data}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::HandleInputG72X}\label{wxsoundwavehandleinputg72x}
|
||||
|
||||
\func{wxSoundFormatBase*}{HandleInputG72X}{\param{wxDataOutputStream\& }{data}}
|
||||
|
@@ -1,140 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndwin.h at 26/Feb/00 14:26:51
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundStreamWin}}\label{wxsoundstreamwin}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStream}{wxsoundstream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef struct \_wxSoundInternal wxSoundInternal
|
||||
\end{verbatim}}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef struct \_wxSoundInfoHeader wxSoundInfoHeader
|
||||
\end{verbatim}}
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::wxSoundStreamWin}\label{wxsoundstreamwinwxsoundstreamwin}
|
||||
|
||||
\func{}{wxSoundStreamWin}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::\destruct{wxSoundStreamWin}}\label{wxsoundstreamwindtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamWin}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::Write}\label{wxsoundstreamwinwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::Read}\label{wxsoundstreamwinread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::SetSoundFormat}\label{wxsoundstreamwinsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{wxSoundFormatBase\& }{base}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::StartProduction}\label{wxsoundstreamwinstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::StopProduction}\label{wxsoundstreamwinstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::QueueFilled}\label{wxsoundstreamwinqueuefilled}
|
||||
|
||||
\constfunc{bool}{QueueFilled}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::NotifyDoneBuffer}\label{wxsoundstreamwinnotifydonebuffer}
|
||||
|
||||
\func{void}{NotifyDoneBuffer}{\param{wxUint32 }{dev\_handle}, \param{int }{flag}}
|
||||
|
||||
Internal but defined as public
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::GetBestSize}\label{wxsoundstreamwingetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::CreateSndWindow}\label{wxsoundstreamwincreatesndwindow}
|
||||
|
||||
\func{void}{CreateSndWindow}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::DestroySndWindow}\label{wxsoundstreamwindestroysndwindow}
|
||||
|
||||
\func{void}{DestroySndWindow}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::OpenDevice}\label{wxsoundstreamwinopendevice}
|
||||
|
||||
\func{bool}{OpenDevice}{\param{int }{mode}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::CloseDevice}\label{wxsoundstreamwinclosedevice}
|
||||
|
||||
\func{void}{CloseDevice}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::AllocHeader}\label{wxsoundstreamwinallocheader}
|
||||
|
||||
\func{wxSoundInfoHeader*}{AllocHeader}{\param{int }{mode}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::FreeHeader}\label{wxsoundstreamwinfreeheader}
|
||||
|
||||
\func{void}{FreeHeader}{\param{wxSoundInfoHeader* }{header}, \param{int }{mode}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::AllocHeaders}\label{wxsoundstreamwinallocheaders}
|
||||
|
||||
\func{bool}{AllocHeaders}{\param{int }{mode}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::FreeHeaders}\label{wxsoundstreamwinfreeheaders}
|
||||
|
||||
\func{void}{FreeHeaders}{\param{int }{mode}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::WaitFor}\label{wxsoundstreamwinwaitfor}
|
||||
|
||||
\func{void}{WaitFor}{\param{wxSoundInfoHeader* }{info}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::AddToQueue}\label{wxsoundstreamwinaddtoqueue}
|
||||
|
||||
\func{bool}{AddToQueue}{\param{wxSoundInfoHeader* }{info}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::ClearHeader}\label{wxsoundstreamwinclearheader}
|
||||
|
||||
\func{void}{ClearHeader}{\param{wxSoundInfoHeader* }{info}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::NextFragmentOutput}\label{wxsoundstreamwinnextfragmentoutput}
|
||||
|
||||
\func{wxSoundInfoHeader*}{NextFragmentOutput}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::NextFragmentInput}\label{wxsoundstreamwinnextfragmentinput}
|
||||
|
||||
\func{wxSoundInfoHeader*}{NextFragmentInput}{\void}
|
||||
|
@@ -1,10 +0,0 @@
|
||||
\chapter{Topic overviews}\label{overviews}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
The following sections describe particular topics.
|
||||
|
||||
\section{MMedia extension overview}\label{mmedoverview}
|
||||
|
||||
To be written.
|
||||
|
@@ -1,173 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/vidbase.h at 26/Feb/00 14:51:56
|
||||
%
|
||||
|
||||
\section{\class{wxVideoBaseDriver}}\label{wxvideobasedriver}
|
||||
|
||||
Classes definition
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxObject
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef enum {
|
||||
wxVIDEO\_MSAVI,
|
||||
wxVIDEO\_MPEG,
|
||||
wxVIDEO\_QT,
|
||||
wxVIDEO\_GIF,
|
||||
wxVIDEO\_JMOV,
|
||||
wxVIDEO\_FLI,
|
||||
wxVIDEO\_IFF,
|
||||
wxVIDEO\_SGI,
|
||||
wxVIDEO\_MPEG2
|
||||
} wxVideoType
|
||||
\end{verbatim}}
|
||||
|
||||
wxMMedia2 (video) types
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::wxVideoBaseDriver}\label{wxvideobasedriverwxvideobasedriver}
|
||||
|
||||
\func{}{wxVideoBaseDriver}{\void}
|
||||
|
||||
Ctors
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::wxVideoBaseDriver}\label{wxvideobasedriverwxvideobasedriver}
|
||||
|
||||
\func{}{wxVideoBaseDriver}{\param{wxInputStream\& }{str}}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::wxVideoBaseDriver}\label{wxvideobasedriverwxvideobasedriver}
|
||||
|
||||
\func{}{wxVideoBaseDriver}{\param{const wxString\& }{filename}}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::\destruct{wxVideoBaseDriver}}\label{wxvideobasedriverdtor}
|
||||
|
||||
\func{}{\destruct{wxVideoBaseDriver}}{\void}
|
||||
|
||||
Dtor
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::Play}\label{wxvideobasedriverplay}
|
||||
|
||||
\func{bool}{Play}{\void}
|
||||
|
||||
Usual functions ... They all return FALSE in case of errors.
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::Stop}\label{wxvideobasedriverstop}
|
||||
|
||||
\func{bool}{Stop}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::Pause}\label{wxvideobasedriverpause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::Resume}\label{wxvideobasedriverresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::SetSize}\label{wxvideobasedriversetsize}
|
||||
|
||||
\func{bool}{SetSize}{\param{wxSize }{size}}
|
||||
|
||||
Size management
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetSize}\label{wxvideobasedrivergetsize}
|
||||
|
||||
\constfunc{bool}{GetSize}{\param{wxSize\& }{size}}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::IsCapable}\label{wxvideobasedriveriscapable}
|
||||
|
||||
\constfunc{bool}{IsCapable}{\param{wxVideoType }{WXUNUSED(v\_type)}}
|
||||
|
||||
Test the capability of the driver to handle the specified type
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetMovieCodec}\label{wxvideobasedrivergetmoviecodec}
|
||||
|
||||
\constfunc{wxString}{GetMovieCodec}{\void}
|
||||
|
||||
Return the video codec name
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetAudioCodec}\label{wxvideobasedrivergetaudiocodec}
|
||||
|
||||
\constfunc{wxString}{GetAudioCodec}{\void}
|
||||
|
||||
Return the audio codec name
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetSampleRate}\label{wxvideobasedrivergetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
Return misc info about audio
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetChannels}\label{wxvideobasedrivergetchannels}
|
||||
|
||||
\constfunc{wxUint8}{GetChannels}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetBPS}\label{wxvideobasedrivergetbps}
|
||||
|
||||
\constfunc{wxUint8}{GetBPS}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetFrameRate}\label{wxvideobasedrivergetframerate}
|
||||
|
||||
\constfunc{double}{GetFrameRate}{\void}
|
||||
|
||||
Return frame rate
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetNbFrames}\label{wxvideobasedrivergetnbframes}
|
||||
|
||||
\constfunc{wxUint32}{GetNbFrames}{\void}
|
||||
|
||||
Return number of frames
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::OnFinished}\label{wxvideobasedriveronfinished}
|
||||
|
||||
\func{void}{OnFinished}{\void}
|
||||
|
||||
Called when the movie finished
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::AttachOutput}\label{wxvideobasedriverattachoutput}
|
||||
|
||||
\func{bool}{AttachOutput}{\param{wxWindow\& }{output}}
|
||||
|
||||
Attaches the video output to a window. The video will be shown in that window.
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::DetachOutput}\label{wxvideobasedriverdetachoutput}
|
||||
|
||||
\func{void}{DetachOutput}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::IsPaused}\label{wxvideobasedriverispaused}
|
||||
|
||||
\constfunc{bool}{IsPaused}{\void}
|
||||
|
||||
They return the state of the movie.
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::IsStopped}\label{wxvideobasedriverisstopped}
|
||||
|
||||
\constfunc{bool}{IsStopped}{\void}
|
||||
|
@@ -1,148 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/vidwin.h at 26/Feb/00 14:52:03
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxVideoWindows}}\label{wxvideowindows}
|
||||
|
||||
|
||||
|
||||
Class definition
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxVideoBaseDriver}{wxvideobasedriver}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef struct VIDW\_Internal {
|
||||
MCIDEVICEID m\_dev\_id
|
||||
};
|
||||
\end{verbatim}}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxVideoWindows::OpenFile}\label{wxvideowindowsopenfile}
|
||||
|
||||
\func{void}{OpenFile}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::wxVideoWindows}\label{wxvideowindowswxvideowindows}
|
||||
|
||||
\func{}{wxVideoWindows}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::wxVideoWindows}\label{wxvideowindowswxvideowindows}
|
||||
|
||||
\func{}{wxVideoWindows}{\param{wxInputStream\& }{str}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::wxVideoWindows}\label{wxvideowindowswxvideowindows}
|
||||
|
||||
\func{}{wxVideoWindows}{\param{const wxString\& }{fname}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::\destruct{wxVideoWindows}}\label{wxvideowindowsdtor}
|
||||
|
||||
\func{}{\destruct{wxVideoWindows}}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::Play}\label{wxvideowindowsplay}
|
||||
|
||||
\func{bool}{Play}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::Stop}\label{wxvideowindowsstop}
|
||||
|
||||
\func{bool}{Stop}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::Pause}\label{wxvideowindowspause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::Resume}\label{wxvideowindowsresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetSize}\label{wxvideowindowsgetsize}
|
||||
|
||||
\constfunc{bool}{GetSize}{\param{wxSize\& }{size}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::SetSize}\label{wxvideowindowssetsize}
|
||||
|
||||
\func{bool}{SetSize}{\param{wxSize }{size}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetMovieCodec}\label{wxvideowindowsgetmoviecodec}
|
||||
|
||||
\constfunc{wxString}{GetMovieCodec}{\void}
|
||||
|
||||
Return codec name for each stream.
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetAudioCodec}\label{wxvideowindowsgetaudiocodec}
|
||||
|
||||
\constfunc{wxString}{GetAudioCodec}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetSampleRate}\label{wxvideowindowsgetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
Return misc. info about audio
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetChannels}\label{wxvideowindowsgetchannels}
|
||||
|
||||
\constfunc{wxUint8}{GetChannels}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetBPS}\label{wxvideowindowsgetbps}
|
||||
|
||||
\constfunc{wxUint8}{GetBPS}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetFrameRate}\label{wxvideowindowsgetframerate}
|
||||
|
||||
\constfunc{double}{GetFrameRate}{\void}
|
||||
|
||||
Return the frame rate of the video (in frames/second)
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetNbFrames}\label{wxvideowindowsgetnbframes}
|
||||
|
||||
\constfunc{wxUint32}{GetNbFrames}{\void}
|
||||
|
||||
Return the total number of frames in the movie
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::IsCapable}\label{wxvideowindowsiscapable}
|
||||
|
||||
\func{bool}{IsCapable}{\param{wxVideoType }{v\_type}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::AttachOutput}\label{wxvideowindowsattachoutput}
|
||||
|
||||
\func{bool}{AttachOutput}{\param{wxWindow\& }{output}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::DetachOutput}\label{wxvideowindowsdetachoutput}
|
||||
|
||||
\func{void}{DetachOutput}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::IsPaused}\label{wxvideowindowsispaused}
|
||||
|
||||
\constfunc{bool}{IsPaused}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::IsStopped}\label{wxvideowindowsisstopped}
|
||||
|
||||
\constfunc{bool}{IsStopped}{\void}
|
||||
|
@@ -1,170 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/vidxanm.h at 26/Feb/00 14:52:06
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxVideoXANIM}}\label{wxvideoxanim}
|
||||
|
||||
|
||||
|
||||
Class definition
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxVideoBaseDriver}{wxvideobasedriver}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef struct wxXANIMinternal {
|
||||
Display *xanim\_dpy
|
||||
\end{verbatim}}
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::wxVideoXANIM}\label{wxvideoxanimwxvideoxanim}
|
||||
|
||||
\func{}{wxVideoXANIM}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::wxVideoXANIM}\label{wxvideoxanimwxvideoxanim}
|
||||
|
||||
\func{}{wxVideoXANIM}{\param{wxInputStream\& }{str}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::wxVideoXANIM}\label{wxvideoxanimwxvideoxanim}
|
||||
|
||||
\func{}{wxVideoXANIM}{\param{const wxString\& }{filename}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::\destruct{wxVideoXANIM}}\label{wxvideoxanimdtor}
|
||||
|
||||
\func{}{\destruct{wxVideoXANIM}}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::Play}\label{wxvideoxanimplay}
|
||||
|
||||
\func{bool}{Play}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::Pause}\label{wxvideoxanimpause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::Resume}\label{wxvideoxanimresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::Stop}\label{wxvideoxanimstop}
|
||||
|
||||
\func{bool}{Stop}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::SetVolume}\label{wxvideoxanimsetvolume}
|
||||
|
||||
\func{bool}{SetVolume}{\param{wxUint8 }{vol}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::SetSize}\label{wxvideoxanimsetsize}
|
||||
|
||||
\func{bool}{SetSize}{\param{wxSize }{size}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetSize}\label{wxvideoxanimgetsize}
|
||||
|
||||
\constfunc{bool}{GetSize}{\param{wxSize\& }{size}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetMovieCodec}\label{wxvideoxanimgetmoviecodec}
|
||||
|
||||
\constfunc{wxString}{GetMovieCodec}{\void}
|
||||
|
||||
Return the video codec name
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetAudioCodec}\label{wxvideoxanimgetaudiocodec}
|
||||
|
||||
\constfunc{wxString}{GetAudioCodec}{\void}
|
||||
|
||||
Return the audio codec name
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetSampleRate}\label{wxvideoxanimgetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
Return misc info about audio
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetChannels}\label{wxvideoxanimgetchannels}
|
||||
|
||||
\constfunc{wxUint8}{GetChannels}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetBPS}\label{wxvideoxanimgetbps}
|
||||
|
||||
\constfunc{wxUint8}{GetBPS}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetFrameRate}\label{wxvideoxanimgetframerate}
|
||||
|
||||
\constfunc{double}{GetFrameRate}{\void}
|
||||
|
||||
Return frame rate
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetNbFrames}\label{wxvideoxanimgetnbframes}
|
||||
|
||||
\constfunc{wxUint32}{GetNbFrames}{\void}
|
||||
|
||||
Return number of frames in the movie
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::IsCapable}\label{wxvideoxanimiscapable}
|
||||
|
||||
\constfunc{bool}{IsCapable}{\param{wxVideoType }{v\_type}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::AttachOutput}\label{wxvideoxanimattachoutput}
|
||||
|
||||
\func{bool}{AttachOutput}{\param{wxWindow\& }{output}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::DetachOutput}\label{wxvideoxanimdetachoutput}
|
||||
|
||||
\func{void}{DetachOutput}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::IsPaused}\label{wxvideoxanimispaused}
|
||||
|
||||
\constfunc{bool}{IsPaused}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::IsStopped}\label{wxvideoxanimisstopped}
|
||||
|
||||
\constfunc{bool}{IsStopped}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::RestartXANIM}\label{wxvideoxanimrestartxanim}
|
||||
|
||||
\func{bool}{RestartXANIM}{\void}
|
||||
|
||||
Start the subprocess with the right parameters
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::SendCommand}\label{wxvideoxanimsendcommand}
|
||||
|
||||
\func{bool}{SendCommand}{\param{const char* }{command}, \param{char** }{ret = NULL}, \param{wxUint32* }{size = NULL}}
|
||||
|
||||
Send a command to the subprocess
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::CollectInfo}\label{wxvideoxanimcollectinfo}
|
||||
|
||||
\func{bool}{CollectInfo}{\void}
|
||||
|
||||
Collect informations from XAnim
|
||||
|
@@ -1,46 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndaiff.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDAIFF_H
|
||||
#define _WX_SNDAIFF_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndaiff.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndfile.h"
|
||||
|
||||
//
|
||||
// AIFF codec
|
||||
//
|
||||
|
||||
class wxSoundAiff: public wxSoundFileStream {
|
||||
public:
|
||||
wxSoundAiff(wxInputStream& stream, wxSoundStream& io_sound);
|
||||
wxSoundAiff(wxOutputStream& stream, wxSoundStream& io_sound);
|
||||
~wxSoundAiff();
|
||||
|
||||
bool CanRead();
|
||||
wxString GetCodecName() const;
|
||||
|
||||
protected:
|
||||
bool PrepareToPlay();
|
||||
bool PrepareToRecord(wxUint32 time);
|
||||
bool FinishRecording();
|
||||
bool RepositionStream(wxUint32 position);
|
||||
|
||||
wxUint32 GetData(void *buffer, wxUint32 len);
|
||||
wxUint32 PutData(const void *buffer, wxUint32 len);
|
||||
protected:
|
||||
off_t m_base_offset;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,54 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndcpcm.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDCPCM_H
|
||||
#define _WX_SNDCPCM_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndcpcm.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
|
||||
//
|
||||
// PCM converter class
|
||||
//
|
||||
|
||||
class wxSoundStreamPcm: public wxSoundStreamCodec {
|
||||
public:
|
||||
typedef void (*ConverterType)(const void *buf_in, void *buf_out,
|
||||
wxUint32 len);
|
||||
|
||||
wxSoundStreamPcm(wxSoundStream& sndio);
|
||||
~wxSoundStreamPcm();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
protected:
|
||||
wxUint32 GetReadSize(wxUint32 len) const;
|
||||
wxUint32 GetWriteSize(wxUint32 len) const;
|
||||
|
||||
protected:
|
||||
ConverterType m_function_out, m_function_in;
|
||||
|
||||
// Static temporary buffer
|
||||
char *m_prebuffer;
|
||||
wxUint32 m_prebuffer_size;
|
||||
// Estimated best size to fit into the static buffer
|
||||
wxUint32 m_best_size;
|
||||
// Multiplier for IO buffer size
|
||||
float m_multiplier_in, m_multiplier_out;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,53 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndesd.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDESD_H
|
||||
#define _WX_SNDESD_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndesd.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndpcm.h"
|
||||
|
||||
//
|
||||
// ESD output class
|
||||
//
|
||||
|
||||
class wxSoundStreamESD : public wxSoundStream {
|
||||
public:
|
||||
wxSoundStreamESD(const wxString& hostname = wxT("localhost"));
|
||||
~wxSoundStreamESD();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
// You should not call this.
|
||||
void WakeUpEvt(int evt);
|
||||
|
||||
bool QueueFilled() const { return m_q_filled; }
|
||||
protected:
|
||||
int m_fd_input, m_fd_output; // ESD fds
|
||||
int m_tag_input, m_tag_output; // GLIB tags
|
||||
bool m_esd_stop; // Stream started ?
|
||||
bool m_esd_ok; // ESD detected
|
||||
wxString m_hostname; // ESD host
|
||||
bool m_q_filled; // queue filled
|
||||
|
||||
private:
|
||||
void DetectBest(wxSoundFormatPcm *pcm);
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,125 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndfile.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDFILE_H
|
||||
#define _WX_SNDFILE_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
|
||||
#define wxSOUND_INFINITE_TIME ((wxUint32)-1)
|
||||
|
||||
//
|
||||
// Codec router class
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundRouterStream: public wxSoundStreamCodec {
|
||||
public:
|
||||
wxSoundRouterStream(wxSoundStream& sndio);
|
||||
~wxSoundRouterStream();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
protected:
|
||||
wxSoundStream *m_router;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
wxSOUND_FILE_STOPPED,
|
||||
wxSOUND_FILE_PAUSED,
|
||||
wxSOUND_FILE_PLAYING,
|
||||
wxSOUND_FILE_RECORDING
|
||||
} wxSoundFileState;
|
||||
|
||||
//
|
||||
// Base class for file coders/decoders
|
||||
//
|
||||
|
||||
class wxSoundFileStream: public wxSoundStream {
|
||||
public:
|
||||
wxSoundFileStream(wxInputStream& stream, wxSoundStream& io_sound);
|
||||
wxSoundFileStream(wxOutputStream& stream, wxSoundStream& io_sound);
|
||||
~wxSoundFileStream();
|
||||
|
||||
// Usual sound file calls (Play, Stop, ...)
|
||||
bool Play();
|
||||
bool Record(wxUint32 time);
|
||||
bool Stop();
|
||||
bool Pause();
|
||||
bool Resume();
|
||||
|
||||
// Functions which return the current state
|
||||
bool IsStopped() const { return m_state == wxSOUND_FILE_STOPPED; }
|
||||
bool IsPaused() const { return m_state == wxSOUND_FILE_PAUSED; }
|
||||
|
||||
// A user should not call these two functions.
|
||||
// Several things must be done before calling them.
|
||||
// Users should use Play(), ...
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
// These three functions deals with the length, the position in the sound file.
|
||||
// All the values are expressed in bytes. If you need the values expressed
|
||||
// in terms of time, you have to use GetSoundFormat().GetTimeFromBytes(...)
|
||||
wxUint32 GetLength();
|
||||
wxUint32 GetPosition();
|
||||
wxUint32 SetPosition(wxUint32 new_position);
|
||||
|
||||
// These two functions use the sound format specified by GetSoundFormat().
|
||||
// All samples must be encoded in that format.
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
// This function set the sound format of the file. !! It must be used only
|
||||
// when you are in output mode (concerning the file) !! If you are in
|
||||
// input mode (concerning the file) you can't use this function to modify
|
||||
// the format of the samples returned by Read() !
|
||||
// For this action, you must use wxSoundRouterStream applied to wxSoundFileStream.
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
// This function returns the Codec name. This is useful for those who want to build
|
||||
// a player (But also in some other case).
|
||||
virtual wxString GetCodecName() const;
|
||||
|
||||
// You should use this function to test whether this file codec can read
|
||||
// the stream you passed to it.
|
||||
virtual bool CanRead() { return FALSE; }
|
||||
|
||||
protected:
|
||||
wxSoundRouterStream m_codec;
|
||||
wxSoundStream *m_sndio;
|
||||
wxInputStream *m_input;
|
||||
wxOutputStream *m_output;
|
||||
|
||||
wxSoundFileState m_state, m_oldstate;
|
||||
wxUint32 m_length, m_bytes_left;
|
||||
bool m_prepared;
|
||||
|
||||
protected:
|
||||
virtual bool PrepareToPlay() = 0;
|
||||
virtual bool PrepareToRecord(wxUint32 time) = 0;
|
||||
virtual bool FinishRecording() = 0;
|
||||
virtual bool RepositionStream(wxUint32 position) = 0;
|
||||
void FinishPreparation(wxUint32 len);
|
||||
|
||||
virtual wxUint32 GetData(void *buffer, wxUint32 len) = 0;
|
||||
virtual wxUint32 PutData(const void *buffer, wxUint32 len) = 0;
|
||||
|
||||
void OnSoundEvent(int evt);
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,72 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndmsad(pcm).h
|
||||
// Purpose: MS ADPCM codec
|
||||
// Date: 25/02/2000
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 2000
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDULAW_H
|
||||
#define _WX_SNDULAW_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndmsad.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
WX_DEFINE_EXPORTED_ARRAY(wxUint16, wxMSAdpcmCoeffs);
|
||||
|
||||
//
|
||||
// MSADPCM format
|
||||
//
|
||||
class WXDLLEXPORT wxSoundFormatMSAdpcm: public wxSoundFormatBase {
|
||||
public:
|
||||
wxSoundFormatMSAdpcm();
|
||||
~wxSoundFormatMSAdpcm();
|
||||
|
||||
void SetSampleRate(wxUint32 srate);
|
||||
wxUint32 GetSampleRate() const;
|
||||
|
||||
void SetSamplesBlock(wxUint16 sampblock);
|
||||
wxUint16 GetSamplesBlock() const;
|
||||
|
||||
void SetCoefs(wxMSAdpcmCoefs& coefs);
|
||||
wxMSAdpcmCoefs& GetCoefs() const;
|
||||
|
||||
wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
|
||||
wxSoundFormatBase *Clone() const;
|
||||
|
||||
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
|
||||
wxUint32 GetBytesFromTime(wxUint32 time) const;
|
||||
|
||||
bool operator !=(const wxSoundFormatBase& frmt2) const;
|
||||
|
||||
protected:
|
||||
wxUint32 m_srate;
|
||||
wxMSAdpcmCoefs *m_coefs;
|
||||
};
|
||||
|
||||
//
|
||||
// MS ADPCM converter class
|
||||
//
|
||||
class WXDLLEXPORT wxSoundRouterStream;
|
||||
class WXDLLEXPORT wxSoundStreamAdpcm: public wxSoundStreamCodec {
|
||||
public:
|
||||
wxSoundStreamAdpcm(wxSoundStream& sndio);
|
||||
~wxSoundStreamAdpcm();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
protected:
|
||||
wxSoundRouterStream *m_router;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,67 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndulaw.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDULAW_H
|
||||
#define _WX_SNDULAW_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndulaw.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
//
|
||||
// ULAW format
|
||||
//
|
||||
class WXDLLEXPORT wxSoundFormatUlaw: public wxSoundFormatBase {
|
||||
public:
|
||||
wxSoundFormatUlaw();
|
||||
~wxSoundFormatUlaw();
|
||||
|
||||
void SetSampleRate(wxUint32 srate);
|
||||
wxUint32 GetSampleRate() const;
|
||||
|
||||
void SetChannels(wxUint8 channels);
|
||||
wxUint8 GetChannels() const;
|
||||
|
||||
wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
|
||||
wxSoundFormatBase *Clone() const;
|
||||
|
||||
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
|
||||
wxUint32 GetBytesFromTime(wxUint32 time) const;
|
||||
|
||||
bool operator !=(const wxSoundFormatBase& frmt2) const;
|
||||
|
||||
protected:
|
||||
wxUint32 m_srate;
|
||||
wxUint8 m_channels;
|
||||
};
|
||||
|
||||
//
|
||||
// ULAW converter class
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundRouterStream;
|
||||
class WXDLLEXPORT wxSoundStreamUlaw: public wxSoundStreamCodec {
|
||||
public:
|
||||
wxSoundStreamUlaw(wxSoundStream& sndio);
|
||||
~wxSoundStreamUlaw();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
protected:
|
||||
wxSoundRouterStream *m_router;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,58 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndwav.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDWAV_H
|
||||
#define _WX_SNDWAV_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndwav.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/datstrm.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndfile.h"
|
||||
|
||||
//
|
||||
// WAVE codec
|
||||
//
|
||||
|
||||
class wxSoundWave: public wxSoundFileStream {
|
||||
public:
|
||||
wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound);
|
||||
wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound);
|
||||
~wxSoundWave();
|
||||
|
||||
bool CanRead();
|
||||
wxString GetCodecName() const;
|
||||
|
||||
protected:
|
||||
bool PrepareToPlay();
|
||||
bool PrepareToRecord(wxUint32 time);
|
||||
bool FinishRecording();
|
||||
bool RepositionStream(wxUint32 position);
|
||||
|
||||
wxUint32 GetData(void *buffer, wxUint32 len);
|
||||
wxUint32 PutData(const void *buffer, wxUint32 len);
|
||||
|
||||
bool HandleOutputPCM(wxDataInputStream& data, wxUint16 channels,
|
||||
wxUint32 sample_fq, wxUint32 byte_p_sec,
|
||||
wxUint16 byte_p_spl, wxUint16 bits_p_spl);
|
||||
bool HandleOutputG721(wxDataInputStream& data, wxUint16 channels,
|
||||
wxUint32 sample_fq, wxUint32 byte_p_sec,
|
||||
wxUint16 byte_p_spl, wxUint16 bits_p_spl);
|
||||
wxSoundFormatBase *HandleInputPCM(wxDataOutputStream& data);
|
||||
wxSoundFormatBase *HandleInputG72X(wxDataOutputStream& data);
|
||||
|
||||
protected:
|
||||
off_t m_base_offset;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,110 +0,0 @@
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
// Name: vidbase.h
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1997
|
||||
// Updated: 1998
|
||||
// Copyright: (C) 1997, 1998, Guilhem Lavaux
|
||||
// CVS: $Id$
|
||||
// License: wxWindows license
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
/* Real -*- C++ -*- */
|
||||
#ifndef __VID_bdrv_H__
|
||||
#define __VID_bdrv_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "vidbase.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers (this file is usually all you
|
||||
// need because it includes almost all "standard" wxWindows headers
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/window.h"
|
||||
#include "wx/frame.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMMedia2 (video) types
|
||||
|
||||
typedef enum {
|
||||
wxVIDEO_MSAVI,
|
||||
wxVIDEO_MPEG,
|
||||
wxVIDEO_QT,
|
||||
wxVIDEO_GIF,
|
||||
wxVIDEO_JMOV,
|
||||
wxVIDEO_FLI,
|
||||
wxVIDEO_IFF,
|
||||
wxVIDEO_SGI,
|
||||
wxVIDEO_MPEG2
|
||||
} wxVideoType;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Classes definition
|
||||
|
||||
class WXDLLEXPORT wxVideoBaseDriver : public wxObject {
|
||||
DECLARE_ABSTRACT_CLASS(wxVideoBaseDriver)
|
||||
protected:
|
||||
wxWindow *m_video_output;
|
||||
public:
|
||||
// Ctors
|
||||
wxVideoBaseDriver();
|
||||
wxVideoBaseDriver(wxInputStream& str);
|
||||
wxVideoBaseDriver(const wxString& filename);
|
||||
// Dtor
|
||||
virtual ~wxVideoBaseDriver();
|
||||
|
||||
// Usual functions ... They all return FALSE in case of errors.
|
||||
virtual bool Play() = 0;
|
||||
virtual bool Stop() = 0;
|
||||
virtual bool Pause() = 0;
|
||||
virtual bool Resume() = 0;
|
||||
|
||||
// Size management
|
||||
virtual bool SetSize(wxSize size) = 0;
|
||||
virtual bool GetSize(wxSize& size) const = 0;
|
||||
|
||||
// Test the capability of the driver to handle the specified type
|
||||
virtual bool IsCapable(wxVideoType WXUNUSED(v_type)) const { return FALSE; }
|
||||
|
||||
// Return the video codec name
|
||||
virtual wxString GetMovieCodec() const = 0;
|
||||
// Return the audio codec name
|
||||
virtual wxString GetAudioCodec() const = 0;
|
||||
// Return misc info about audio
|
||||
virtual wxUint32 GetSampleRate() const = 0;
|
||||
virtual wxUint8 GetChannels() const = 0;
|
||||
virtual wxUint8 GetBPS() const = 0;
|
||||
// Return frame rate
|
||||
virtual double GetFrameRate() const = 0;
|
||||
// Return number of frames
|
||||
virtual wxUint32 GetNbFrames() const = 0;
|
||||
|
||||
// Called when the movie finished
|
||||
virtual void OnFinished() {}
|
||||
|
||||
// Attaches the video output to a window. The video will be shown in that window.
|
||||
virtual bool AttachOutput(wxWindow& output);
|
||||
virtual void DetachOutput();
|
||||
|
||||
// They return the state of the movie.
|
||||
virtual bool IsPaused() const = 0;
|
||||
virtual bool IsStopped() const = 0;
|
||||
};
|
||||
|
||||
WXDLLEXPORT wxFrame *wxVideoCreateFrame(wxVideoBaseDriver *vid_drv);
|
||||
|
||||
|
||||
#endif
|
@@ -1,101 +0,0 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
// Name: vidwin.h
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: February 1998
|
||||
// Updated:
|
||||
// Copyright: (C) 1998, Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __VID_windows_H__
|
||||
#define __VID_windows_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "vidwin.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers (this file is usually all you
|
||||
// need because it includes almost all "standard" wxWindows headers
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/string.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/window.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMMedia2 headers
|
||||
|
||||
#include "wx/mmedia/vidbase.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// System headers and private types
|
||||
|
||||
#ifdef WXMMEDIA_INTERNAL
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
typedef struct VIDW_Internal {
|
||||
MCIDEVICEID m_dev_id;
|
||||
} wxVIDWinternal;
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Class definition
|
||||
|
||||
class WXDLLEXPORT wxVideoWindows : public wxVideoBaseDriver {
|
||||
DECLARE_DYNAMIC_CLASS(wxVideoWindows)
|
||||
protected:
|
||||
struct VIDW_Internal *m_internal;
|
||||
bool m_paused, m_stopped, m_remove_file;
|
||||
wxString m_filename;
|
||||
double m_frameRate;
|
||||
wxUint8 m_bps;
|
||||
|
||||
void OpenFile();
|
||||
public:
|
||||
wxVideoWindows(void);
|
||||
wxVideoWindows(wxInputStream& str);
|
||||
wxVideoWindows(const wxString& fname);
|
||||
~wxVideoWindows(void);
|
||||
|
||||
bool Play();
|
||||
bool Stop();
|
||||
bool Pause();
|
||||
bool Resume();
|
||||
|
||||
bool GetSize(wxSize& size) const;
|
||||
bool SetSize(wxSize size);
|
||||
|
||||
// Return codec name for each stream.
|
||||
wxString GetMovieCodec() const;
|
||||
wxString GetAudioCodec() const;
|
||||
// Return misc. info about audio
|
||||
wxUint32 GetSampleRate() const;
|
||||
wxUint8 GetChannels() const;
|
||||
wxUint8 GetBPS() const;
|
||||
// Return the frame rate of the video (in frames/second)
|
||||
double GetFrameRate() const;
|
||||
// Return the total number of frames in the movie
|
||||
wxUint32 GetNbFrames() const;
|
||||
|
||||
bool IsCapable(wxVideoType v_type);
|
||||
|
||||
bool AttachOutput(wxWindow& output);
|
||||
void DetachOutput(void);
|
||||
|
||||
bool IsPaused() const;
|
||||
bool IsStopped() const;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,136 +0,0 @@
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
// Name: vidxanm.h
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1997
|
||||
// Updated: 1998
|
||||
// Copyright: (C) 1997, 1998, Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
/* Real -*- C++ -*- */
|
||||
#ifndef __VID_xanim_H__
|
||||
#define __VID_xanim_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "vidxanm.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers (this file is usually all you
|
||||
// need because it includes almost all "standard" wxWindows headers
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/process.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// System dependent headers
|
||||
|
||||
#if defined(WXMMEDIA_INTERNAL) && (defined(__X__) || defined(__WXGTK__))
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMMedia2 headers
|
||||
|
||||
#include "wx/mmedia/vidbase.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Internal types
|
||||
|
||||
#ifdef WXMMEDIA_INTERNAL
|
||||
typedef struct wxXANIMinternal {
|
||||
Display *xanim_dpy;
|
||||
Window xanim_window;
|
||||
Atom xanim_atom, xanim_ret;
|
||||
} wxXANIMinternal;
|
||||
|
||||
#ifndef __XANIM_COMMAND__
|
||||
#define __XANIM_COMMAND__ "/usr/X11R6/bin/xanim"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Class definition
|
||||
|
||||
class WXDLLEXPORT wxVideoXANIM : public wxVideoBaseDriver {
|
||||
DECLARE_DYNAMIC_CLASS(wxVideoXANIM)
|
||||
protected:
|
||||
// Remember the state of the subprocess
|
||||
bool m_xanim_started, m_paused;
|
||||
// Pure X11 variables
|
||||
struct wxXANIMinternal *m_internal;
|
||||
wxString m_filename;
|
||||
wxProcess *m_xanim_detector;
|
||||
// Remember to delete the temporary file when necessary
|
||||
bool m_remove_file;
|
||||
wxUint32 m_size[2];
|
||||
wxUint32 m_sampleRate;
|
||||
wxUint8 m_channels;
|
||||
wxUint8 m_bps;
|
||||
wxUint32 m_frames;
|
||||
double m_frameRate;
|
||||
wxString m_movieCodec, m_audioCodec;
|
||||
|
||||
public:
|
||||
wxVideoXANIM();
|
||||
wxVideoXANIM(wxInputStream& str);
|
||||
wxVideoXANIM(const wxString& filename);
|
||||
~wxVideoXANIM();
|
||||
|
||||
bool Play();
|
||||
bool Pause();
|
||||
bool Resume();
|
||||
bool Stop();
|
||||
|
||||
bool SetVolume(wxUint8 vol);
|
||||
bool SetSize(wxSize size);
|
||||
bool GetSize(wxSize& size) const;
|
||||
|
||||
// Return the video codec name
|
||||
wxString GetMovieCodec() const;
|
||||
// Return the audio codec name
|
||||
wxString GetAudioCodec() const;
|
||||
// Return misc info about audio
|
||||
wxUint32 GetSampleRate() const;
|
||||
wxUint8 GetChannels() const;
|
||||
wxUint8 GetBPS() const;
|
||||
// Return frame rate
|
||||
double GetFrameRate() const;
|
||||
// Return number of frames in the movie
|
||||
wxUint32 GetNbFrames() const;
|
||||
|
||||
bool IsCapable(wxVideoType v_type) const;
|
||||
|
||||
bool AttachOutput(wxWindow& output);
|
||||
void DetachOutput();
|
||||
|
||||
bool IsPaused() const;
|
||||
bool IsStopped() const;
|
||||
|
||||
friend class wxVideoXANIMProcess;
|
||||
|
||||
protected:
|
||||
// Start the subprocess with the right parameters
|
||||
bool RestartXANIM();
|
||||
// Send a command to the subprocess
|
||||
bool SendCommand(const char *command,char **ret = NULL,
|
||||
wxUint32 *size = NULL);
|
||||
|
||||
// Collect informations from XAnim
|
||||
bool CollectInfo();
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,560 +0,0 @@
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Name: stc.h
|
||||
// Purpose: A wxWindows implementation of Scintilla. This class is the
|
||||
// one meant to be used directly by wx applications. It does not
|
||||
// derive directly from the Scintilla classes, and in fact there
|
||||
// is no mention of Scintilla classes at all in this header.
|
||||
// This class delegates all method calls and events to the
|
||||
// Scintilla objects and so forth. This allows the use of
|
||||
// Scintilla without polluting the namespace with all the
|
||||
// classes and itentifiers from Scintilla.
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 13-Jan-2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __stc_h__
|
||||
#define __stc_h__
|
||||
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// constants and stuff
|
||||
|
||||
enum wxSTC_UndoType {
|
||||
wxSTC_UndoCollectNone,
|
||||
wxSTC_UndoCollectAutoStart
|
||||
};
|
||||
|
||||
|
||||
enum wxSTC_EOL {
|
||||
wxSTC_EOL_CRLF,
|
||||
wxSTC_EOL_CR,
|
||||
wxSTC_EOL_LF
|
||||
};
|
||||
|
||||
enum wxSTC_EDGE {
|
||||
wxSTC_EDGE_NONE,
|
||||
wxSTC_EDGE_LINE,
|
||||
wxSTC_EDGE_BACKGROUND
|
||||
};
|
||||
|
||||
|
||||
|
||||
const int wxSTC_LEX_STYLE_MAX = 31;
|
||||
const int wxSTC_STYLE_DEFAULT = 32;
|
||||
const int wxSTC_STYLE_LINENUMBER = 33;
|
||||
const int wxSTC_STYLE_BRACELIGHT = 34;
|
||||
const int wxSTC_STYLE_BRACEBAD = 35;
|
||||
const int wxSTC_STYLE_CONTROLCHAR = 36;
|
||||
const int wxSTC_STYLE_MAX = 63;
|
||||
const int wxSTC_STYLE_MASK = 31;
|
||||
|
||||
const int wxSTC_MARKER_MAX = 31;
|
||||
const int wxSTC_MARK_CIRCLE = 0;
|
||||
const int wxSTC_MARK_ROUNDRECT = 1;
|
||||
const int wxSTC_MARK_ARROW = 2;
|
||||
const int wxSTC_MARK_SMALLRECT = 3;
|
||||
const int wxSTC_MARK_SHORTARROW = 4;
|
||||
const int wxSTC_MARK_EMPTY = 5;
|
||||
|
||||
const int wxSTC_INDIC_PLAIN = 0;
|
||||
const int wxSTC_INDIC_SQUIGGLE = 1;
|
||||
const int wxSTC_INDIC_TT = 2;
|
||||
const int wxSTC_INDIC0_MASK = 32;
|
||||
const int wxSTC_INDIC1_MASK = 64;
|
||||
const int wxSTC_INDIC2_MASK = 128;
|
||||
const int wxSTC_INDICS_MASK = (wxSTC_INDIC0_MASK | wxSTC_INDIC1_MASK | wxSTC_INDIC2_MASK);
|
||||
|
||||
|
||||
// key commands
|
||||
enum {
|
||||
wxSTC_CMD_LINEDOWN = 2300,
|
||||
wxSTC_CMD_LINEDOWNEXTEND,
|
||||
wxSTC_CMD_LINEUP,
|
||||
wxSTC_CMD_LINEUPEXTEND,
|
||||
wxSTC_CMD_CHARLEFT,
|
||||
wxSTC_CMD_CHARLEFTEXTEND,
|
||||
wxSTC_CMD_CHARRIGHT,
|
||||
wxSTC_CMD_CHARRIGHTEXTEND,
|
||||
wxSTC_CMD_WORDLEFT,
|
||||
wxSTC_CMD_WORDLEFTEXTEND,
|
||||
wxSTC_CMD_WORDRIGHT,
|
||||
wxSTC_CMD_WORDRIGHTEXTEND,
|
||||
wxSTC_CMD_HOME,
|
||||
wxSTC_CMD_HOMEEXTEND,
|
||||
wxSTC_CMD_LINEEND,
|
||||
wxSTC_CMD_LINEENDEXTEND,
|
||||
wxSTC_CMD_DOCUMENTSTART,
|
||||
wxSTC_CMD_DOCUMENTSTARTEXTEND,
|
||||
wxSTC_CMD_DOCUMENTEND,
|
||||
wxSTC_CMD_DOCUMENTENDEXTEND,
|
||||
wxSTC_CMD_PAGEUP,
|
||||
wxSTC_CMD_PAGEUPEXTEND,
|
||||
wxSTC_CMD_PAGEDOWN,
|
||||
wxSTC_CMD_PAGEDOWNEXTEND,
|
||||
wxSTC_CMD_EDITTOGGLEOVERTYPE,
|
||||
wxSTC_CMD_CANCEL,
|
||||
wxSTC_CMD_DELETEBACK,
|
||||
wxSTC_CMD_TAB,
|
||||
wxSTC_CMD_BACKTAB,
|
||||
wxSTC_CMD_NEWLINE,
|
||||
wxSTC_CMD_FORMFEED,
|
||||
wxSTC_CMD_VCHOME,
|
||||
wxSTC_CMD_VCHOMEEXTEND,
|
||||
wxSTC_CMD_ZOOMIN,
|
||||
wxSTC_CMD_ZOOMOUT,
|
||||
wxSTC_CMD_DELWORDLEFT,
|
||||
wxSTC_CMD_DELWORDRIGHT
|
||||
};
|
||||
|
||||
|
||||
enum wxSTC_LEX {
|
||||
wxSTC_LEX_CONTAINER=0,
|
||||
wxSTC_LEX_NULL,
|
||||
wxSTC_LEX_PYTHON,
|
||||
wxSTC_LEX_CPP,
|
||||
wxSTC_LEX_HTML,
|
||||
wxSTC_LEX_XML,
|
||||
wxSTC_LEX_PERL,
|
||||
wxSTC_LEX_SQL,
|
||||
wxSTC_LEX_VB,
|
||||
wxSTC_LEX_PROPERTIES,
|
||||
wxSTC_LEX_ERRORLIST,
|
||||
wxSTC_LEX_MAKEFILE,
|
||||
wxSTC_LEX_BATCH,
|
||||
};
|
||||
|
||||
|
||||
|
||||
const int wxSTC_CARET_SLOP = 0x01;
|
||||
const int WXSTC_CARET_CENTER = 0x02;
|
||||
const int wxSTC_CARET_STRICT = 0x04;
|
||||
|
||||
const int wxSTC_MARGIN_SYMBOL = 0;
|
||||
const int wxSTC_MARGIN_NUMBER = 1;
|
||||
|
||||
|
||||
class ScintillaWX; // forward declare
|
||||
class WordList;
|
||||
struct SCNotification;
|
||||
|
||||
|
||||
extern const wxChar* wxSTCNameStr;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class wxStyledTextCtrl : public wxControl {
|
||||
public:
|
||||
|
||||
wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxString& name = wxSTCNameStr);
|
||||
~wxStyledTextCtrl();
|
||||
|
||||
|
||||
|
||||
// Text retrieval and modification
|
||||
wxString GetText();
|
||||
bool SetText(const wxString& text);
|
||||
wxString GetLine(int line);
|
||||
void ReplaceSelection(const wxString& text);
|
||||
void SetReadOnly(bool readOnly);
|
||||
bool GetReadOnly();
|
||||
wxString GetTextRange(int startPos, int endPos);
|
||||
wxString GetStyledTextRange(int startPos, int endPos);
|
||||
void GetTextRange(int startPos, int endPos, char* buff);
|
||||
void GetStyledTextRange(int startPos, int endPos, char* buff);
|
||||
void AddText(const wxString& text);
|
||||
void AddStyledText(const wxString& text);
|
||||
void InsertText(int pos, const wxString& text);
|
||||
void ClearAll();
|
||||
char GetCharAt(int pos);
|
||||
char GetStyleAt(int pos);
|
||||
void SetStyleBits(int bits);
|
||||
int GetStyleBits();
|
||||
|
||||
|
||||
// Clipboard
|
||||
void Cut();
|
||||
void Copy();
|
||||
void Paste();
|
||||
bool CanPaste();
|
||||
void ClearClipbrd(); // avoiding name conflict with virtual in wxWindow
|
||||
|
||||
|
||||
// Undo and Redo
|
||||
void Undo();
|
||||
bool CanUndo();
|
||||
void EmptyUndoBuffer();
|
||||
void Redo();
|
||||
bool CanRedo();
|
||||
void SetUndoCollection(wxSTC_UndoType type);
|
||||
wxSTC_UndoType GetUndoCollection();
|
||||
void BeginUndoAction();
|
||||
void EndUndoAction();
|
||||
|
||||
|
||||
// Selection and information
|
||||
void GetSelection(int* startPos, int* endPos);
|
||||
void SetSelection(int startPos, int endPos);
|
||||
wxString GetSelectedText();
|
||||
void HideSelection(bool hide);
|
||||
bool GetHideSelection();
|
||||
|
||||
int GetTextLength();
|
||||
int GetFirstVisibleLine();
|
||||
bool GetModified();
|
||||
int GetLineCount();
|
||||
wxRect GetRect();
|
||||
int GetLineFromPos(int pos);
|
||||
int GetLineStartPos(int line);
|
||||
int GetLineLengthAtPos(int pos);
|
||||
int GetLineLength(int line);
|
||||
wxString GetCurrentLineText(int* linePos=NULL);
|
||||
int GetCurrentLine();
|
||||
int PositionFromPoint(wxPoint pt);
|
||||
int LineFromPoint(wxPoint pt);
|
||||
wxPoint PointFromPosition(int pos);
|
||||
int GetCurrentPos();
|
||||
int GetAnchor();
|
||||
void SelectAll();
|
||||
void SetCurrentPosition(int pos);
|
||||
void SetAnchor(int pos);
|
||||
void GotoPos(int pos);
|
||||
void GotoLine(int line);
|
||||
void ChangePosition(int delta, bool extendSelection);
|
||||
void PageMove(int cmdKey, bool extendSelection);
|
||||
|
||||
void ScrollBy(int columnDelta, int lineDelta);
|
||||
void ScrollToLine(int line);
|
||||
void ScrollToColumn(int column);
|
||||
void EnsureCaretVisible();
|
||||
void SetCaretPolicy(int policy, int slop=0);
|
||||
int GetSelectionType();
|
||||
|
||||
|
||||
|
||||
// Searching
|
||||
int FindText(int minPos, int maxPos, const wxString& text,
|
||||
bool caseSensitive, bool wholeWord);
|
||||
void SearchAnchor();
|
||||
int SearchNext(const wxString& text, bool caseSensitive, bool wholeWord);
|
||||
int SearchPrev(const wxString& text, bool caseSensitive, bool wholeWord);
|
||||
|
||||
|
||||
// Visible whitespace
|
||||
bool GetViewWhitespace();
|
||||
void SetViewWhitespace(bool visible);
|
||||
|
||||
|
||||
// Line endings
|
||||
wxSTC_EOL GetEOLMode();
|
||||
void SetEOLMode(wxSTC_EOL mode);
|
||||
bool GetViewEOL();
|
||||
void SetViewEOL(bool visible);
|
||||
void ConvertEOL(wxSTC_EOL mode);
|
||||
|
||||
|
||||
// Styling
|
||||
int GetEndStyled();
|
||||
void StartStyling(int pos, int mask);
|
||||
void SetStyleFor(int length, int style);
|
||||
void SetStyleBytes(int length, char* styleBytes);
|
||||
|
||||
|
||||
// Style Definition
|
||||
void StyleClearAll();
|
||||
void StyleResetDefault();
|
||||
void StyleSetSpec(int styleNum, const wxString& spec);
|
||||
void StyleSetForeground(int styleNum, const wxColour& colour);
|
||||
void StyleSetBackground(int styleNum, const wxColour& colour);
|
||||
void StyleSetFont(int styleNum, wxFont& font);
|
||||
void StyleSetFontAttr(int styleNum, int size, const wxString& faceName, bool bold, bool italic);
|
||||
void StyleSetBold(int styleNum, bool bold);
|
||||
void StyleSetItalic(int styleNum, bool italic);
|
||||
void StyleSetFaceName(int styleNum, const wxString& faceName);
|
||||
void StyleSetSize(int styleNum, int pointSize);
|
||||
void StyleSetEOLFilled(int styleNum, bool fillEOL);
|
||||
|
||||
|
||||
// Margins in the edit area
|
||||
int GetLeftMargin();
|
||||
int GetRightMargin();
|
||||
void SetMargins(int left, int right);
|
||||
|
||||
|
||||
// Margins for selection, markers, etc.
|
||||
void SetMarginType(int margin, int type);
|
||||
int GetMarginType(int margin);
|
||||
void SetMarginWidth(int margin, int pixelWidth);
|
||||
int GetMarginWidth(int margin);
|
||||
void SetMarginMask(int margin, int mask);
|
||||
int GetMarginMask(int margin);
|
||||
void SetMarginSensitive(int margin, bool sensitive);
|
||||
bool GetMarginSensitive(int margin);
|
||||
|
||||
|
||||
// Selection and Caret styles
|
||||
void SetSelectionForeground(const wxColour& colour);
|
||||
void SetSelectionBackground(const wxColour& colour);
|
||||
void SetCaretForeground(const wxColour& colour);
|
||||
int GetCaretPeriod();
|
||||
void SetCaretPeriod(int milliseconds);
|
||||
|
||||
|
||||
// Other settings
|
||||
void SetBufferedDraw(bool isBuffered);
|
||||
void SetTabWidth(int numChars);
|
||||
void SetWordChars(const wxString& wordChars);
|
||||
|
||||
|
||||
// Brace highlighting
|
||||
void BraceHighlight(int pos1, int pos2);
|
||||
void BraceBadlight(int pos);
|
||||
int BraceMatch(int pos, int maxReStyle=0);
|
||||
|
||||
|
||||
// Markers
|
||||
void MarkerDefine(int markerNumber, int markerSymbol,
|
||||
const wxColour& foreground,
|
||||
const wxColour& background);
|
||||
void MarkerSetType(int markerNumber, int markerSymbol);
|
||||
void MarkerSetForeground(int markerNumber, const wxColour& colour);
|
||||
void MarkerSetBackground(int markerNumber, const wxColour& colour);
|
||||
int MarkerAdd(int line, int markerNumber);
|
||||
void MarkerDelete(int line, int markerNumber);
|
||||
void MarkerDeleteAll(int markerNumber);
|
||||
int MarkerGet(int line);
|
||||
int MarkerGetNextLine(int lineStart, int markerMask);
|
||||
int MarkerGetPrevLine(int lineStart, int markerMask);
|
||||
int MarkerLineFromHandle(int handle);
|
||||
void MarkerDeleteHandle(int handle);
|
||||
|
||||
|
||||
// Indicators
|
||||
void IndicatorSetStyle(int indicNum, int indicStyle);
|
||||
int IndicatorGetStyle(int indicNum);
|
||||
void IndicatorSetColour(int indicNum, const wxColour& colour);
|
||||
|
||||
|
||||
// Auto completion
|
||||
void AutoCompShow(const wxString& listOfWords);
|
||||
void AutoCompCancel();
|
||||
bool AutoCompActive();
|
||||
int AutoCompPosAtStart();
|
||||
void AutoCompComplete();
|
||||
void AutoCompStopChars(const wxString& stopChars);
|
||||
|
||||
|
||||
// Call tips
|
||||
void CallTipShow(int pos, const wxString& text);
|
||||
void CallTipCancel();
|
||||
bool CallTipActive();
|
||||
int CallTipPosAtStart();
|
||||
void CallTipSetHighlight(int start, int end);
|
||||
void CallTipSetBackground(const wxColour& colour);
|
||||
|
||||
|
||||
// Key bindings
|
||||
void CmdKeyAssign(int key, int modifiers, int cmd);
|
||||
void CmdKeyClear(int key, int modifiers);
|
||||
void CmdKeyClearAll();
|
||||
void CmdKeyExecute(int cmd);
|
||||
|
||||
|
||||
// Print formatting
|
||||
int FormatRange(bool doDraw,
|
||||
int startPos,
|
||||
int endPos,
|
||||
wxDC* draw,
|
||||
wxDC* target, // Why does it use two? Can they be the same?
|
||||
wxRect renderRect,
|
||||
wxRect pageRect);
|
||||
|
||||
|
||||
// Document Sharing (multiple views)
|
||||
void* GetDocument();
|
||||
void SetDocument(void* document);
|
||||
// TODO: create a wx wrapper for Scintilla's document class
|
||||
|
||||
|
||||
// Folding
|
||||
int VisibleFromDocLine(int docLine);
|
||||
int DocLineFromVisible(int displayLine);
|
||||
int SetFoldLevel(int line, int level);
|
||||
int GetFoldLevel(int line);
|
||||
int GetLastChild(int line);
|
||||
int GetFoldParent(int line);
|
||||
void ShowLines(int lineStart, int lineEnd);
|
||||
void HideLines(int lineStart, int lineEnd);
|
||||
bool GetLineVisible(int line);
|
||||
void SetFoldExpanded(int line);
|
||||
bool GetFoldExpanded(int line);
|
||||
void ToggleFold(int line);
|
||||
void EnsureVisible(int line);
|
||||
|
||||
|
||||
// Long Lines
|
||||
int GetEdgeColumn();
|
||||
void SetEdgeColumn(int column);
|
||||
wxSTC_EDGE GetEdgeMode();
|
||||
void SetEdgeMode(wxSTC_EDGE mode);
|
||||
wxColour GetEdgeColour();
|
||||
void SetEdgeColour(const wxColour& colour);
|
||||
|
||||
|
||||
// Lexer
|
||||
void SetLexer(wxSTC_LEX lexer);
|
||||
wxSTC_LEX GetLexer();
|
||||
void Colourise(int start, int end);
|
||||
void SetProperty(const wxString& key, const wxString& value);
|
||||
void SetKeywords(int keywordSet, const wxString& keywordList);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
// Event handlers
|
||||
void OnPaint(wxPaintEvent& evt);
|
||||
void OnScrollWin(wxScrollWinEvent& evt);
|
||||
void OnSize(wxSizeEvent& evt);
|
||||
void OnMouseLeftDown(wxMouseEvent& evt);
|
||||
void OnMouseMove(wxMouseEvent& evt);
|
||||
void OnMouseLeftUp(wxMouseEvent& evt);
|
||||
void OnMouseRightUp(wxMouseEvent& evt);
|
||||
void OnChar(wxKeyEvent& evt);
|
||||
void OnLoseFocus(wxFocusEvent& evt);
|
||||
void OnGainFocus(wxFocusEvent& evt);
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& evt);
|
||||
void OnEraseBackground(wxEraseEvent& evt);
|
||||
void OnMenu(wxCommandEvent& evt);
|
||||
|
||||
|
||||
// Turn notifications from Scintilla into events
|
||||
void NotifyChange();
|
||||
void NotifyParent(SCNotification* scn);
|
||||
|
||||
long SendMsg(int msg, long wp=0, long lp=0);
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
ScintillaWX* m_swx;
|
||||
wxStopWatch m_stopWatch;
|
||||
bool m_readOnly;
|
||||
wxSTC_UndoType m_undoType;
|
||||
|
||||
|
||||
friend class ScintillaWX;
|
||||
friend class Platform;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class wxStyledTextEvent : public wxCommandEvent {
|
||||
public:
|
||||
wxStyledTextEvent(wxEventType commandType, int id);
|
||||
~wxStyledTextEvent() {}
|
||||
|
||||
void SetPosition(int pos) { m_position = pos; }
|
||||
void SetKey(int k) { m_key = k; }
|
||||
void SetModifiers(int m) { m_modifiers = m; }
|
||||
void SetModificationType(int t) { m_modificationType = t; }
|
||||
void SetText(const char* t) { m_text = t; }
|
||||
void SetLength(int len) { m_length = len; }
|
||||
void SetLinesAdded(int num) { m_linesAdded = num; }
|
||||
void SetLine(int val) { m_line = val; }
|
||||
void SetFoldLevelNow(int val) { m_foldLevelNow = val; }
|
||||
void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; }
|
||||
void SetMargin(int val) { m_margin = val; }
|
||||
void SetMessage(int val) { m_message = val; }
|
||||
void SetWParam(int val) { m_wParam = val; }
|
||||
void SetLParam(int val) { m_lParam = val; }
|
||||
|
||||
int GetPosition() const { return m_position; }
|
||||
int GetKey() const { return m_key; }
|
||||
int GetModifiers() const { return m_modifiers; }
|
||||
int GetModificationType() const { return m_modificationType; }
|
||||
wxString GetText() const { return m_text; }
|
||||
int GetLength() const { return m_length; }
|
||||
int GetLinesAdded() const { return m_linesAdded; }
|
||||
int GetLine() const { return m_line; }
|
||||
int GetFoldLevelNow() const { return m_foldLevelNow; }
|
||||
int GetFoldLevelPrev() const { return m_foldLevelPrev; }
|
||||
int GetMargin() const { return m_margin; }
|
||||
int GetMessage() const { return m_message; }
|
||||
int GetWParam() const { return m_wParam; }
|
||||
int GetLParam() const { return m_lParam; }
|
||||
|
||||
bool GetShift() const;
|
||||
bool GetControl() const;
|
||||
bool GetAlt() const;
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
|
||||
private:
|
||||
int m_position;
|
||||
int m_key;
|
||||
int m_modifiers;
|
||||
|
||||
int m_modificationType; // wxEVT_STC_MODIFIED
|
||||
wxString m_text;
|
||||
int m_length;
|
||||
int m_linesAdded;
|
||||
int m_line;
|
||||
int m_foldLevelNow;
|
||||
int m_foldLevelPrev;
|
||||
|
||||
int m_margin; // wxEVT_STC_MARGINCLICK
|
||||
|
||||
int m_message; // wxEVT_STC_MACRORECORD
|
||||
int m_wParam;
|
||||
int m_lParam;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
enum {
|
||||
wxEVT_STC_CHANGE = 1650,
|
||||
wxEVT_STC_STYLENEEDED,
|
||||
wxEVT_STC_CHARADDED,
|
||||
wxEVT_STC_UPDATEUI,
|
||||
wxEVT_STC_SAVEPOINTREACHED,
|
||||
wxEVT_STC_SAVEPOINTLEFT,
|
||||
wxEVT_STC_ROMODIFYATTEMPT,
|
||||
wxEVT_STC_DOUBLECLICK,
|
||||
wxEVT_STC_MODIFIED,
|
||||
wxEVT_STC_KEY,
|
||||
wxEVT_STC_MACRORECORD,
|
||||
wxEVT_STC_MARGINCLICK,
|
||||
wxEVT_STC_NEEDSHOWN
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
|
||||
|
||||
#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_CMDKEY(id, fn) { wxEVT_STC_CMDKEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_UNKNOWNCMDKEY(id, fn) { wxEVT_STC_UNKNOWNCMDKEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
|
@@ -1,12 +0,0 @@
|
||||
#
|
||||
# Makefile : Builds wxWindows utils for Unix.
|
||||
#
|
||||
|
||||
all:
|
||||
cd mmedia; make
|
||||
cd stc; make
|
||||
|
||||
clean:
|
||||
cd mmedia; make clean
|
||||
cd stc; make clean
|
||||
|
@@ -1,41 +0,0 @@
|
||||
#
|
||||
# File: makefile.unx
|
||||
# Author: Julian Smart
|
||||
# Created: 1998
|
||||
# Updated:
|
||||
# Copyright: (c) 1998 Julian Smart
|
||||
#
|
||||
# "%W% %G%"
|
||||
#
|
||||
# Makefile for minimal example (UNIX).
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_builddir = ../../..
|
||||
program_dir = contrib/samples/mmedia
|
||||
|
||||
PROGRAM=mmboard
|
||||
|
||||
OBJECTS=mmboard.o mmbman.o
|
||||
|
||||
EXTRA_LIBS= $(top_builddir)/contrib/src/mmedia/libmmedia.@WX_TARGET_LIBRARY_TYPE@ @ESD_LINK@
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
# the comment at the end of the next line is needed because otherwise autoconf
|
||||
# would remove this line completely - it contains a built-in hack to remove
|
||||
# any VPATH assignment not containing ':'
|
||||
VPATH = @PATH_IFS@$(top_srcdir)/contrib/samples/mmedia # ':' for autoconf
|
||||
|
||||
include ../../../src/make.env
|
||||
|
||||
.SUFFIXES: .o .cpp .c
|
||||
|
||||
.cpp.o:
|
||||
$(CC) -c $(CPPFLAGS) $(EXTRA_CPPFLAGS) -o $@ $<
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
clean:
|
||||
rm -f *.o $(PROGRAM)
|
||||
|
||||
mmboard: $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) -o mmboard $(OBJECTS) $(EXTRA_LIBS) $(LDLIBS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@
|
@@ -1,30 +0,0 @@
|
||||
#*****************************************************************************
|
||||
# *
|
||||
# Make file for VMS *
|
||||
# Author : J.Jansen (joukj@hrem.stm.tudelft.nl) *
|
||||
# Date : 10 November 1999 *
|
||||
# *
|
||||
#*****************************************************************************
|
||||
.first
|
||||
define wx [--.include.wx]
|
||||
|
||||
.ifdef __WXMOTIF__
|
||||
CXX_DEFINE = /define=(__WXMOTIF__=1)
|
||||
.else
|
||||
CXX_DEFINE =
|
||||
.endif
|
||||
|
||||
.suffixes : .cpp
|
||||
|
||||
.cpp.obj :
|
||||
cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
|
||||
|
||||
all :
|
||||
$(MMS)$(MMSQUALIFIERS) minimal.exe
|
||||
|
||||
minimal.exe : minimal.obj
|
||||
.ifdef __WXMOTIF__
|
||||
cxxlink minimal,[--.lib]vms/opt
|
||||
.endif
|
||||
|
||||
minimal.obj : minimal.cpp
|
@@ -1,24 +0,0 @@
|
||||
/* XPM */
|
||||
static char * eject_xpm[] = {
|
||||
"15 16 5 1",
|
||||
" c None",
|
||||
". c #949594",
|
||||
"+ c #000000",
|
||||
"@ c #FFFFFF",
|
||||
"# c #8E8E8E",
|
||||
" . ",
|
||||
" .+@ ",
|
||||
" .+++@ ",
|
||||
" .+++++@ ",
|
||||
" .+++++++@ ",
|
||||
" .+++++++++@ ",
|
||||
" .+++++++++++@ ",
|
||||
".+############@",
|
||||
".@@@@@@@@@@@@@@",
|
||||
" ",
|
||||
"...............",
|
||||
".++++++++++++#@",
|
||||
".++++++++++++#@",
|
||||
".++++++++++++#@",
|
||||
".+############@",
|
||||
".@@@@@@@@@@@@@@"};
|
@@ -1,17 +0,0 @@
|
||||
#
|
||||
# File: makefile.b32
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright:
|
||||
#
|
||||
# Makefile : Builds sample for 32-bit BC++
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=mmboard
|
||||
EXTRALIBS=$(WXDIR)\contrib\lib\mmedia.lib
|
||||
OBJECTS = $(TARGET).obj mmbman.obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.b32
|
||||
|
@@ -1,20 +0,0 @@
|
||||
#
|
||||
# File: makefile.bcc
|
||||
# Author: Julian Smart
|
||||
# Created: 1998
|
||||
# Updated:
|
||||
#
|
||||
# Builds a BC++ 16-bit sample
|
||||
|
||||
!if "$(WXWIN)" == ""
|
||||
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
|
||||
!endif
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=mmboard
|
||||
EXTRALIBS=$(WXDIR)\contrib\lib\mmedia.lib
|
||||
OBJECTS=$(TARGET).obj mmbman.obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.bcc
|
||||
|
@@ -1,17 +0,0 @@
|
||||
#
|
||||
# File: makefile.dos
|
||||
# Author: Julian Smart
|
||||
# Created: 1998
|
||||
# Updated:
|
||||
#
|
||||
# Makefile : Builds 16-bit sample, VC++ 1.5
|
||||
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||
# info
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=minimal
|
||||
OBJECTS=$(TARGET).obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.msc
|
||||
|
@@ -1,25 +0,0 @@
|
||||
#
|
||||
# File: makefile.vc
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright: (c) Julian Smart
|
||||
#
|
||||
# Makefile : Builds sample (VC++, WIN32)
|
||||
# Use FINAL=1 argument to nmake to build final version with no debug info.
|
||||
|
||||
# Set WXDIR for your system
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
PROGRAM=mmboard
|
||||
|
||||
!if "$(FINAL)" == "0"
|
||||
EXTRALIBS=$(WXDIR)\contrib\lib\mmediad.lib
|
||||
!else
|
||||
EXTRALIBS=$(WXDIR)\contrib\lib\mmedia.lib
|
||||
!endif
|
||||
|
||||
OBJECTS = $(PROGRAM).obj mmbman.obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.vc
|
||||
|
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Makefile for WATCOM
|
||||
#
|
||||
# Created by Julian Smart, January 1999
|
||||
#
|
||||
#
|
||||
|
||||
WXDIR = $(%WXWIN)
|
||||
|
||||
PROGRAM = mmboard
|
||||
OBJECTS = $(PROGRAM).obj mmbman.obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.wat
|
||||
|
@@ -1,512 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: mmbman.cpp
|
||||
// Purpose: Multimedia Board manager
|
||||
// Author: Guilhem Lavaux, <guilhem.lavaux@libertysurf.fr>
|
||||
// Modified by:
|
||||
// Created: 13/02/2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000, Guilhem Lavaux
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "mmbman.cpp"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers (this file is usually all you
|
||||
// need because it includes almost all "standard" wxWindows headers
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
// Personal headers
|
||||
|
||||
#include "wx/stream.h"
|
||||
#include "wx/wfstream.h"
|
||||
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndfile.h"
|
||||
#include "wx/mmedia/sndwav.h"
|
||||
#include "wx/mmedia/sndaiff.h"
|
||||
#include "wx/mmedia/sndpcm.h"
|
||||
#include "wx/mmedia/sndulaw.h"
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include "wx/mmedia/sndoss.h"
|
||||
#include "wx/mmedia/sndesd.h"
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
#include "wx/mmedia/sndwin.h"
|
||||
#endif
|
||||
|
||||
#include "wx/mmedia/vidbase.h"
|
||||
#ifdef __UNIX__
|
||||
#include "wx/mmedia/vidxanm.h"
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
#include "wx/mmedia/vidwin.h"
|
||||
#endif
|
||||
|
||||
#include "mmboard.h"
|
||||
#include "mmbman.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Private class definitions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class MMBoardSoundFile: public MMBoardFile {
|
||||
public:
|
||||
MMBoardSoundFile(const wxString& filename);
|
||||
~MMBoardSoundFile();
|
||||
|
||||
bool NeedWindow();
|
||||
|
||||
void SetWindow(wxWindow *window);
|
||||
|
||||
void Play();
|
||||
void Pause();
|
||||
void Resume();
|
||||
void Stop();
|
||||
|
||||
MMBoardTime GetPosition();
|
||||
MMBoardTime GetLength();
|
||||
void SetPosition(MMBoardTime btime);
|
||||
|
||||
bool IsStopped();
|
||||
bool IsPaused();
|
||||
|
||||
wxString GetStringType();
|
||||
wxString GetStringInformation();
|
||||
|
||||
protected:
|
||||
wxSoundFileStream *GetDecoder();
|
||||
|
||||
wxSoundStream *m_output_stream;
|
||||
wxInputStream *m_input_stream;
|
||||
wxSoundFileStream *m_file_stream;
|
||||
|
||||
MMBoardTime m_length;
|
||||
wxUint8 m_file_type;
|
||||
};
|
||||
|
||||
class MMBoardVideoFile: public MMBoardFile {
|
||||
public:
|
||||
MMBoardVideoFile(const wxString& filename);
|
||||
~MMBoardVideoFile();
|
||||
|
||||
bool NeedWindow();
|
||||
|
||||
void SetWindow(wxWindow *window);
|
||||
|
||||
void Play();
|
||||
void Pause();
|
||||
void Resume();
|
||||
void Stop();
|
||||
|
||||
MMBoardTime GetPosition();
|
||||
MMBoardTime GetLength();
|
||||
void SetPosition(MMBoardTime btime);
|
||||
|
||||
bool IsStopped();
|
||||
bool IsPaused();
|
||||
|
||||
wxString GetStringType();
|
||||
wxString GetStringInformation();
|
||||
|
||||
protected:
|
||||
wxWindow *m_output_window;
|
||||
wxVideoBaseDriver *m_video_driver;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Implementation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define MMBoard_UNKNOWNTYPE 0
|
||||
#define MMBoard_WAVE 1
|
||||
#define MMBoard_AIFF 2
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MMBoardSoundFile
|
||||
|
||||
MMBoardSoundFile::MMBoardSoundFile(const wxString& filename)
|
||||
: MMBoardFile()
|
||||
{
|
||||
m_input_stream = new wxFileInputStream(filename);
|
||||
m_output_stream = MMBoardManager::OpenSoundStream();
|
||||
|
||||
m_file_stream = GetDecoder();
|
||||
|
||||
if (!m_file_stream) {
|
||||
SetError(MMBoard_UnknownFile);
|
||||
return;
|
||||
}
|
||||
|
||||
// Compute length
|
||||
wxUint32 length, seconds;
|
||||
|
||||
length = m_file_stream->GetLength();
|
||||
seconds = m_file_stream->GetSoundFormat().GetTimeFromBytes(length);
|
||||
m_length.seconds = seconds % 60;
|
||||
m_length.minutes = (seconds / 60) % 60;
|
||||
m_length.hours = seconds / 3600;
|
||||
}
|
||||
|
||||
MMBoardSoundFile::~MMBoardSoundFile()
|
||||
{
|
||||
if (m_file_stream)
|
||||
delete m_file_stream;
|
||||
MMBoardManager::UnrefSoundStream(m_output_stream);
|
||||
delete m_input_stream;
|
||||
}
|
||||
|
||||
wxSoundFileStream *MMBoardSoundFile::GetDecoder()
|
||||
{
|
||||
wxSoundFileStream *f_stream;
|
||||
|
||||
// First, we try a Wave decoder
|
||||
f_stream = new wxSoundWave(*m_input_stream, *m_output_stream);
|
||||
m_file_type = MMBoard_WAVE;
|
||||
if (f_stream->CanRead())
|
||||
return f_stream;
|
||||
delete f_stream;
|
||||
|
||||
// Then, a AIFF decoder
|
||||
f_stream = new wxSoundAiff(*m_input_stream, *m_output_stream);
|
||||
m_file_type = MMBoard_AIFF;
|
||||
if (f_stream->CanRead())
|
||||
return f_stream;
|
||||
delete f_stream;
|
||||
|
||||
m_file_type = MMBoard_UNKNOWNTYPE;
|
||||
|
||||
// TODO: automate
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MMBoardTime MMBoardSoundFile::GetLength()
|
||||
{
|
||||
return m_length;
|
||||
}
|
||||
|
||||
bool MMBoardSoundFile::IsStopped()
|
||||
{
|
||||
return m_file_stream->IsStopped();
|
||||
}
|
||||
|
||||
bool MMBoardSoundFile::IsPaused()
|
||||
{
|
||||
return m_file_stream->IsPaused();
|
||||
}
|
||||
|
||||
MMBoardTime MMBoardSoundFile::GetPosition()
|
||||
{
|
||||
wxUint32 length, seconds;
|
||||
MMBoardTime file_time;
|
||||
|
||||
file_time.seconds = file_time.minutes = file_time.hours = 0;
|
||||
if (m_file_stream->IsStopped())
|
||||
return file_time;
|
||||
|
||||
length = m_file_stream->GetPosition();
|
||||
seconds = m_file_stream->GetSoundFormat().GetTimeFromBytes(length);
|
||||
file_time.seconds = seconds % 60;
|
||||
file_time.minutes = (seconds / 60) % 60;
|
||||
file_time.hours = seconds / 3600;
|
||||
|
||||
return file_time;
|
||||
}
|
||||
|
||||
void MMBoardSoundFile::SetPosition(MMBoardTime btime)
|
||||
{
|
||||
wxUint32 itime;
|
||||
|
||||
itime = btime.seconds + btime.minutes * 60 + btime.hours;
|
||||
|
||||
m_file_stream->SetPosition(
|
||||
m_file_stream->GetSoundFormat().GetBytesFromTime(itime)
|
||||
);
|
||||
}
|
||||
|
||||
bool MMBoardSoundFile::NeedWindow()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void MMBoardSoundFile::SetWindow(wxWindow *window)
|
||||
{
|
||||
}
|
||||
|
||||
void MMBoardSoundFile::Play()
|
||||
{
|
||||
m_file_stream->Play();
|
||||
}
|
||||
|
||||
void MMBoardSoundFile::Pause()
|
||||
{
|
||||
m_file_stream->Pause();
|
||||
}
|
||||
|
||||
void MMBoardSoundFile::Resume()
|
||||
{
|
||||
m_file_stream->Resume();
|
||||
}
|
||||
|
||||
void MMBoardSoundFile::Stop()
|
||||
{
|
||||
m_file_stream->Stop();
|
||||
}
|
||||
|
||||
wxString MMBoardSoundFile::GetStringType()
|
||||
{
|
||||
switch (m_file_type) {
|
||||
case MMBoard_WAVE:
|
||||
return wxString(wxT("WAVE file"));
|
||||
break;
|
||||
case MMBoard_AIFF:
|
||||
return wxString(wxT("AIFF file"));
|
||||
break;
|
||||
default:
|
||||
return wxString(wxT("Unknown file"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
wxString MMBoardSoundFile::GetStringInformation()
|
||||
{
|
||||
wxString info;
|
||||
wxSoundFormatBase *format;
|
||||
|
||||
format = &(m_file_stream->GetSoundFormat());
|
||||
|
||||
info = wxT("Data encoding: ");
|
||||
switch (format->GetType()) {
|
||||
case wxSOUND_PCM: {
|
||||
wxSoundFormatPcm *pcm_format = (wxSoundFormatPcm *)format;
|
||||
|
||||
info += wxString::Format(wxT("PCM %s %s\n"),
|
||||
pcm_format->Signed() ? wxT("signed") : wxT("unsigned"),
|
||||
pcm_format->GetOrder() == wxLITTLE_ENDIAN ? wxT("little endian") : wxT("big endian"));
|
||||
info += wxString::Format(wxT("Sampling rate: %d\n")
|
||||
wxT("Bits per sample: %d\n")
|
||||
wxT("Number of channels: %d\n"),
|
||||
pcm_format->GetSampleRate(),
|
||||
pcm_format->GetBPS(),
|
||||
pcm_format->GetChannels());
|
||||
|
||||
break;
|
||||
}
|
||||
case wxSOUND_ULAW: {
|
||||
wxSoundFormatUlaw *ulaw_format = (wxSoundFormatUlaw *)format;
|
||||
info += wxT("ULAW\n");
|
||||
info += wxString::Format(wxT("Sampling rate: %d\n"), ulaw_format->GetSampleRate());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
info += wxT("Unknown");
|
||||
break;
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MMBoardVideoFile
|
||||
|
||||
MMBoardVideoFile::MMBoardVideoFile(const wxString& filename)
|
||||
{
|
||||
m_output_window = NULL;
|
||||
|
||||
#if defined(__UNIX__)
|
||||
m_video_driver = new wxVideoXANIM(filename);
|
||||
#elif defined(__WIN32__)
|
||||
m_video_driver = new wxVideoWindows(filename);
|
||||
#else
|
||||
m_video_driver = NULL;
|
||||
SetError(MMBoard_UnknownFile);
|
||||
#endif
|
||||
}
|
||||
|
||||
MMBoardVideoFile::~MMBoardVideoFile()
|
||||
{
|
||||
if (m_video_driver)
|
||||
delete m_video_driver;
|
||||
}
|
||||
|
||||
bool MMBoardVideoFile::NeedWindow()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void MMBoardVideoFile::SetWindow(wxWindow *window)
|
||||
{
|
||||
m_output_window = window;
|
||||
m_video_driver->AttachOutput(*window);
|
||||
|
||||
wxSize size;
|
||||
m_video_driver->GetSize(size);
|
||||
window->SetSize(size);
|
||||
// BAD BAD
|
||||
// and we remove
|
||||
// window->GetParent()->GetSizer()->Fit(window->GetParent());
|
||||
}
|
||||
|
||||
void MMBoardVideoFile::Play()
|
||||
{
|
||||
m_video_driver->Play();
|
||||
}
|
||||
|
||||
void MMBoardVideoFile::Pause()
|
||||
{
|
||||
m_video_driver->Pause();
|
||||
}
|
||||
|
||||
void MMBoardVideoFile::Resume()
|
||||
{
|
||||
m_video_driver->Resume();
|
||||
}
|
||||
|
||||
void MMBoardVideoFile::Stop()
|
||||
{
|
||||
m_video_driver->Stop();
|
||||
}
|
||||
|
||||
MMBoardTime MMBoardVideoFile::GetPosition()
|
||||
{
|
||||
MMBoardTime btime;
|
||||
|
||||
btime.seconds = btime.minutes = btime.hours = 0;
|
||||
return btime;
|
||||
}
|
||||
|
||||
MMBoardTime MMBoardVideoFile::GetLength()
|
||||
{
|
||||
MMBoardTime btime;
|
||||
int frameTime;
|
||||
|
||||
frameTime = (int)( m_video_driver->GetNbFrames() / m_video_driver->GetFrameRate());
|
||||
|
||||
btime.seconds = frameTime % 60;
|
||||
btime.minutes = (frameTime / 60) % 60;
|
||||
btime.hours = frameTime / 3600;
|
||||
return btime;
|
||||
}
|
||||
|
||||
void MMBoardVideoFile::SetPosition(MMBoardTime btime)
|
||||
{
|
||||
}
|
||||
|
||||
bool MMBoardVideoFile::IsStopped()
|
||||
{
|
||||
return m_video_driver->IsStopped();
|
||||
}
|
||||
|
||||
bool MMBoardVideoFile::IsPaused()
|
||||
{
|
||||
return m_video_driver->IsPaused();
|
||||
}
|
||||
|
||||
wxString MMBoardVideoFile::GetStringType()
|
||||
{
|
||||
return wxString(wxT("Video XANIM"));
|
||||
}
|
||||
|
||||
wxString MMBoardVideoFile::GetStringInformation()
|
||||
{
|
||||
wxString info;
|
||||
|
||||
info = wxT("Video codec: ");
|
||||
info += m_video_driver->GetMovieCodec() + "\n";
|
||||
info += wxT("Audio codec: ");
|
||||
info += m_video_driver->GetAudioCodec();
|
||||
info += wxString::Format(" Sample rate: %d Channels: %d\n", m_video_driver->GetSampleRate(),
|
||||
m_video_driver->GetBPS());
|
||||
info += wxString::Format(" Frame rate: %.01f", m_video_driver->GetFrameRate());
|
||||
return info;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MMBoardFile
|
||||
|
||||
MMBoardFile::MMBoardFile()
|
||||
{
|
||||
m_error = 0;
|
||||
}
|
||||
|
||||
MMBoardFile::~MMBoardFile()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MMBoardManager
|
||||
|
||||
MMBoardFile *MMBoardManager::Open(const wxString& filename)
|
||||
{
|
||||
MMBoardFile *file;
|
||||
|
||||
// Test the audio codec
|
||||
file = new MMBoardSoundFile(filename);
|
||||
if (!file->GetError())
|
||||
return file;
|
||||
delete file;
|
||||
|
||||
// Test the video codec
|
||||
file = new MMBoardVideoFile(filename);
|
||||
if (!file->GetError())
|
||||
return file;
|
||||
delete file;
|
||||
|
||||
// Arrrgh, we just could not see what is that file ...
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DECLARE_APP(MMBoardApp)
|
||||
|
||||
wxSoundStream *MMBoardManager::OpenSoundStream()
|
||||
{
|
||||
#ifdef __UNIX__
|
||||
if ((wxGetApp().m_caps & MM_SOUND_ESD) != 0)
|
||||
return new wxSoundStreamESD();
|
||||
|
||||
if ((wxGetApp().m_caps & MM_SOUND_OSS) != 0)
|
||||
return new wxSoundStreamOSS();
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
if ((wxGetApp().m_caps & MM_SOUND_WIN) != 0)
|
||||
return new wxSoundStreamWin();
|
||||
#endif
|
||||
|
||||
wxMessageBox("You are trying to open a multimedia but you have not devices", "Error", wxOK | wxICON_ERROR, NULL);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void MMBoardManager::UnrefSoundStream(wxSoundStream *stream)
|
||||
{
|
||||
delete stream;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -1,84 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: mmbman.h
|
||||
// Purpose: Multimedia Board manager
|
||||
// Author: Guilhem Lavaux, <guilhem.lavaux@libertysurf.fr>
|
||||
// Modified by:
|
||||
// Created: 13/02/2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000, Guilhem Lavaux
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MMBMAN_APP_H_
|
||||
#define _MMBMAN_APP_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "mmbman.cpp"
|
||||
#endif
|
||||
|
||||
#include "wx/stream.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Base structure definitions
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
typedef struct {
|
||||
wxUint8 seconds, minutes, hours;
|
||||
} MMBoardTime;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constants
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
#define MMBoard_NoError 0
|
||||
#define MMBoard_UnknownFile 1
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Interface definition: MMBoardFile
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
class MMBoardFile {
|
||||
public:
|
||||
MMBoardFile();
|
||||
virtual ~MMBoardFile();
|
||||
|
||||
virtual bool NeedWindow() = 0;
|
||||
|
||||
virtual void SetWindow(wxWindow *window) = 0;
|
||||
|
||||
virtual void Play() = 0;
|
||||
virtual void Pause() = 0;
|
||||
virtual void Resume() = 0;
|
||||
virtual void Stop() = 0;
|
||||
|
||||
virtual MMBoardTime GetPosition() = 0;
|
||||
virtual MMBoardTime GetLength() = 0;
|
||||
virtual void SetPosition(MMBoardTime btime) = 0;
|
||||
|
||||
virtual bool IsStopped() = 0;
|
||||
virtual bool IsPaused() = 0;
|
||||
|
||||
virtual wxString GetStringType() = 0;
|
||||
virtual wxString GetStringInformation() = 0;
|
||||
|
||||
void SetError(wxUint8 error) { m_error = error; }
|
||||
wxUint8 GetError() const { return m_error; }
|
||||
|
||||
protected:
|
||||
wxUint8 m_error;
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Main manager
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
class MMBoardManager {
|
||||
public:
|
||||
static MMBoardFile *Open(const wxString& filename);
|
||||
|
||||
static wxSoundStream *OpenSoundStream();
|
||||
static void UnrefSoundStream(wxSoundStream *stream);
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,570 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: mmboard.cpp
|
||||
// Purpose: Multimedia Library sample
|
||||
// Author: Guilhem Lavaux (created from minimal by J. Smart)
|
||||
// Modified by:
|
||||
// Created: 13/02/2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Guilhem Lavaux
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "mmboard.cpp"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers (this file is usually all you
|
||||
// need because it includes almost all "standard" wxWindows headers
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ressources
|
||||
// ----------------------------------------------------------------------------
|
||||
// the application icon
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__)
|
||||
#include "mondrian.xpm"
|
||||
#endif
|
||||
|
||||
// include multimedia classes
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#ifdef __WIN32__
|
||||
#include "wx/mmedia/sndwin.h"
|
||||
#endif
|
||||
#ifdef __UNIX__
|
||||
#include "wx/mmedia/sndoss.h"
|
||||
#include "wx/mmedia/sndesd.h"
|
||||
#endif
|
||||
|
||||
#include "wx/statline.h"
|
||||
#include "wx/stattext.h"
|
||||
|
||||
// include personnal classes
|
||||
#include "mmboard.h"
|
||||
#include "mmbman.h"
|
||||
|
||||
#include "play.xpm"
|
||||
#include "stop.xpm"
|
||||
#include "eject.xpm"
|
||||
#include "pause.xpm"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Main Multimedia Board frame
|
||||
class MMBoardFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
// ctor(s)
|
||||
MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
// dtor
|
||||
~MMBoardFrame();
|
||||
|
||||
// event handlers
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnOpen(wxCommandEvent& event);
|
||||
void OnPlay(wxCommandEvent& event);
|
||||
void OnStop(wxCommandEvent& event);
|
||||
void OnPause(wxCommandEvent& event);
|
||||
void OnEject(wxCommandEvent& event);
|
||||
void OnRefreshInfo(wxEvent& event);
|
||||
void OnSetPosition(wxCommandEvent& event);
|
||||
|
||||
void OpenVideoWindow();
|
||||
void CloseVideoWindow();
|
||||
|
||||
private:
|
||||
// any class wishing to process wxWindows events must use this macro
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
private:
|
||||
void UpdateMMedInfo();
|
||||
void UpdateInfoText();
|
||||
|
||||
MMBoardFile *m_opened_file;
|
||||
|
||||
wxSlider *m_positionSlider;
|
||||
wxBitmapButton *m_playButton, *m_pauseButton, *m_stopButton, *m_ejectButton;
|
||||
wxStaticText *m_fileType, *m_infoText;
|
||||
wxWindow *m_video_window;
|
||||
|
||||
wxPanel *m_panel;
|
||||
wxSizer *m_sizer;
|
||||
|
||||
wxTimer *m_refreshTimer;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// IDs for the controls and the menu commands
|
||||
enum
|
||||
{
|
||||
// menu items
|
||||
MMBoard_Quit = 1,
|
||||
MMBoard_Open,
|
||||
MMBoard_About,
|
||||
MMBoard_PositionSlider,
|
||||
MMBoard_PlayButton,
|
||||
MMBoard_PauseButton,
|
||||
MMBoard_ResumeButton,
|
||||
MMBoard_StopButton,
|
||||
MMBoard_EjectButton,
|
||||
MMBoard_RefreshInfo
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event tables and other macros for wxWindows
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_EVENT_TABLE(MMBoardFrame, wxFrame)
|
||||
EVT_MENU(MMBoard_Quit, MMBoardFrame::OnQuit)
|
||||
EVT_MENU(MMBoard_About, MMBoardFrame::OnAbout)
|
||||
EVT_MENU(MMBoard_Open, MMBoardFrame::OnOpen)
|
||||
EVT_BUTTON(MMBoard_PlayButton, MMBoardFrame::OnPlay)
|
||||
EVT_BUTTON(MMBoard_StopButton, MMBoardFrame::OnStop)
|
||||
EVT_BUTTON(MMBoard_PauseButton, MMBoardFrame::OnPause)
|
||||
EVT_BUTTON(MMBoard_EjectButton, MMBoardFrame::OnEject)
|
||||
EVT_SLIDER(MMBoard_PositionSlider, MMBoardFrame::OnSetPosition)
|
||||
EVT_CUSTOM(wxEVT_TIMER, MMBoard_RefreshInfo, MMBoardFrame::OnRefreshInfo)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Main board application launcher
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_APP(MMBoardApp)
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// the application class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool MMBoardApp::OnInit()
|
||||
{
|
||||
// create the main application window
|
||||
MMBoardFrame *frame = new MMBoardFrame("Multimedia Board",
|
||||
wxPoint(50, 50), wxSize(450, 340));
|
||||
|
||||
// and show it (the frames, unlike simple controls, are not shown when
|
||||
// created initially)
|
||||
frame->Show(TRUE);
|
||||
|
||||
m_caps = TestMultimediaCaps();
|
||||
|
||||
if (!m_caps) {
|
||||
wxMessageBox("Your system has no multimedia capabilities. We are exiting now.", "Major error !", wxOK | wxICON_ERROR, NULL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wxString msg;
|
||||
msg.Printf("Detected : %s%s%s", (m_caps & MM_SOUND_OSS) ? "OSS " : "",
|
||||
(m_caps & MM_SOUND_ESD) ? "ESD " : "",
|
||||
(m_caps & MM_SOUND_WIN) ? "WIN" : "");
|
||||
|
||||
wxMessageBox(msg, "Good !", wxOK | wxICON_INFORMATION, NULL);
|
||||
|
||||
// success: wxApp::OnRun() will be called which will enter the main message
|
||||
// loop and the application will run. If we returned FALSE here, the
|
||||
// application would exit immediately.
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
wxUint8 MMBoardApp::TestMultimediaCaps()
|
||||
{
|
||||
wxSoundStream *dev;
|
||||
wxUint8 caps;
|
||||
|
||||
caps = 0;
|
||||
|
||||
#ifdef __UNIX__
|
||||
// We now test the ESD support
|
||||
|
||||
dev = new wxSoundStreamESD();
|
||||
if (dev->GetError() == wxSOUND_NOERROR)
|
||||
caps |= MM_SOUND_ESD;
|
||||
delete dev;
|
||||
|
||||
// We test the OSS (Open Sound System) support.
|
||||
// WARNING: There is a conflict between ESD and ALSA
|
||||
|
||||
dev = new wxSoundStreamOSS();
|
||||
if (dev->GetError() == wxSOUND_NOERROR)
|
||||
caps |= MM_SOUND_OSS;
|
||||
delete dev;
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
// We test the Windows sound support.
|
||||
|
||||
dev = new wxSoundStreamWin();
|
||||
if (dev->GetError() == wxSOUND_NOERROR)
|
||||
caps |= MM_SOUND_WIN;
|
||||
delete dev;
|
||||
#endif
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// main frame
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// frame constructor
|
||||
MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
// we need this in order to allow the about menu relocation, since ABOUT is
|
||||
// not the default id of the about menu
|
||||
wxApp::s_macAboutMenuItemId = MMBoard_About;
|
||||
#endif
|
||||
|
||||
// set the frame icon
|
||||
SetIcon(wxICON(mondrian));
|
||||
|
||||
// create a menu bar
|
||||
wxMenu *menuFile = new wxMenu(wxT(""), wxMENU_TEAROFF);
|
||||
|
||||
// the "About" item should be in the help menu
|
||||
wxMenu *helpMenu = new wxMenu;
|
||||
helpMenu->Append(MMBoard_About, wxT("&About...\tCtrl-A"), wxT("Show about dialog"));
|
||||
|
||||
menuFile->Append(MMBoard_Open, wxT("&Open\tAlt-O"), wxT("Open file"));
|
||||
menuFile->AppendSeparator();
|
||||
menuFile->Append(MMBoard_Quit, wxT("E&xit\tAlt-X"), wxT("Quit this program"));
|
||||
|
||||
// now append the freshly created menu to the menu bar...
|
||||
wxMenuBar *menuBar = new wxMenuBar();
|
||||
menuBar->Append(menuFile, wxT("&File"));
|
||||
menuBar->Append(helpMenu, wxT("&Help"));
|
||||
|
||||
// ... and attach this menu bar to the frame
|
||||
SetMenuBar(menuBar);
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
// create a status bar just for fun (by default with 1 pane only)
|
||||
CreateStatusBar(3);
|
||||
SetStatusText(wxT("Welcome to wxWindows!"));
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
// Misc variables
|
||||
m_opened_file = NULL;
|
||||
|
||||
m_panel = new wxPanel(this, -1);
|
||||
|
||||
// Initialize main slider
|
||||
m_positionSlider = new wxSlider( m_panel, MMBoard_PositionSlider, 0, 0, 60,
|
||||
wxDefaultPosition, wxSize(300, -1),
|
||||
wxSL_HORIZONTAL | wxSL_AUTOTICKS);
|
||||
m_positionSlider->SetPageSize(60); // 60 secs
|
||||
m_positionSlider->Enable(FALSE);
|
||||
|
||||
// Initialize info panel
|
||||
wxPanel *infoPanel = new wxPanel( m_panel, -1);
|
||||
infoPanel->SetBackgroundColour(*wxBLACK);
|
||||
infoPanel->SetForegroundColour(*wxWHITE);
|
||||
|
||||
wxBoxSizer *infoSizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
m_fileType = new wxStaticText(infoPanel, -1, wxT(""));
|
||||
wxStaticLine *line = new wxStaticLine(infoPanel, -1);
|
||||
m_infoText = new wxStaticText(infoPanel, -1, "");
|
||||
|
||||
UpdateInfoText();
|
||||
|
||||
infoSizer->Add(m_fileType, 0, wxGROW | wxALL, 1);
|
||||
infoSizer->Add(line, 0, wxGROW | wxCENTRE, 20);
|
||||
infoSizer->Add(m_infoText, 0, wxGROW | wxALL, 1);
|
||||
|
||||
infoPanel->SetSizer(infoSizer);
|
||||
infoPanel->SetAutoLayout(TRUE);
|
||||
|
||||
// Bitmap button panel
|
||||
wxBoxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
wxBitmap *play_bmp = new wxBitmap(play_back_xpm);
|
||||
wxBitmap *stop_bmp = new wxBitmap(stop_back_xpm);
|
||||
wxBitmap *eject_bmp = new wxBitmap(eject_xpm);
|
||||
wxBitmap *pause_bmp = new wxBitmap(pause_xpm);
|
||||
|
||||
m_playButton = new wxBitmapButton(m_panel, MMBoard_PlayButton, *play_bmp);
|
||||
m_playButton->Enable(FALSE);
|
||||
m_pauseButton = new wxBitmapButton(m_panel, MMBoard_PauseButton, *pause_bmp);
|
||||
m_pauseButton->Enable(FALSE);
|
||||
m_stopButton = new wxBitmapButton(m_panel, MMBoard_StopButton, *stop_bmp);
|
||||
m_stopButton->Enable(FALSE);
|
||||
m_ejectButton = new wxBitmapButton(m_panel, MMBoard_EjectButton, *eject_bmp);
|
||||
m_ejectButton->Enable(FALSE);
|
||||
|
||||
buttonSizer->Add(m_playButton, 0, wxALL, 2);
|
||||
buttonSizer->Add(m_pauseButton, 0, wxALL, 2);
|
||||
buttonSizer->Add(m_stopButton, 0, wxALL, 2);
|
||||
buttonSizer->Add(m_ejectButton, 0, wxALL, 2);
|
||||
|
||||
// Top sizer
|
||||
m_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
m_sizer->Add(new wxStaticLine(m_panel, -1), 0, wxGROW | wxCENTRE, 0);
|
||||
m_sizer->Add(m_positionSlider, 0, wxCENTRE | wxGROW | wxALL, 2);
|
||||
m_sizer->Add(new wxStaticLine(m_panel, -1), 0, wxGROW | wxCENTRE, 0);
|
||||
m_sizer->Add(buttonSizer, 0, wxALL, 0);
|
||||
m_sizer->Add(new wxStaticLine(m_panel, -1), 0, wxGROW | wxCENTRE, 0);
|
||||
m_sizer->Add(infoPanel, 1, wxCENTRE | wxGROW, 0);
|
||||
|
||||
m_panel->SetSizer(m_sizer);
|
||||
m_panel->SetAutoLayout(TRUE);
|
||||
m_sizer->Fit(this);
|
||||
m_sizer->SetSizeHints(this);
|
||||
|
||||
// Timer
|
||||
m_refreshTimer = new wxTimer(this, MMBoard_RefreshInfo);
|
||||
|
||||
// Video window
|
||||
m_video_window = NULL;
|
||||
|
||||
// Multimedia file
|
||||
m_opened_file = NULL;
|
||||
}
|
||||
|
||||
MMBoardFrame::~MMBoardFrame()
|
||||
{
|
||||
if (m_opened_file)
|
||||
delete m_opened_file;
|
||||
|
||||
delete m_refreshTimer;
|
||||
}
|
||||
|
||||
void MMBoardFrame::OpenVideoWindow()
|
||||
{
|
||||
if (m_video_window)
|
||||
return;
|
||||
|
||||
m_video_window = new wxWindow(m_panel, -1, wxDefaultPosition, wxSize(200, 200));
|
||||
m_video_window->SetBackgroundColour(*wxBLACK);
|
||||
m_sizer->Prepend(m_video_window, 2, wxGROW | wxSHRINK | wxCENTRE, 1);
|
||||
|
||||
m_sizer->Fit(this);
|
||||
}
|
||||
|
||||
void MMBoardFrame::CloseVideoWindow()
|
||||
{
|
||||
if (!m_video_window)
|
||||
return;
|
||||
|
||||
m_sizer->Remove(m_video_window);
|
||||
delete m_video_window;
|
||||
m_video_window = NULL;
|
||||
|
||||
m_sizer->Fit(this);
|
||||
}
|
||||
|
||||
// event handlers
|
||||
|
||||
void MMBoardFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// TRUE is to force the frame to close
|
||||
Close(TRUE);
|
||||
}
|
||||
|
||||
void MMBoardFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( wxT("wxWindows Multimedia board v1.0a, wxMMedia v2.0a:\n")
|
||||
wxT("an example of the capabilities of the wxWindows multimedia classes.\n")
|
||||
wxT("Copyright 1999, 2000, Guilhem Lavaux.\n"));
|
||||
|
||||
wxMessageBox(msg, "About MMBoard", wxOK | wxICON_INFORMATION, this);
|
||||
}
|
||||
|
||||
void MMBoardFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString selected_file;
|
||||
|
||||
if (m_opened_file) {
|
||||
if (!m_opened_file->IsStopped()) {
|
||||
wxCommandEvent event2;
|
||||
OnStop(event2);
|
||||
}
|
||||
delete m_opened_file;
|
||||
}
|
||||
|
||||
// select a file to be opened
|
||||
selected_file = wxLoadFileSelector("multimedia", "*", NULL, this);
|
||||
if (selected_file.IsNull())
|
||||
return;
|
||||
|
||||
m_opened_file = MMBoardManager::Open(selected_file);
|
||||
|
||||
// Change the range values of the slider.
|
||||
MMBoardTime length;
|
||||
|
||||
length = m_opened_file->GetLength();
|
||||
m_positionSlider->SetRange(0, length.hours * 3600 + length.minutes * 60 + length.seconds);
|
||||
|
||||
// Update misc info
|
||||
UpdateMMedInfo();
|
||||
|
||||
SetStatusText(selected_file, 2);
|
||||
|
||||
// Update info text
|
||||
UpdateInfoText();
|
||||
|
||||
// Enable a few buttons
|
||||
m_playButton->Enable(TRUE);
|
||||
m_ejectButton->Enable(TRUE);
|
||||
m_positionSlider->Enable(TRUE);
|
||||
|
||||
if (m_opened_file->NeedWindow()) {
|
||||
OpenVideoWindow();
|
||||
m_opened_file->SetWindow(m_video_window);
|
||||
} else
|
||||
CloseVideoWindow();
|
||||
}
|
||||
|
||||
void MMBoardFrame::UpdateInfoText()
|
||||
{
|
||||
wxString infotext1, infotext2;
|
||||
|
||||
if (m_opened_file) {
|
||||
infotext1 = wxT("File type:\n\t");
|
||||
infotext1 += m_opened_file->GetStringType() + wxT("\n");
|
||||
|
||||
infotext2 = wxT("File informations:\n\n");
|
||||
infotext2 += m_opened_file->GetStringInformation();
|
||||
} else {
|
||||
infotext1 = wxT("File type: \n\tNo file opened");
|
||||
infotext2 = wxT("File informations:\nNo information\n\n\n\n\n");
|
||||
}
|
||||
|
||||
m_fileType->SetLabel(infotext1);
|
||||
m_infoText->SetLabel(infotext2);
|
||||
}
|
||||
|
||||
void MMBoardFrame::UpdateMMedInfo()
|
||||
{
|
||||
wxString temp_string;
|
||||
MMBoardTime current, length;
|
||||
|
||||
if (m_opened_file) {
|
||||
current = m_opened_file->GetPosition();
|
||||
length = m_opened_file->GetLength();
|
||||
} else {
|
||||
current.hours = current.minutes = current.seconds = 0;
|
||||
length = current;
|
||||
}
|
||||
|
||||
// We refresh the status bar
|
||||
temp_string.Printf(wxT("%02d:%02d / %02d:%02d"), current.hours * 60 + current.minutes,
|
||||
current.seconds, length.hours * 60 + length.minutes, length.seconds);
|
||||
SetStatusText(temp_string, 1);
|
||||
|
||||
// We set the slider position
|
||||
m_positionSlider->SetValue(current.hours * 3600 + current.minutes * 60 + current.seconds);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Playing management, refreshers, ...
|
||||
|
||||
void MMBoardFrame::OnRefreshInfo(wxEvent& WXUNUSED(event))
|
||||
{
|
||||
UpdateMMedInfo();
|
||||
|
||||
if (m_opened_file->IsStopped()) {
|
||||
m_refreshTimer->Stop();
|
||||
m_playButton->Enable(TRUE);
|
||||
m_stopButton->Enable(FALSE);
|
||||
m_pauseButton->Enable(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void MMBoardFrame::OnPlay(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_stopButton->Enable(TRUE);
|
||||
m_pauseButton->Enable(TRUE);
|
||||
m_playButton->Enable(FALSE);
|
||||
|
||||
if (m_opened_file->IsPaused()) {
|
||||
m_opened_file->Resume();
|
||||
return;
|
||||
}
|
||||
|
||||
m_refreshTimer->Start(1000, FALSE);
|
||||
|
||||
m_opened_file->Play();
|
||||
|
||||
m_stopButton->Enable(TRUE);
|
||||
m_pauseButton->Enable(TRUE);
|
||||
m_playButton->Enable(FALSE);
|
||||
}
|
||||
|
||||
void MMBoardFrame::OnStop(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_opened_file->Stop();
|
||||
m_refreshTimer->Stop();
|
||||
|
||||
m_stopButton->Enable(FALSE);
|
||||
m_playButton->Enable(TRUE);
|
||||
|
||||
UpdateMMedInfo();
|
||||
}
|
||||
|
||||
void MMBoardFrame::OnPause(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_opened_file->Pause();
|
||||
|
||||
m_playButton->Enable(TRUE);
|
||||
m_pauseButton->Enable(FALSE);
|
||||
}
|
||||
|
||||
void MMBoardFrame::OnEject(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_opened_file->Stop();
|
||||
|
||||
delete m_opened_file;
|
||||
m_opened_file = NULL;
|
||||
|
||||
m_playButton->Enable(FALSE);
|
||||
m_pauseButton->Enable(FALSE);
|
||||
m_stopButton->Enable(FALSE);
|
||||
m_ejectButton->Enable(FALSE);
|
||||
m_positionSlider->Enable(FALSE);
|
||||
|
||||
UpdateInfoText();
|
||||
UpdateMMedInfo();
|
||||
}
|
||||
|
||||
void MMBoardFrame::OnSetPosition(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxUint32 itime;
|
||||
MMBoardTime btime;
|
||||
|
||||
itime = m_positionSlider->GetValue();
|
||||
btime.seconds = itime % 60;
|
||||
btime.minutes = (itime / 60) % 60;
|
||||
btime.hours = itime / 3600;
|
||||
m_opened_file->SetPosition(btime);
|
||||
|
||||
UpdateMMedInfo();
|
||||
}
|
||||
|
@@ -1,57 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: mmboard.h
|
||||
// Purpose: Multimedia Board header
|
||||
// Author: Guilhem Lavaux, <guilhem.lavaux@libertysurf.fr>
|
||||
// Modified by:
|
||||
// Created: 13/02/2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000, Guilhem Lavaux
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MMBOARD_APP_H_
|
||||
#define _MMBOARD_APP_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "mmboard.cpp"
|
||||
#endif
|
||||
|
||||
// for compilers that support precompilation, includes "wx/wx.h"
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// constants
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#define MM_SOUND_OSS 0x01
|
||||
#define MM_SOUND_ESD 0x02
|
||||
#define MM_SOUND_WIN 0x04
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Class definitions
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
// Define a new application type, each program should derive a class from wxApp
|
||||
class MMBoardApp : public wxApp
|
||||
{
|
||||
public:
|
||||
wxUint8 m_caps;
|
||||
|
||||
// override base class virtuals
|
||||
// ----------------------------
|
||||
|
||||
virtual bool OnInit();
|
||||
|
||||
wxUint8 TestMultimediaCaps();
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,6 +0,0 @@
|
||||
mondrian ICON "mondrian.ico"
|
||||
#include "wx/msw/wx.rc"
|
||||
|
||||
#define MINIMAL_QUIT 1
|
||||
#define MINIMAL_ABOUT 102
|
||||
|
@@ -1,6 +0,0 @@
|
||||
ICON 1 PRELOAD "mondros2.ico"
|
||||
#include "H:\DEV\WX2\wxWindows\include\wx\os2\wx.rc"
|
||||
|
||||
#define MINIMAL_QUIT 1
|
||||
#define MINIMAL_ABOUT 102
|
||||
|
Binary file not shown.
@@ -1,23 +0,0 @@
|
||||
/* XPM */
|
||||
static char * pause_xpm[] = {
|
||||
"13 15 5 1",
|
||||
" c None",
|
||||
". c #949594",
|
||||
"+ c #000000",
|
||||
"@ c #8E8E8E",
|
||||
"# c #FFFFFF",
|
||||
"...... ......",
|
||||
".+++@# .+++@#",
|
||||
".+++@# .+++@#",
|
||||
".+++@# .+++@#",
|
||||
".+++@# .+++@#",
|
||||
".+++@# .+++@#",
|
||||
".+++@# .+++@#",
|
||||
".+++@# .+++@#",
|
||||
".+++@# .+++@#",
|
||||
".+++@# .+++@#",
|
||||
".+++@# .+++@#",
|
||||
".+++@# .+++@#",
|
||||
".+++@# .+++@#",
|
||||
".+@@@# .+@@@#",
|
||||
".##### .#####"};
|
@@ -1,23 +0,0 @@
|
||||
/* XPM */
|
||||
static char * play_back_xpm[] = {
|
||||
"13 15 5 1",
|
||||
" c None",
|
||||
". c #949594",
|
||||
"+ c #000000",
|
||||
"@ c #8E8E8E",
|
||||
"# c #FFFFFF",
|
||||
"...... ",
|
||||
".+++++. ",
|
||||
".++++++. ",
|
||||
".+++++++. ",
|
||||
".++++++++. ",
|
||||
".+++++++++. ",
|
||||
".++++++++++. ",
|
||||
".++++++++++@#",
|
||||
".+++++++++@# ",
|
||||
".++++++++@# ",
|
||||
".+++++++@# ",
|
||||
".++++++@# ",
|
||||
".+++++@# ",
|
||||
".+@@@@# ",
|
||||
".##### "};
|
@@ -1,23 +0,0 @@
|
||||
/* XPM */
|
||||
static char * stop_back_xpm[] = {
|
||||
"13 15 5 1",
|
||||
" c None",
|
||||
". c #949594",
|
||||
"+ c #000000",
|
||||
"@ c #8E8E8E",
|
||||
"# c #FFFFFF",
|
||||
".............",
|
||||
".++++++++++@#",
|
||||
".++++++++++@#",
|
||||
".++++++++++@#",
|
||||
".++++++++++@#",
|
||||
".++++++++++@#",
|
||||
".++++++++++@#",
|
||||
".++++++++++@#",
|
||||
".++++++++++@#",
|
||||
".++++++++++@#",
|
||||
".++++++++++@#",
|
||||
".++++++++++@#",
|
||||
".++++++++++@#",
|
||||
".+@@@@@@@@@@#",
|
||||
".############"};
|
@@ -1,39 +0,0 @@
|
||||
#
|
||||
# File: Makefile
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright: (c) 2000 Julian Smart
|
||||
#
|
||||
# Makefile for OGL demo (GTK version)
|
||||
#
|
||||
# This makefile requires wxWindows/GTK to be
|
||||
# installed (possibly using "make install")
|
||||
# on your system.
|
||||
#
|
||||
|
||||
CPP = gcc -g
|
||||
CC = gcc
|
||||
WXCONFIG=../../../../wx-config
|
||||
WXINCLUDE=-I../../../../include -I../../../include
|
||||
WXLIB=-L../../../../lib -L../../../src/ogl
|
||||
|
||||
OBJECTS=ogledit.o palette.o doc.o view.o
|
||||
|
||||
ogledit: $(OBJECTS)
|
||||
$(CPP) -o ogledit $(OBJECTS) `$(WXCONFIG) --libs` $(WXLIB) -logl
|
||||
|
||||
ogledit.o: ogledit.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c ogledit.cpp
|
||||
|
||||
palette.o: palette.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c palette.cpp
|
||||
|
||||
doc.o: doc.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c doc.cpp
|
||||
|
||||
view.o: view.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c view.cpp
|
||||
|
||||
clean:
|
||||
rm -f *.o ogledit
|
@@ -1,29 +0,0 @@
|
||||
#
|
||||
# File: makefile.vc
|
||||
# Author: Julian Smart
|
||||
# Created: 1993
|
||||
# Updated:
|
||||
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||
#
|
||||
# "%W% %G%"
|
||||
#
|
||||
# Makefile : Builds ogledit example (MS VC++).
|
||||
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||
# info
|
||||
|
||||
# Set WXDIR for your system
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
PROGRAM=ogledit
|
||||
FINAL=0
|
||||
|
||||
!if "$(FINAL)" == "0"
|
||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogld.lib
|
||||
!else
|
||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
|
||||
!endif
|
||||
|
||||
OBJECTS = $(PROGRAM).obj doc.obj view.obj palette.obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.vc
|
||||
|
@@ -1,15 +0,0 @@
|
||||
#
|
||||
# Makefile for WATCOM
|
||||
#
|
||||
# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
|
||||
# 8 Nov 1994
|
||||
#
|
||||
|
||||
WXDIR = $(%WXWIN)
|
||||
|
||||
PROGRAM = ogledit
|
||||
EXTRALIBS = $(WXDIR)\contrib\lib\ogl.lib
|
||||
OBJECTS = $(PROGRAM).obj doc.obj view.obj palette.obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.wat
|
||||
|
@@ -1,57 +0,0 @@
|
||||
#
|
||||
# File: Makefile
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright: (c) 2000 Julian Smart
|
||||
#
|
||||
# Makefile for OGL demo (GTK version)
|
||||
#
|
||||
# This makefile requires wxWindows/GTK to be
|
||||
# installed (possibly using "make install")
|
||||
# on your system.
|
||||
#
|
||||
|
||||
CPP = gcc -g
|
||||
CC = gcc
|
||||
WXCONFIG=../../../../wx-config
|
||||
WXINCLUDE=-I../../../../include -I../../../include
|
||||
WXLIB=-L../../../../lib -L../../../src/ogl
|
||||
|
||||
OBJECTS=studio.o cspalette.o csprint.o dialogs.o doc.o mainfrm.o project.o shapes.o symbols.o view.o
|
||||
|
||||
studio: $(OBJECTS)
|
||||
$(CPP) -o studio $(OBJECTS) `$(WXCONFIG) --libs` $(WXLIB) -logl
|
||||
|
||||
studio.o: studio.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c studio.cpp
|
||||
|
||||
cspalette.o: cspalette.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c cspalette.cpp
|
||||
|
||||
doc.o: doc.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c doc.cpp
|
||||
|
||||
view.o: view.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c view.cpp
|
||||
|
||||
dialogs.o: dialogs.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c dialogs.cpp
|
||||
|
||||
mainfrm.o: mainfrm.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c mainfrm.cpp
|
||||
|
||||
project.o: project.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c project.cpp
|
||||
|
||||
shapes.o: shapes.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c shapes.cpp
|
||||
|
||||
symbols.o: symbols.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c symbols.cpp
|
||||
|
||||
csprint.o: csprint.cpp
|
||||
$(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c csprint.cpp
|
||||
|
||||
clean:
|
||||
rm -f *.o studio
|
@@ -1,30 +0,0 @@
|
||||
#
|
||||
# File: makefile.vc
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright: (c) Julian Smart
|
||||
#
|
||||
# "%W% %G%"
|
||||
#
|
||||
# Makefile : Builds OGL studio example (MS VC++).
|
||||
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||
# info
|
||||
# Set WXDIR for your system
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
PROGRAM=studio
|
||||
|
||||
FINAL=0
|
||||
|
||||
!if "$(FINAL)" == "0"
|
||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogld.lib
|
||||
!else
|
||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
|
||||
!endif
|
||||
|
||||
OBJECTS = $(PROGRAM).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\
|
||||
mainfrm.obj project.obj dialogs.obj csprint.obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.vc
|
||||
|
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# Makefile for WATCOM
|
||||
#
|
||||
# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
|
||||
# 8 Nov 1994
|
||||
#
|
||||
|
||||
WXDIR = $(%WXWIN)
|
||||
|
||||
PROGRAM = studio
|
||||
EXTRALIBS = $(WXDIR)\contrib\lib\ogl.lib
|
||||
OBJECTS = $(PROGRAM).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj &
|
||||
mainfrm.obj project.obj dialogs.obj csprint.obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.wat
|
||||
|
@@ -1,34 +0,0 @@
|
||||
:Base studio.hlp
|
||||
1 Welcome to OGL Studio
|
||||
2 Welcome to OGL Studio=topic0
|
||||
1 Read Me
|
||||
2 Read Me=readme
|
||||
2 Change log=topic1
|
||||
2 Bugs=topic2
|
||||
1 Working with the diagram window
|
||||
2 Working with the diagram window=schedule
|
||||
2 Creating a diagram=topic3
|
||||
2 Basic editing=topic4
|
||||
2 Adding text=topic5
|
||||
2 Aligning objects=topic6
|
||||
2 Adding segments to lines and straightening them=topic7
|
||||
2 Undo/Redo=topic8
|
||||
2 Loading and saving files=topic9
|
||||
2 Copy and paste=topic10
|
||||
2 Keyboard shortcuts=topic11
|
||||
1 Menu commands
|
||||
2 Menu commands=menucommands
|
||||
2 File=topic12
|
||||
2 Edit=topic13
|
||||
2 Window=topic14
|
||||
2 Help=topic15
|
||||
1 Toolbar commands
|
||||
2 Toolbar commands=toolbarcommands
|
||||
2 Main toolbar=maintoolbar
|
||||
2 Diagram formatting toolbar=diagramformattingtoolbar
|
||||
2 Diagram palette=diagrampalette
|
||||
1 Dialogs
|
||||
2 Dialogs=dialogs
|
||||
1 How To
|
||||
2 How To=howto
|
||||
2 Create a new object=topic16
|
Binary file not shown.
@@ -1,23 +0,0 @@
|
||||
[OPTIONS]
|
||||
BMROOT=. ; Assume that bitmaps are where the source is
|
||||
TITLE=OGL Studio
|
||||
CONTENTS=Contents
|
||||
; COMPRESS=12 Hall Zeck ; Max compression, but needs lots of memory
|
||||
COMPRESS=8 Zeck
|
||||
LCID=0x809 0x0 0x0 ;English (British)
|
||||
HLP=.\studio.hlp
|
||||
|
||||
[WINDOWS]
|
||||
Main="",(553,102,400,600),20736,(r14876671),(r12632256),f3
|
||||
|
||||
[FILES]
|
||||
studio.rtf
|
||||
|
||||
[CONFIG]
|
||||
CreateButton("Up", "&Up", "JumpId(`studio.hlp', `Contents')")
|
||||
BrowseButtons()
|
||||
|
||||
[MAP]
|
||||
|
||||
[BITMAPS]
|
||||
|
@@ -1 +0,0 @@
|
||||
stctest.res
|
@@ -1,21 +0,0 @@
|
||||
###############################################################################
|
||||
# Purpose: Makefile.in for STC sample for Unix with autoconf
|
||||
# Created: 14.03.00
|
||||
# Author: VZ
|
||||
# Version: $Id$
|
||||
###############################################################################
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_builddir = ../../..
|
||||
program_dir = contrib/samples/stc
|
||||
|
||||
PROGRAM=stctest
|
||||
|
||||
OBJECTS=$(PROGRAM).o
|
||||
|
||||
APPEXTRALIBS=$(top_builddir)/contrib/src/stc/libstc.@WX_TARGET_LIBRARY_TYPE@
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
DATAFILES=stctest.cpp
|
||||
|
||||
include ../../../src/makeprog.env
|
@@ -1,18 +0,0 @@
|
||||
#
|
||||
# File: makefile.b32
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright:
|
||||
#
|
||||
# Makefile : Builds sample for 32-bit BC++
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=stctest
|
||||
|
||||
EXTRALIBS=$(WXDIR)\contrib\lib\stc.lib
|
||||
OBJECTS = $(TARGET).obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.b32
|
||||
|
@@ -1,14 +0,0 @@
|
||||
# File: makefile.g95 for stectrl
|
||||
# Author: Robin Dunn
|
||||
# Created: 1-Feb-2000
|
||||
# Updated:
|
||||
|
||||
WXDIR = ../../..
|
||||
|
||||
TARGET = stctest
|
||||
OBJECTS = $(TARGET).o
|
||||
EXTRAINC = -I$(WXDIR)/contrib/include
|
||||
EXTRALIBS = -lstc
|
||||
|
||||
include $(WXDIR)/src/makeprog.g95
|
||||
|
@@ -1,14 +0,0 @@
|
||||
# File: makefile.vc For stectrl
|
||||
# Author: Robin Dunn
|
||||
# Created: 1-Feb-2000
|
||||
# Updated:
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
PROGRAM = stctest
|
||||
|
||||
OBJECTS = $(PROGRAM).obj
|
||||
EXTRALIBS = $(WXDIR)\contrib\lib\stc$(LIBEXT).lib
|
||||
EXTRAINC = -I$(WXDIR)\contrib\include
|
||||
|
||||
!include $(WXDIR)\src\makeprog.vc
|
||||
|
@@ -1,204 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: stctest.cpp
|
||||
// Purpose: sample of using wxStyledTextCtrl
|
||||
// Author: Robin Dunn
|
||||
// Modified by:
|
||||
// Created: 3-Feb-2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 by Total Control Software
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "stctest.cpp"
|
||||
#pragma interface "stctest.cpp"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers (this file is usually all you
|
||||
// need because it includes almost all "standard" wxWindows headers
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include <wx/wfstream.h>
|
||||
|
||||
#include <wx/stc/stc.h>
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class MyApp : public wxApp
|
||||
{
|
||||
public:
|
||||
virtual bool OnInit();
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// Define a new frame type: this is going to be our main frame
|
||||
class MyFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnStyleNeeded(wxStyledTextEvent& event);
|
||||
|
||||
private:
|
||||
wxStyledTextCtrl* ed;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
// IDs for the controls and the menu commands
|
||||
enum
|
||||
{
|
||||
// menu items
|
||||
ID_Quit = 1,
|
||||
ID_About,
|
||||
ID_ED
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU (ID_Quit, MyFrame::OnQuit)
|
||||
EVT_MENU (ID_About, MyFrame::OnAbout)
|
||||
EVT_STC_STYLENEEDED (ID_ED, MyFrame::OnStyleNeeded)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// `Main program' equivalent: the program execution "starts" here
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
MyFrame *frame = new MyFrame("Testing wxStyledTextCtrl",
|
||||
wxPoint(5, 5), wxSize(400, 600));
|
||||
|
||||
frame->Show(TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// frame constructor
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
// we need this in order to allow the about menu relocation, since ABOUT is
|
||||
// not the default id of the about menu
|
||||
wxApp::s_macAboutMenuItemId = ID_About;
|
||||
#endif
|
||||
|
||||
|
||||
// create a menu bar
|
||||
wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF);
|
||||
|
||||
// the "About" item should be in the help menu
|
||||
wxMenu *helpMenu = new wxMenu;
|
||||
helpMenu->Append(ID_About, "&About...\tCtrl-A", "Show about dialog");
|
||||
|
||||
menuFile->Append(ID_Quit, "E&xit\tAlt-X", "Quit this program");
|
||||
|
||||
// now append the freshly created menu to the menu bar...
|
||||
wxMenuBar *menuBar = new wxMenuBar();
|
||||
menuBar->Append(menuFile, "&File");
|
||||
menuBar->Append(helpMenu, "&Help");
|
||||
|
||||
// ... and attach this menu bar to the frame
|
||||
SetMenuBar(menuBar);
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
CreateStatusBar(2);
|
||||
SetStatusText("Testing wxStyledTextCtrl");
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
|
||||
//----------------------------------------
|
||||
// Setup the editor
|
||||
ed = new wxStyledTextCtrl(this, ID_ED);
|
||||
|
||||
// Default font
|
||||
wxFont font(8, wxMODERN, wxNORMAL, wxNORMAL);
|
||||
ed->StyleSetFont(wxSTC_STYLE_DEFAULT, font);
|
||||
ed->StyleClearAll();
|
||||
|
||||
ed->StyleSetForeground(0, wxColour(0x80, 0x80, 0x80));
|
||||
ed->StyleSetForeground(1, wxColour(0x00, 0x7f, 0x00));
|
||||
//ed->StyleSetForeground(2, wxColour(0x00, 0x7f, 0x00));
|
||||
ed->StyleSetForeground(3, wxColour(0x7f, 0x7f, 0x7f));
|
||||
ed->StyleSetForeground(4, wxColour(0x00, 0x7f, 0x7f));
|
||||
ed->StyleSetForeground(5, wxColour(0x00, 0x00, 0x7f));
|
||||
ed->StyleSetForeground(6, wxColour(0x7f, 0x00, 0x7f));
|
||||
ed->StyleSetForeground(7, wxColour(0x7f, 0x00, 0x7f));
|
||||
ed->StyleSetForeground(8, wxColour(0x00, 0x7f, 0x7f));
|
||||
ed->StyleSetForeground(9, wxColour(0x7f, 0x7f, 0x7f));
|
||||
ed->StyleSetForeground(10, wxColour(0x00, 0x00, 0x00));
|
||||
ed->StyleSetForeground(11, wxColour(0x00, 0x00, 0x00));
|
||||
ed->StyleSetBold(5, TRUE);
|
||||
ed->StyleSetBold(10, TRUE);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
ed->StyleSetSpec(2, "fore:#007f00,bold,face:Arial,size:7");
|
||||
#else
|
||||
ed->StyleSetSpec(2, "fore:#007f00,bold,face:Helvetica,size:7");
|
||||
#endif
|
||||
|
||||
// give it some text to play with
|
||||
wxFile file("stctest.cpp");
|
||||
wxString st;
|
||||
|
||||
char* buff = st.GetWriteBuf(file.Length());
|
||||
file.Read(buff, file.Length());
|
||||
st.UngetWriteBuf();
|
||||
|
||||
ed->InsertText(0, st);
|
||||
ed->EmptyUndoBuffer();
|
||||
|
||||
ed->SetLexer(wxSTC_LEX_CPP);
|
||||
ed->SetKeywords(0,
|
||||
"asm auto bool break case catch char class const "
|
||||
"const_cast continue default delete do double "
|
||||
"dynamic_cast else enum explicit export extern "
|
||||
"false float for friend goto if inline int long "
|
||||
"mutable namespace new operator private protected "
|
||||
"public register reinterpret_cast return short signed "
|
||||
"sizeof static static_cast struct switch template this "
|
||||
"throw true try typedef typeid typename union unsigned "
|
||||
"using virtual void volatile wchar_t while");
|
||||
|
||||
}
|
||||
|
||||
|
||||
// event handlers
|
||||
|
||||
void MyFrame::OnStyleNeeded(wxStyledTextEvent& event) {
|
||||
int currEndStyled = ed->GetEndStyled();
|
||||
ed->Colourise(currEndStyled, event.GetPosition());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// TRUE is to force the frame to close
|
||||
Close(TRUE);
|
||||
}
|
||||
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _T("Testing wxStyledTextCtrl...\n"));
|
||||
|
||||
wxMessageBox(msg, "About This Test", wxOK | wxICON_INFORMATION, this);
|
||||
}
|
@@ -1 +0,0 @@
|
||||
#include "wx/msw/wx.rc"
|
@@ -1,20 +0,0 @@
|
||||
#
|
||||
# Makefile : Builds wxWindows contrib src for Unix.
|
||||
#
|
||||
|
||||
CONTRIB_SUBDIRS=ogl mmedia stc
|
||||
|
||||
all:
|
||||
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE)); done
|
||||
|
||||
clean:
|
||||
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE) clean); done
|
||||
|
||||
install:
|
||||
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE) install); done
|
||||
|
||||
uninstall:
|
||||
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE) uninstall); done
|
||||
|
||||
.PHONY: all clean install uninstall
|
||||
|
@@ -1,25 +0,0 @@
|
||||
#
|
||||
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = ../../..
|
||||
|
||||
TARGET_LIBNAME=libmmedia
|
||||
|
||||
LIBVERSION_CURRENT=1
|
||||
LIBVERSION_REVISION=0
|
||||
LIBVERSION_AGE=0
|
||||
|
||||
OBJECTS=cdbase.o cdwin.o g711.o g721.o g723_24.o \
|
||||
g723_40.o g72x.o sndaiff.o sndbase.o sndcodec.o \
|
||||
sndcpcm.o sndfile.o sndg72x.o sndpcm.o sndulaw.o \
|
||||
sndwav.o sndwin.o vidbase.o vidwin.o vidxanm.o sndoss.o sndesd.o
|
||||
|
||||
# the comment at the end of the next line is needed because otherwise autoconf
|
||||
# would remove this line completely - it contains a built-in hack to remove
|
||||
# any VPATH assignment not containing ':'
|
||||
VPATH = :$(top_srcdir)/src/mmedia # ':' for autoconf
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
@@ -1,160 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="MmediaVC" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=MmediaVC - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "MmediaVC.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "MmediaVC.mak" CFG="MmediaVC - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "MmediaVC - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "MmediaVC - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "MmediaVC - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\..\lib\mmedia.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "MmediaVC - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\..\lib\mmediad.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "MmediaVC - Win32 Release"
|
||||
# Name "MmediaVC - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cdbase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cdwin.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\g711.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\g721.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\g723_24.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\g723_40.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\g72x.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sndaiff.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sndbase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sndcodec.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sndcpcm.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sndfile.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sndg72x.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sndpcm.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sndulaw.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sndwav.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sndwin.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vidbase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vidwin.cpp
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
@@ -1,20 +0,0 @@
|
||||
#
|
||||
# File: makefile.b32
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright:
|
||||
#
|
||||
# Makefile : Builds wxMMedia library for 32-bit BC++
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
LIBTARGET=$(WXDIR)\contrib\lib\mmedia.lib
|
||||
|
||||
OBJECTS = cdbase.obj cdwin.obj g711.obj g721.obj g723_24.obj \
|
||||
g723_40.obj g72x.obj sndaiff.obj sndbase.obj sndcodec.obj \
|
||||
sndcpcm.obj sndfile.obj sndg72x.obj sndpcm.obj sndulaw.obj \
|
||||
sndwav.obj sndwin.obj vidbase.obj vidwin.obj
|
||||
|
||||
!include $(WXDIR)\src\makelib.b32
|
||||
|
@@ -1,19 +0,0 @@
|
||||
#
|
||||
# File: makefile.g95
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright: (c) Julian Smart, 1999
|
||||
#
|
||||
# Makefile for wxWindows MMedia library Cygwin/Mingw32).
|
||||
|
||||
WXDIR = ../../..
|
||||
|
||||
LIBTARGET=$(WXDIR)/contrib/lib/libmmedia.a
|
||||
OBJECTS = cdbase.o cdwin.o g711.o g721.o g723_24.o \
|
||||
g723_40.o g72x.o sndaiff.o sndbase.o sndcodec.o \
|
||||
sndcpcm.o sndfile.o sndg72x.o sndpcm.o sndulaw.o \
|
||||
sndwav.o sndwin.o vidbase.o vidwin.o
|
||||
|
||||
include $(WXDIR)/src/makelib.g95
|
||||
|
@@ -1,225 +0,0 @@
|
||||
# File: makefile.vc
|
||||
# Author: Julian Smart
|
||||
# Created: 2000
|
||||
# Updated:
|
||||
# Copyright: (c) 2000, Julian Smart
|
||||
#
|
||||
# "%W% %G%"
|
||||
#
|
||||
# Makefile : Builds Mmedia classes library (MS VC++).
|
||||
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||
# info
|
||||
|
||||
|
||||
# Set WXDIR for your system
|
||||
WXDIR = $(WXWIN)
|
||||
OGLDIR = $(WXDIR)\contrib\src\mmedia
|
||||
OGLINC = $(WXDIR)\contrib\include\wx\mmedia
|
||||
THISDIR = $(WXDIR)\contrib\src\mmedia
|
||||
DOCDIR=$(WXDIR)\contrib\docs
|
||||
LOCALDOCDIR=$(WXDIR)\contrib\docs\latex\mmedia
|
||||
|
||||
!include $(WXDIR)\src\makevc.env
|
||||
|
||||
OBJECTS = $(D)\cdbase.obj $(D)\cdwin.obj $(D)\g711.obj $(D)\g721.obj $(D)\g723_24.obj \
|
||||
$(D)\g723_40.obj $(D)\g72x.obj $(D)\sndaiff.obj $(D)\sndbase.obj $(D)\sndcodec.obj \
|
||||
$(D)\sndcpcm.obj $(D)\sndfile.obj $(D)\sndg72x.obj $(D)\sndpcm.obj $(D)\sndulaw.obj \
|
||||
$(D)\sndwav.obj $(D)\sndwin.obj $(D)\vidbase.obj $(D)\vidwin.obj
|
||||
|
||||
LIBTARGET=$(WXDIR)\contrib\lib\mmedia$(LIBEXT).lib
|
||||
|
||||
all: $(D) $(LIBTARGET)
|
||||
|
||||
$(D) :
|
||||
mkdir $(D)
|
||||
|
||||
wx:
|
||||
cd $(WXDIR)\src\msw
|
||||
nmake -f makefile.vc FINAL=$(FINAL)
|
||||
cd $(THISDIR)
|
||||
|
||||
wxclean:
|
||||
cd $(WXDIR)\src\msw
|
||||
nmake -f makefile.vc clean
|
||||
cd $(THISDIR)
|
||||
|
||||
$(LIBTARGET): $(OBJECTS)
|
||||
-erase $(LIBTARGET)
|
||||
$(implib) @<<
|
||||
-out:$(LIBTARGET)
|
||||
-machine:$(CPU)
|
||||
$(OBJECTS)
|
||||
<<
|
||||
|
||||
$(D)\cdbase.obj: cdbase.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\cdwin.obj: cdwin.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\g711.obj: g711.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\g721.obj: g721.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\g723_24.obj: g723_24.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\g723_40.obj: g723_40.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\g72x.obj: g72x.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\sndaiff.obj: sndaiff.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\sndbase.obj: sndbase.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\sndcodec.obj: sndcodec.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\sndcpcm.obj: sndcpcm.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\sndfile.obj: sndfile.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\sndg72x.obj: sndg72x.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\sndpcm.obj: sndpcm.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\sndulaw.obj: sndulaw.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\sndwav.obj: sndwav.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\sndwin.obj: sndwin.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\vidbase.obj: vidbase.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(D)\vidwin.obj: vidwin.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||
<<
|
||||
|
||||
clean:
|
||||
-erase $(D)\*.obj
|
||||
-erase *.sbr
|
||||
-erase *.exe
|
||||
-erase *.res
|
||||
-erase *.map
|
||||
-erase *.pdb
|
||||
-erase $(LIBTARGET)
|
||||
|
||||
DOCSOURCES=$(LOCALDOCDIR)\mmedia.tex \
|
||||
$(LOCALDOCDIR)\bugs.tex $(LOCALDOCDIR)\changes.tex\
|
||||
$(LOCALDOCDIR)\classes.tex $(LOCALDOCDIR)\intro.tex\
|
||||
$(LOCALDOCDIR)\topics.tex $(LOCALDOCDIR)\sample.tex
|
||||
|
||||
html: $(DOCDIR)\html\mmedia\mmedia.htm
|
||||
htmlhelp: $(DOCDIR)\html\mmedia\mmedia.chm
|
||||
hlp: $(DOCDIR)\winhelp\mmedia.hlp
|
||||
pdfrtf: $(DOCDIR)\pdf\mmedia.rtf
|
||||
ps: $(DOCDIR)\ps\mmedia.ps
|
||||
|
||||
touchmanual:
|
||||
touch $(LOCALDOCDIR)\mmedia.tex
|
||||
|
||||
|
||||
$(DOCDIR)\winhelp\mmedia.hlp: $(LOCALDOCDIR)\mmedia.rtf $(LOCALDOCDIR)\mmedia.hpj
|
||||
cd $(LOCALDOCDIR)
|
||||
-erase mmedia.ph
|
||||
hc mmedia
|
||||
move mmedia.hlp $(DOCDIR)\winhelp\mmedia.hlp
|
||||
move mmedia.cnt $(DOCDIR)\winhelp\mmedia.cnt
|
||||
cd $(THISDIR)
|
||||
|
||||
$(LOCALDOCDIR)\mmedia.rtf: $(DOCSOURCES)
|
||||
cd $(LOCALDOCDIR)
|
||||
-start $(WAITFLAG) tex2rtf $(LOCALDOCDIR)\mmedia.tex $(LOCALDOCDIR)\mmedia.rtf -twice -winhelp
|
||||
cd $(THISDIR)
|
||||
|
||||
$(DOCDIR)\pdf\mmedia.rtf: $(DOCSOURCES)
|
||||
cd $(LOCALDOCDIR)
|
||||
-copy *.bmp $(DOCDIR)\pdf
|
||||
-start $(WAITFLAG) tex2rtf $(LOCALDOCDIR)\mmedia.tex $(DOCDIR)\pdf\mmedia.rtf -twice -rtf
|
||||
cd $(THISDIR)
|
||||
|
||||
$(DOCDIR)\html\mmedia\mmedia.htm: $(DOCSOURCES)
|
||||
cd $(LOCALDOCDIR)
|
||||
-mkdir $(DOCDIR)\html\mmedia
|
||||
copy *.gif $(DOCDIR)\html\mmedia
|
||||
-start $(WAITFLAG) tex2rtf $(LOCALDOCDIR)\mmedia.tex $(DOCDIR)\html\mmedia\mmedia.htm -twice -html
|
||||
-erase $(DOCDIR)\html\mmedia\*.con
|
||||
-erase *.con
|
||||
-erase $(DOCDIR)\html\mmedia\*.ref
|
||||
cd $(THISDIR)
|
||||
|
||||
|
||||
$(DOCDIR)\html\mmedia\mmedia.chm: $(DOCDIR)\html\mmedia\mmedia.htm $(DOCDIR)\html\mmedia\mmedia.hhp
|
||||
cd $(DOCDIR)\html\mmedia
|
||||
-hhc mmedia.hhp
|
||||
cd $(THISDIR)
|
||||
|
||||
|
||||
$(LOCALDOCDIR)\mmedia.dvi: $(DOCSOURCES)
|
||||
cd $(LOCALDOCDIR)
|
||||
-latex mmedia
|
||||
-latex mmedia
|
||||
-makeindx mmedia
|
||||
-bibtex mmedia
|
||||
-latex mmedia
|
||||
-latex mmedia
|
||||
cd $(THISDIR)
|
||||
|
||||
$(WXDIR)\docs\ps\mmedia.ps: $(LOCALDOCDIR)\mmedia.dvi
|
||||
cd $(LOCALDOCDIR)
|
||||
-dvips32 -o mmedia.ps mmedia
|
||||
move mmedia.ps $(WXDIR)\docs\ps\mmedia.ps
|
||||
cd $(THISDIR)
|
||||
|
||||
|
@@ -1,20 +0,0 @@
|
||||
#!/binb/wmake.exe
|
||||
#
|
||||
# File: makefile.wat
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
#
|
||||
# Makefile : Builds MMedia library for Watcom C++, WIN32
|
||||
|
||||
WXDIR = $(%WXWIN)
|
||||
|
||||
LIBTARGET=$(WXDIR)\contrib\lib\mmedia.lib
|
||||
|
||||
OBJECTS = cdbase.obj cdwin.obj g711.obj g721.obj g723_24.obj &
|
||||
g723_40.obj g72x.obj sndaiff.obj sndbase.obj sndcodec.obj &
|
||||
sndcpcm.obj sndfile.obj sndg72x.obj sndpcm.obj sndulaw.obj &
|
||||
sndwav.obj sndwin.obj vidbase.obj vidwin.obj
|
||||
|
||||
!include $(WXDIR)\src\makelib.wat
|
||||
|
||||
|
@@ -1,207 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndaiff.cpp
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "sndaiff.cpp"
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/stream.h"
|
||||
#include "wx/datstrm.h"
|
||||
#include "wx/filefn.h"
|
||||
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndfile.h"
|
||||
#include "wx/mmedia/sndpcm.h"
|
||||
#include "wx/mmedia/sndaiff.h"
|
||||
|
||||
#define BUILD_SIGNATURE(a,b,c,d) (((wxUint32)a) | (((wxUint32)b) << 8) | (((wxUint32)c) << 16) | (((wxUint32)d) << 24))
|
||||
|
||||
#define FORM_SIGNATURE BUILD_SIGNATURE('F','O','R','M')
|
||||
#define AIFF_SIGNATURE BUILD_SIGNATURE('A','I','F','F')
|
||||
#define AIFC_SIGNATURE BUILD_SIGNATURE('A','I','F','C')
|
||||
#define COMM_SIGNATURE BUILD_SIGNATURE('C','O','M','M')
|
||||
#define SSND_SIGNATURE BUILD_SIGNATURE('S','S','N','D')
|
||||
|
||||
wxSoundAiff::wxSoundAiff(wxInputStream& stream, wxSoundStream& io_sound)
|
||||
: wxSoundFileStream(stream, io_sound)
|
||||
{
|
||||
m_base_offset = wxInvalidOffset;
|
||||
}
|
||||
|
||||
wxSoundAiff::wxSoundAiff(wxOutputStream& stream, wxSoundStream& io_sound)
|
||||
: wxSoundFileStream(stream, io_sound)
|
||||
{
|
||||
m_base_offset = wxInvalidOffset;
|
||||
}
|
||||
|
||||
wxSoundAiff::~wxSoundAiff()
|
||||
{
|
||||
}
|
||||
|
||||
wxString wxSoundAiff::GetCodecName() const
|
||||
{
|
||||
return "wxSoundAiff codec";
|
||||
}
|
||||
|
||||
bool wxSoundAiff::CanRead()
|
||||
{
|
||||
wxUint32 signature1, signature2, len;
|
||||
|
||||
if (m_input->Read(&signature1, 4).LastRead() != 4)
|
||||
return FALSE;
|
||||
|
||||
if (wxUINT32_SWAP_ON_BE(signature1) != FORM_SIGNATURE) {
|
||||
m_input->Ungetch(&signature1, 4);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
m_input->Read(&len, 4);
|
||||
if (m_input->LastRead() != 4) {
|
||||
m_input->Ungetch(&len, m_input->LastRead());
|
||||
m_input->Ungetch(&signature1, 4);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (m_input->Read(&signature2, 4).LastRead() != 4) {
|
||||
m_input->Ungetch(&signature2, m_input->LastRead());
|
||||
m_input->Ungetch(&len, 4);
|
||||
m_input->Ungetch(&signature1, 4);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
m_input->Ungetch(&signature2, 4);
|
||||
m_input->Ungetch(&len, 4);
|
||||
m_input->Ungetch(&signature1, 4);
|
||||
|
||||
if (
|
||||
wxUINT32_SWAP_ON_BE(signature2) != AIFF_SIGNATURE &&
|
||||
wxUINT32_SWAP_ON_BE(signature2) != AIFC_SIGNATURE)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define FAIL_WITH(condition, err) if (condition) { m_snderror = err; return FALSE; }
|
||||
|
||||
bool wxSoundAiff::PrepareToPlay()
|
||||
{
|
||||
wxDataInputStream data(*m_input);
|
||||
wxUint32 signature, len, ssnd;
|
||||
bool end_headers;
|
||||
|
||||
if (!m_input) {
|
||||
m_snderror = wxSOUND_INVSTRM;
|
||||
return FALSE;
|
||||
}
|
||||
m_snderror = wxSOUND_NOERROR;
|
||||
|
||||
data.BigEndianOrdered(TRUE);
|
||||
|
||||
FAIL_WITH(m_input->Read(&signature, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
||||
FAIL_WITH(wxUINT32_SWAP_ON_BE(signature) != FORM_SIGNATURE, wxSOUND_INVSTRM);
|
||||
// "FORM"
|
||||
|
||||
len = data.Read32();
|
||||
FAIL_WITH(m_input->LastRead() != 4, wxSOUND_INVSTRM);
|
||||
// dummy len
|
||||
|
||||
FAIL_WITH(m_input->Read(&signature, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
||||
FAIL_WITH(
|
||||
wxUINT32_SWAP_ON_BE(signature) != AIFF_SIGNATURE &&
|
||||
wxUINT32_SWAP_ON_BE(signature) != AIFC_SIGNATURE, wxSOUND_INVSTRM);
|
||||
// "AIFF" / "AIFC"
|
||||
|
||||
end_headers = FALSE;
|
||||
while (!end_headers) {
|
||||
FAIL_WITH(m_input->Read(&signature, 4).LastRead() != 4, wxSOUND_INVSTRM);
|
||||
|
||||
len = data.Read32();
|
||||
FAIL_WITH(m_input->LastRead() != 4, wxSOUND_INVSTRM);
|
||||
|
||||
switch (wxUINT32_SWAP_ON_BE(signature)) {
|
||||
case COMM_SIGNATURE: { // "COMM"
|
||||
wxUint16 channels, bps;
|
||||
wxUint32 num_samples;
|
||||
double srate;
|
||||
wxSoundFormatPcm sndformat;
|
||||
|
||||
// Get sound data informations
|
||||
data >> channels >> num_samples >> bps >> srate;
|
||||
|
||||
// Convert them in a wxSoundFormat object
|
||||
sndformat.SetSampleRate((wxUint32) srate);
|
||||
sndformat.SetBPS(bps);
|
||||
sndformat.SetChannels(channels);
|
||||
sndformat.Signed(FALSE);
|
||||
sndformat.SetOrder(wxBIG_ENDIAN);
|
||||
|
||||
if (!SetSoundFormat(sndformat))
|
||||
return FALSE;
|
||||
// We pass all data left
|
||||
m_input->SeekI(len-18, wxFromCurrent);
|
||||
break;
|
||||
}
|
||||
case SSND_SIGNATURE: { // "SSND"
|
||||
data >> ssnd;
|
||||
// m_input->SeekI(4, wxFromCurrent); // Pass an INT32
|
||||
// m_input->SeekI(len-4, wxFromCurrent); // Pass the rest
|
||||
m_input->SeekI(ssnd + 4, wxFromCurrent);
|
||||
m_base_offset = m_input->TellI();
|
||||
// len-8 bytes of samples
|
||||
FinishPreparation(len - 8);
|
||||
end_headers = TRUE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
m_input->SeekI(len, wxFromCurrent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxSoundAiff::PrepareToRecord(wxUint32 time)
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxSoundAiff::FinishRecording()
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxSoundAiff::RepositionStream(wxUint32 position)
|
||||
{
|
||||
// If the stream is not seekable "TellI() returns wxInvalidOffset" we cannot reposition stream
|
||||
if (m_base_offset == wxInvalidOffset)
|
||||
return FALSE;
|
||||
m_input->SeekI(m_base_offset, wxFromStart);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundAiff::GetData(void *buffer, wxUint32 len)
|
||||
{
|
||||
return m_input->Read(buffer, len).LastRead();
|
||||
}
|
||||
|
||||
wxUint32 wxSoundAiff::PutData(const void *buffer, wxUint32 len)
|
||||
{
|
||||
return m_output->Write(buffer, len).LastWrite();
|
||||
}
|
@@ -1,134 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndbase.cpp
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999, 2000
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "sndbase.cpp"
|
||||
#endif
|
||||
|
||||
#include <wx/wxprec.h>
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// wxSoundFormatBase
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
wxSoundFormatBase::wxSoundFormatBase()
|
||||
{
|
||||
}
|
||||
|
||||
wxSoundFormatBase::~wxSoundFormatBase()
|
||||
{
|
||||
}
|
||||
|
||||
wxSoundFormatBase *wxSoundFormatBase::Clone() const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool wxSoundFormatBase::operator!=(const wxSoundFormatBase& frmt2) const
|
||||
{
|
||||
return (GetType() != frmt2.GetType());
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// wxSoundStream
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
wxSoundStream::wxSoundStream()
|
||||
{
|
||||
int i;
|
||||
|
||||
// Reset all variables to their neutral value.
|
||||
m_sndformat = NULL;
|
||||
m_handler = NULL;
|
||||
m_snderror = wxSOUND_NOERROR;
|
||||
m_lastcount = 0;
|
||||
for (i=0;i<2;i++)
|
||||
m_callback[i] = NULL;
|
||||
}
|
||||
|
||||
wxSoundStream::~wxSoundStream()
|
||||
{
|
||||
if (m_sndformat)
|
||||
delete m_sndformat;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// SetSoundFormat(const wxSoundFormatBase& format) is one of the most
|
||||
// important function of the wxSoundStream class. It prepares the stream to
|
||||
// receive or send the data in a strict format. Normally, the sound stream
|
||||
// should be ready to accept any format it is asked to manage but in certain
|
||||
// cases, it really cannot: in that case it returns FALSE. To have more
|
||||
// details in the functionnalities of SetSoundFormat see
|
||||
// wxSoundRouterStream::SetSoundFormat()
|
||||
// --------------------------------------------------------------------------
|
||||
bool wxSoundStream::SetSoundFormat(const wxSoundFormatBase& format)
|
||||
{
|
||||
// delete the previous prepared format
|
||||
if (m_sndformat)
|
||||
delete m_sndformat;
|
||||
|
||||
// create a new one by cloning the format passed in parameter
|
||||
m_sndformat = format.Clone();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Register(int evt, ...) registers the callback for a specified async event.
|
||||
// Warning ! Only one callback by event is supported. It means that if you
|
||||
// call twice this function the previous registered callback is absolutely
|
||||
// ignored.
|
||||
// --------------------------------------------------------------------------
|
||||
void wxSoundStream::SetCallback(int evt, wxSoundCallback cbk, void *cdata)
|
||||
{
|
||||
int c;
|
||||
|
||||
switch (evt) {
|
||||
case wxSOUND_INPUT:
|
||||
c = 0;
|
||||
break;
|
||||
case wxSOUND_OUTPUT:
|
||||
c = 1;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
m_callback[c] = cbk;
|
||||
m_cdata[c] = cdata;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// OnSoundEvent(int evt) is called either when the driver is ready to receive
|
||||
// a new block to play or when the driver has a new recorded buffer. You
|
||||
// must be careful here and try not to spend a lot of time: this is a
|
||||
// real-time call. In the case, an "event handler" was specified previously,
|
||||
// it called him before everything.
|
||||
// --------------------------------------------------------------------------
|
||||
void wxSoundStream::OnSoundEvent(int evt)
|
||||
{
|
||||
int c;
|
||||
|
||||
if (m_handler) {
|
||||
m_handler->OnSoundEvent(evt);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (evt) {
|
||||
case wxSOUND_INPUT:
|
||||
c = 0;
|
||||
break;
|
||||
case wxSOUND_OUTPUT:
|
||||
c = 1;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
if (m_callback[c])
|
||||
m_callback[c](this, evt, m_cdata[c]);
|
||||
}
|
@@ -1,443 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndcpcm.cpp
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999, 2000
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "sndcpcm.cpp"
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#include "wx/debug.h"
|
||||
#include "wx/log.h"
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndpcm.h"
|
||||
#include "wx/mmedia/sndcpcm.h"
|
||||
|
||||
wxSoundStreamPcm::wxSoundStreamPcm(wxSoundStream& sndio)
|
||||
: wxSoundStreamCodec(sndio)
|
||||
{
|
||||
m_function_in = NULL;
|
||||
m_function_out = NULL;
|
||||
m_prebuffer = NULL;
|
||||
m_prebuffer_size = 0;
|
||||
m_best_size = 0;
|
||||
}
|
||||
|
||||
wxSoundStreamPcm::~wxSoundStreamPcm()
|
||||
{
|
||||
if (m_prebuffer)
|
||||
delete[] m_prebuffer;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundStreamPcm::GetBestSize() const
|
||||
{
|
||||
return m_best_size;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// "Converters" definitions/implementations
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
#define DEFINE_CONV(name, input_type, output_type, convert) \
|
||||
static void Convert_##name##(const void *buf_in, void *buf_out, wxUint32 len) \
|
||||
{\
|
||||
register input_type src; \
|
||||
register const input_type *t_buf_in = (input_type *)buf_in; \
|
||||
register output_type *t_buf_out = (output_type *)buf_out; \
|
||||
\
|
||||
while (len > 0) { \
|
||||
src = *t_buf_in++; \
|
||||
*t_buf_out++ = convert; \
|
||||
len -= sizeof(input_type); \
|
||||
} \
|
||||
}
|
||||
|
||||
// TODO: define converters for all other formats (32, 24)
|
||||
|
||||
DEFINE_CONV(8_8_sign, wxUint8, wxUint8, (src ^ 0x80))
|
||||
|
||||
DEFINE_CONV(8_16, wxUint8, wxUint16, (((wxUint16)src) << 8))
|
||||
DEFINE_CONV(8_16_swap, wxUint8, wxUint16, (src))
|
||||
DEFINE_CONV(8_16_sign, wxUint8, wxUint16, (((wxUint16)(src ^ 0x80)) << 8))
|
||||
DEFINE_CONV(8_16_sign_swap, wxUint8, wxUint16, (src ^ 0x80))
|
||||
|
||||
DEFINE_CONV(16_8, wxUint16, wxUint8, (wxUint8)(src >> 8))
|
||||
DEFINE_CONV(16_8_sign, wxUint16, wxUint8, (wxUint8)((src >> 8) ^ 0x80))
|
||||
DEFINE_CONV(16_swap_8, wxUint16, wxUint8, (wxUint8)(src & 0xff))
|
||||
DEFINE_CONV(16_swap_8_sign, wxUint16, wxUint8, (wxUint8)((src & 0xff) ^ 0x80))
|
||||
|
||||
//DEFINE_CONV(24_8, wxUint32, wxUint8, (wxUint8)(src >> 16))
|
||||
//DEFINE_CONV(24_8_sig, wxUint32, wxUint8, (wxUint8)((src >> 16) ^ 0x80))
|
||||
|
||||
//DEFINE_CONV(32_8, wxUint32, wxUint8, (wxUint8)(src >> 24))
|
||||
|
||||
DEFINE_CONV(16_sign, wxUint16, wxUint16, (src ^ 0x8000))
|
||||
DEFINE_CONV(16_swap, wxUint16, wxUint16, (((src & 0xff) << 8) | ((src >> 8) & 0xff)))
|
||||
// Problem.
|
||||
DEFINE_CONV(16_swap_16_sign, wxUint16, wxUint16, ((((src & 0xff) << 8) | ((src >> 8) & 0xff)) ^ 0x80))
|
||||
// DEFINE_CONV(16_sign_16_swap, wxUint16, wxUint16, ((((src & 0xff) << 8) | ((src >> 8) & 0xff)) ^ 0x8000))
|
||||
DEFINE_CONV(16_swap_16_sign_swap, wxUint16, wxUint16, (src ^ 0x80))
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Main PCM stream converter table
|
||||
// -----------------------------------------------------------------------
|
||||
// Definition
|
||||
// XX -> YY
|
||||
// XX -> YY sign
|
||||
//
|
||||
// XX swapped -> YY
|
||||
// XX swapped -> YY sign
|
||||
//
|
||||
// XX swapped -> YY swapped
|
||||
// XX swapped -> YY swapped sign
|
||||
//
|
||||
// XX stereo -> YY mono
|
||||
// XX stereo -> YY mono sign
|
||||
//
|
||||
// XX swapped stereo -> YY swapped mono
|
||||
// XX swapped stereo -> YY swapped mono sign
|
||||
//
|
||||
// XX swapped stereo -> YY swapped mono
|
||||
// XX swapped stereo -> YY swapped mono sign
|
||||
|
||||
static wxSoundStreamPcm::ConverterType s_converters[4][3][2] = {
|
||||
{
|
||||
{
|
||||
NULL,
|
||||
Convert_8_8_sign /* 8 -> 8 sign */
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
Convert_8_16, /* 8 -> 16 */
|
||||
Convert_8_16_sign /* 8 -> 16 sign */
|
||||
},
|
||||
{
|
||||
Convert_8_16_swap, /* 8 -> 16 swapped */
|
||||
Convert_8_16_sign_swap /* 8 -> 16 sign swapped */
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
Convert_16_8, /* 16 -> 8 */
|
||||
Convert_16_8_sign /* 16 -> 8 sign */
|
||||
},
|
||||
{
|
||||
Convert_16_swap_8, /* 16 swapped -> 8 */
|
||||
Convert_16_swap_8_sign /* 16 swapped -> 8 sign */
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
{
|
||||
NULL, /* 16 -> 16 */
|
||||
Convert_16_sign /* 16 -> 16 sign */
|
||||
},
|
||||
{
|
||||
Convert_16_swap, /* 16 swapped -> 16 */
|
||||
Convert_16_swap_16_sign /* 16 swapped -> 16 sign */
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
Convert_16_swap_16_sign_swap /* 16 swapped -> 16 sign swapped */
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// This is the buffer size multiplier. It gives the needed size of the output size.
|
||||
static float s_converters_multip[] = {1, 2, 0.5, 1};
|
||||
|
||||
//
|
||||
// TODO: Read() and Write() aren't really safe. If you give it a buffer which
|
||||
// is not aligned on 2, you may crash (See converter.def).
|
||||
//
|
||||
|
||||
wxSoundStream& wxSoundStreamPcm::Read(void *buffer, wxUint32 len)
|
||||
{
|
||||
wxUint32 in_bufsize;
|
||||
|
||||
// We must have a multiple of 2
|
||||
len &= 0x01;
|
||||
|
||||
if (!m_function_in) {
|
||||
m_sndio->Read(buffer, len);
|
||||
m_lastcount = m_sndio->GetLastAccess();
|
||||
m_snderror = m_sndio->GetError();
|
||||
return *this;
|
||||
}
|
||||
|
||||
in_bufsize = GetReadSize(len);
|
||||
|
||||
if (len <= m_best_size) {
|
||||
m_sndio->Read(m_prebuffer, in_bufsize);
|
||||
m_snderror = m_sndio->GetError();
|
||||
if (m_snderror != wxSOUND_NOERROR) {
|
||||
m_lastcount = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
m_function_in(m_prebuffer, buffer, m_sndio->GetLastAccess());
|
||||
} else {
|
||||
char *temp_buffer;
|
||||
|
||||
temp_buffer = new char[in_bufsize];
|
||||
m_sndio->Read(temp_buffer, in_bufsize);
|
||||
|
||||
m_snderror = m_sndio->GetError();
|
||||
if (m_snderror != wxSOUND_NOERROR) {
|
||||
m_lastcount = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
m_function_in(temp_buffer, buffer, m_sndio->GetLastAccess());
|
||||
|
||||
delete[] temp_buffer;
|
||||
}
|
||||
|
||||
m_lastcount = (wxUint32)(m_sndio->GetLastAccess() * m_multiplier_in);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxSoundStream& wxSoundStreamPcm::Write(const void *buffer, wxUint32 len)
|
||||
{
|
||||
wxUint32 out_bufsize;
|
||||
|
||||
if (!m_function_out) {
|
||||
m_sndio->Write(buffer, len);
|
||||
m_lastcount = m_sndio->GetLastAccess();
|
||||
m_snderror = m_sndio->GetError();
|
||||
return *this;
|
||||
}
|
||||
|
||||
out_bufsize = GetWriteSize(len);
|
||||
|
||||
if (len <= m_best_size) {
|
||||
out_bufsize = GetWriteSize(len);
|
||||
|
||||
m_function_out(buffer, m_prebuffer, len);
|
||||
m_sndio->Write(m_prebuffer, out_bufsize);
|
||||
m_snderror = m_sndio->GetError();
|
||||
if (m_snderror != wxSOUND_NOERROR) {
|
||||
m_lastcount = 0;
|
||||
return *this;
|
||||
}
|
||||
} else {
|
||||
char *temp_buffer;
|
||||
|
||||
temp_buffer = new char[out_bufsize];
|
||||
m_function_out(buffer, temp_buffer, len);
|
||||
|
||||
m_sndio->Write(temp_buffer, out_bufsize);
|
||||
m_snderror = m_sndio->GetError();
|
||||
if (m_snderror != wxSOUND_NOERROR) {
|
||||
m_lastcount = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
delete[] temp_buffer;
|
||||
}
|
||||
|
||||
m_lastcount = (wxUint32)(m_sndio->GetLastAccess() / m_multiplier_out);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool wxSoundStreamPcm::SetSoundFormat(const wxSoundFormatBase& format)
|
||||
{
|
||||
wxSoundFormatBase *new_format;
|
||||
wxSoundFormatPcm *pcm_format, *pcm_format2;
|
||||
|
||||
if (m_sndio->SetSoundFormat(format)) {
|
||||
m_function_out = NULL;
|
||||
m_function_in = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
if (format.GetType() != wxSOUND_PCM) {
|
||||
m_snderror = wxSOUND_INVFRMT;
|
||||
return FALSE;
|
||||
}
|
||||
if (m_sndformat)
|
||||
delete m_sndformat;
|
||||
|
||||
new_format = m_sndio->GetSoundFormat().Clone();
|
||||
pcm_format = (wxSoundFormatPcm *)&format;
|
||||
pcm_format2 = (wxSoundFormatPcm *)new_format;
|
||||
|
||||
#if 0
|
||||
// ----------------------------------------------------
|
||||
// Test whether we need to resample
|
||||
if (pcm_format->GetSampleRate() != pcm_format2->GetSampleRate()) {
|
||||
wxUint32 src_rate, dst_rate;
|
||||
|
||||
src_rate = pcm_format->GetSampleRate();
|
||||
dst_rate = pcm_format2->GetSampleRate();
|
||||
m_needResampling = TRUE;
|
||||
if (src_rate < dst_rate)
|
||||
m_expandSamples = TRUE;
|
||||
else
|
||||
m_expandSamples = FALSE;
|
||||
m_pitch = (src_rate << FLOATBITS) / dst_rate;
|
||||
}
|
||||
#endif
|
||||
// ----------------------------------------------------
|
||||
// Select table to use:
|
||||
// * 8 bits -> 8 bits
|
||||
// * 16 bits -> 8 bits
|
||||
// * 8 bits -> 16 bits
|
||||
// * 16 bits -> 16 bits
|
||||
|
||||
int table_no, table_no2;
|
||||
int i_sign, i_swap;
|
||||
|
||||
switch (pcm_format->GetBPS()) {
|
||||
case 8:
|
||||
table_no = 0;
|
||||
break;
|
||||
case 16:
|
||||
table_no = 1;
|
||||
break;
|
||||
default:
|
||||
// TODO: Add something here: error, log, ...
|
||||
return FALSE;
|
||||
}
|
||||
switch (pcm_format2->GetBPS()) {
|
||||
case 8:
|
||||
table_no2 = 0;
|
||||
break;
|
||||
case 16:
|
||||
table_no2 = 1;
|
||||
break;
|
||||
default:
|
||||
// TODO: Add something here: error, log, ...
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (pcm_format2->Signed() != pcm_format->Signed())
|
||||
i_sign = 1;
|
||||
else
|
||||
i_sign = 0;
|
||||
|
||||
#define MY_ORDER wxBYTE_ORDER
|
||||
#if wxBYTE_ORDER == wxLITTLE_ENDIAN
|
||||
#define OTHER_ORDER wxBIG_ENDIAN
|
||||
#else
|
||||
#define OTHER_ORDER wxLITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------
|
||||
// Find the good converter !
|
||||
|
||||
if (pcm_format->GetOrder() == OTHER_ORDER) {
|
||||
if (pcm_format->GetOrder() == pcm_format2->GetOrder())
|
||||
i_swap = 2;
|
||||
else
|
||||
i_swap = 1;
|
||||
} else {
|
||||
if (pcm_format->GetOrder() == pcm_format2->GetOrder())
|
||||
i_swap = 0;
|
||||
else
|
||||
i_swap = 1;
|
||||
}
|
||||
|
||||
m_function_out = s_converters[table_no*2+table_no2][i_swap][i_sign];
|
||||
m_function_in = s_converters[table_no2*2+table_no][i_swap][i_sign];
|
||||
m_multiplier_out = s_converters_multip[table_no*2+table_no2];
|
||||
m_multiplier_in = s_converters_multip[table_no2*2+table_no2];
|
||||
|
||||
if (m_prebuffer)
|
||||
delete[] m_prebuffer;
|
||||
|
||||
// We try to minimize the need of dynamic memory allocation by preallocating a buffer. But
|
||||
// to be sure it will be efficient we minimize the best size.
|
||||
if (m_multiplier_in < m_multiplier_out) {
|
||||
m_prebuffer_size = (wxUint32)(m_sndio->GetBestSize() * m_multiplier_out);
|
||||
m_best_size = (wxUint32)(m_sndio->GetBestSize() * m_multiplier_in);
|
||||
} else {
|
||||
m_prebuffer_size = (wxUint32)(m_sndio->GetBestSize() * m_multiplier_in);
|
||||
m_best_size = (wxUint32)(m_sndio->GetBestSize() * m_multiplier_out);
|
||||
}
|
||||
|
||||
m_prebuffer = new char[m_prebuffer_size];
|
||||
|
||||
bool SetSoundFormatReturn;
|
||||
|
||||
SetSoundFormatReturn = m_sndio->SetSoundFormat(*new_format);
|
||||
wxASSERT( SetSoundFormatReturn );
|
||||
|
||||
m_sndformat = new_format;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundStreamPcm::GetWriteSize(wxUint32 len) const
|
||||
{
|
||||
// For the moment, it is simple but next time it will become more complicated
|
||||
// (Resampling)
|
||||
return (wxUint32)(len * m_multiplier_out);
|
||||
}
|
||||
|
||||
wxUint32 wxSoundStreamPcm::GetReadSize(wxUint32 len) const
|
||||
{
|
||||
return (wxUint32)(len / m_multiplier_in);
|
||||
}
|
||||
|
||||
// Resampling engine. NOT FINISHED and NOT INCLUDED but this is a first DRAFT.
|
||||
|
||||
#if 0
|
||||
|
||||
#define FLOATBITS 16
|
||||
#define INTBITS 16
|
||||
#define FLOATMASK 0xffff
|
||||
#define INTMASK 0xffff0000
|
||||
|
||||
void ResamplingShrink_##DEPTH##(const void *source, void *destination, wxUint32 len)
|
||||
{
|
||||
wxUint##DEPTH## *source_data, *dest_data;
|
||||
wxUint32 pos;
|
||||
|
||||
source_data = (wxUint##DEPTH## *)source;
|
||||
dest_data = (wxUint##DEPTH## *)destination;
|
||||
|
||||
pos = m_saved_pos;
|
||||
while (len > 0) {
|
||||
// Increment the position in the input buffer
|
||||
pos += m_pitch;
|
||||
if (pos & INTMASK) {
|
||||
pos &= FLOATMASK;
|
||||
|
||||
*dest_data ++ = *source_data;
|
||||
}
|
||||
len--;
|
||||
source_data++;
|
||||
}
|
||||
m_saved_pos = pos;
|
||||
}
|
||||
#endif
|
@@ -1,319 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndesd.cpp
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "sndesd.cpp"
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// MMedia headers
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndesd.h"
|
||||
#include "wx/mmedia/sndpcm.h"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// System headers
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <esd.h>
|
||||
#ifdef __WXGTK__
|
||||
#include <gdk/gdk.h>
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#define MY_ESD_NAME "wxWindows/wxSoundStreamESD"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// wxSoundStreamESD: ESD sound driver
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Constructors/Destructors
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
wxSoundStreamESD::wxSoundStreamESD(const wxString& hostname)
|
||||
{
|
||||
wxSoundFormatPcm pcm_default;
|
||||
|
||||
// First, we make some basic test: is there ESD on this computer ?
|
||||
m_esd_ok = FALSE;
|
||||
|
||||
if (hostname.IsNull())
|
||||
m_fd_output = esd_play_stream(ESD_PLAY | ESD_STREAM, 22050,
|
||||
hostname.mb_str(), MY_ESD_NAME);
|
||||
else
|
||||
m_fd_output = esd_play_stream(ESD_PLAY | ESD_STREAM, 22050,
|
||||
NULL, MY_ESD_NAME);
|
||||
if (m_fd_output == -1) {
|
||||
// Answer: no. We return with an error.
|
||||
m_snderror = wxSOUND_INVDEV;
|
||||
return;
|
||||
}
|
||||
|
||||
// Close this unuseful stream.
|
||||
esd_close(m_fd_output);
|
||||
|
||||
m_hostname = hostname;
|
||||
|
||||
// Set the default audio format
|
||||
SetSoundFormat(pcm_default);
|
||||
|
||||
// Initialize some variable
|
||||
m_snderror = wxSOUND_NOERROR;
|
||||
m_esd_stop = TRUE;
|
||||
m_q_filled = TRUE;
|
||||
m_esd_ok = TRUE;
|
||||
m_fd_output= -1;
|
||||
m_fd_input = -1;
|
||||
}
|
||||
|
||||
wxSoundStreamESD::~wxSoundStreamESD()
|
||||
{
|
||||
if (!m_esd_stop)
|
||||
StopProduction();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Read several samples
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
wxSoundStream& wxSoundStreamESD::Read(void *buffer, wxUint32 len)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (m_esd_stop) {
|
||||
m_snderror = wxSOUND_NOTSTARTED;
|
||||
return *this;
|
||||
}
|
||||
|
||||
m_lastcount = (wxUint32)ret = read(m_fd_input, buffer, len);
|
||||
|
||||
if (ret < 0)
|
||||
m_snderror = wxSOUND_IOERROR;
|
||||
else
|
||||
m_snderror = wxSOUND_NOERROR;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Write several samples
|
||||
// --------------------------------------------------------------------------
|
||||
wxSoundStream& wxSoundStreamESD::Write(const void *buffer, wxUint32 len)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (m_esd_stop) {
|
||||
m_lastcount = 0;
|
||||
m_snderror = wxSOUND_NOTSTARTED;
|
||||
return *this;
|
||||
}
|
||||
|
||||
m_lastcount = (wxUint32)ret = write(m_fd_output, buffer, len);
|
||||
|
||||
if (ret < 0)
|
||||
m_snderror = wxSOUND_IOERROR;
|
||||
else
|
||||
m_snderror = wxSOUND_NOERROR;
|
||||
|
||||
m_q_filled = TRUE;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// SetSoundFormat(): this function specifies which format we want and which
|
||||
// format is available
|
||||
// --------------------------------------------------------------------------
|
||||
bool wxSoundStreamESD::SetSoundFormat(const wxSoundFormatBase& format)
|
||||
{
|
||||
wxSoundFormatPcm *pcm_format;
|
||||
|
||||
if (format.GetType() != wxSOUND_PCM) {
|
||||
m_snderror = wxSOUND_INVFRMT;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!m_esd_ok) {
|
||||
m_snderror = wxSOUND_INVDEV;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (m_sndformat)
|
||||
delete m_sndformat;
|
||||
|
||||
m_sndformat = format.Clone();
|
||||
if (!m_sndformat) {
|
||||
m_snderror = wxSOUND_MEMERROR;
|
||||
return FALSE;
|
||||
}
|
||||
pcm_format = (wxSoundFormatPcm *)m_sndformat;
|
||||
|
||||
// Detect the best format
|
||||
DetectBest(pcm_format);
|
||||
|
||||
m_snderror = wxSOUND_NOERROR;
|
||||
if (*pcm_format != format) {
|
||||
m_snderror = wxSOUND_NOEXACT;
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// _wxSound_OSS_CBack (internal): it is called when the driver (ESD) is
|
||||
// ready for a next buffer.
|
||||
// --------------------------------------------------------------------------
|
||||
#ifdef __WXGTK__
|
||||
static void _wxSound_OSS_CBack(gpointer data, int source,
|
||||
GdkInputCondition condition)
|
||||
{
|
||||
wxSoundStreamESD *esd = (wxSoundStreamESD *)data;
|
||||
|
||||
switch (condition) {
|
||||
case GDK_INPUT_READ:
|
||||
esd->WakeUpEvt(wxSOUND_INPUT);
|
||||
break;
|
||||
case GDK_INPUT_WRITE:
|
||||
esd->WakeUpEvt(wxSOUND_OUTPUT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// WakeUpEvt() (internal): it is called by _wxSound_OSS_CBack to bypass the
|
||||
// C++ protection
|
||||
// --------------------------------------------------------------------------
|
||||
void wxSoundStreamESD::WakeUpEvt(int evt)
|
||||
{
|
||||
m_q_filled = FALSE;
|
||||
OnSoundEvent(evt);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// StartProduction(): see wxSoundStream
|
||||
// --------------------------------------------------------------------------
|
||||
bool wxSoundStreamESD::StartProduction(int evt)
|
||||
{
|
||||
wxSoundFormatPcm *pcm;
|
||||
int flag = 0;
|
||||
|
||||
if (!m_esd_ok) {
|
||||
m_snderror = wxSOUND_INVDEV;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!m_esd_stop)
|
||||
StopProduction();
|
||||
|
||||
pcm = (wxSoundFormatPcm *)m_sndformat;
|
||||
|
||||
flag |= (pcm->GetBPS() == 16) ? ESD_BITS16 : ESD_BITS8;
|
||||
flag |= (pcm->GetChannels() == 2) ? ESD_STEREO : ESD_MONO;
|
||||
|
||||
if ((evt & wxSOUND_OUTPUT) != 0) {
|
||||
flag |= ESD_PLAY | ESD_STREAM;
|
||||
m_fd_output = esd_play_stream(flag, pcm->GetSampleRate(), NULL,
|
||||
MY_ESD_NAME);
|
||||
}
|
||||
|
||||
if ((evt & wxSOUND_INPUT) != 0) {
|
||||
flag |= ESD_RECORD | ESD_STREAM;
|
||||
m_fd_input = esd_record_stream(flag, pcm->GetSampleRate(), NULL,
|
||||
MY_ESD_NAME);
|
||||
}
|
||||
|
||||
#ifdef __WXGTK__
|
||||
if ((evt & wxSOUND_OUTPUT) != 0) {
|
||||
m_tag_output = gdk_input_add(m_fd_output, GDK_INPUT_WRITE,
|
||||
_wxSound_OSS_CBack, (gpointer)this);
|
||||
}
|
||||
if ((evt & wxSOUND_INPUT) != 0) {
|
||||
m_tag_input = gdk_input_add(m_fd_input, GDK_INPUT_READ,
|
||||
_wxSound_OSS_CBack, (gpointer)this);
|
||||
}
|
||||
#endif
|
||||
|
||||
m_esd_stop = FALSE;
|
||||
m_q_filled = FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// StopProduction(): see wxSoundStream
|
||||
// --------------------------------------------------------------------------
|
||||
bool wxSoundStreamESD::StopProduction()
|
||||
{
|
||||
if (m_esd_stop)
|
||||
return FALSE;
|
||||
|
||||
if (m_fd_input != -1) {
|
||||
esd_close(m_fd_input);
|
||||
#ifdef __WXGTK__
|
||||
gdk_input_remove(m_tag_input);
|
||||
#endif
|
||||
}
|
||||
if (m_fd_output != -1) {
|
||||
esd_close(m_fd_output);
|
||||
#ifdef __WXGTK__
|
||||
gdk_input_remove(m_tag_output);
|
||||
#endif
|
||||
}
|
||||
|
||||
m_fd_input = -1;
|
||||
m_fd_output= -1;
|
||||
m_esd_stop = TRUE;
|
||||
m_q_filled = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//
|
||||
// Detect the closest format (The best).
|
||||
//
|
||||
void wxSoundStreamESD::DetectBest(wxSoundFormatPcm *pcm)
|
||||
{
|
||||
wxSoundFormatPcm best_pcm;
|
||||
|
||||
// We change neither the number of channels nor the sample rate
|
||||
// because ESD is clever.
|
||||
|
||||
best_pcm.SetSampleRate(pcm->GetSampleRate());
|
||||
best_pcm.SetChannels(pcm->GetChannels());
|
||||
|
||||
// It supports 16 bits
|
||||
if (pcm->GetBPS() >= 16)
|
||||
best_pcm.SetBPS(16);
|
||||
else
|
||||
best_pcm.SetBPS(8);
|
||||
|
||||
best_pcm.SetOrder(wxLITTLE_ENDIAN);
|
||||
best_pcm.Signed(TRUE);
|
||||
|
||||
// Finally recopy the new format
|
||||
*pcm = best_pcm;
|
||||
}
|
@@ -1,421 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndfile.cpp
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999, 2000
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#include <wx/wxprec.h>
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/defs.h>
|
||||
#include <wx/stream.h>
|
||||
#endif
|
||||
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndfile.h"
|
||||
#include "wx/mmedia/sndcpcm.h"
|
||||
#include "wx/mmedia/sndulaw.h"
|
||||
#include "wx/mmedia/sndg72x.h"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Sound codec router
|
||||
// A very important class: it ensures that everybody is satisfied.
|
||||
// It is supposed to create as many codec as it is necessary to transform
|
||||
// a signal in a specific format in an another.
|
||||
// --------------------------------------------------------------------------
|
||||
wxSoundRouterStream::wxSoundRouterStream(wxSoundStream& sndio)
|
||||
: wxSoundStreamCodec(sndio)
|
||||
{
|
||||
m_router = NULL;
|
||||
}
|
||||
|
||||
wxSoundRouterStream::~wxSoundRouterStream()
|
||||
{
|
||||
if (m_router)
|
||||
delete m_router;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Read(void *buffer, wxUint32 len): It reads data synchronously. See sndbase.h
|
||||
// for possible errors and behaviours ...
|
||||
// --------------------------------------------------------------------------
|
||||
wxSoundStream& wxSoundRouterStream::Read(void *buffer, wxUint32 len)
|
||||
{
|
||||
if (m_router) {
|
||||
m_router->Read(buffer, len);
|
||||
m_snderror = m_router->GetError();
|
||||
m_lastcount = m_router->GetLastAccess();
|
||||
} else {
|
||||
m_sndio->Read(buffer, len);
|
||||
m_snderror = m_sndio->GetError();
|
||||
m_lastcount = m_sndio->GetLastAccess();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Write(const void *buffer, wxUint32 len): It writes data synchronously
|
||||
// --------------------------------------------------------------------------
|
||||
wxSoundStream& wxSoundRouterStream::Write(const void *buffer, wxUint32 len)
|
||||
{
|
||||
if (m_router) {
|
||||
m_router->Write(buffer, len);
|
||||
m_snderror = m_router->GetError();
|
||||
m_lastcount = m_router->GetLastAccess();
|
||||
} else {
|
||||
m_sndio->Write(buffer, len);
|
||||
m_snderror = m_sndio->GetError();
|
||||
m_lastcount = m_sndio->GetLastAccess();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// SetSoundFormat(const wxSoundFormatBase& format) first tries to setup the
|
||||
// sound driver using the specified format. If this fails, it uses personnal
|
||||
// codec converters: for the moment there is a PCM converter (PCM to PCM:
|
||||
// with optional resampling, ...), an ULAW converter (ULAW to PCM), a G72X
|
||||
// converter (G72X to PCM). If nothing works, it returns FALSE.
|
||||
// --------------------------------------------------------------------------
|
||||
bool wxSoundRouterStream::SetSoundFormat(const wxSoundFormatBase& format)
|
||||
{
|
||||
if (m_router)
|
||||
delete m_router;
|
||||
|
||||
// First, we try to setup the sound device
|
||||
if (m_sndio->SetSoundFormat(format)) {
|
||||
// We are lucky, it is working.
|
||||
wxSoundStream::SetSoundFormat(m_sndio->GetSoundFormat());
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
switch(format.GetType()) {
|
||||
case wxSOUND_NOFORMAT:
|
||||
return FALSE;
|
||||
case wxSOUND_PCM:
|
||||
m_router = new wxSoundStreamPcm(*m_sndio);
|
||||
m_router->SetSoundFormat(format);
|
||||
break;
|
||||
case wxSOUND_ULAW:
|
||||
m_router = new wxSoundStreamUlaw(*m_sndio);
|
||||
m_router->SetSoundFormat(format);
|
||||
break;
|
||||
case wxSOUND_G72X:
|
||||
m_router = new wxSoundStreamG72X(*m_sndio);
|
||||
m_router->SetSoundFormat(format);
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
|
||||
}
|
||||
wxSoundStream::SetSoundFormat(m_router->GetSoundFormat());
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// GetBestSize() returns the specific best buffer size a sound driver
|
||||
// can manage. It means that it will be easier for it to manage the buffer
|
||||
// and so it will be faster and in some case more accurate for real-time event.
|
||||
// --------------------------------------------------------------------------
|
||||
wxUint32 wxSoundRouterStream::GetBestSize() const
|
||||
{
|
||||
if (m_router)
|
||||
return m_router->GetBestSize();
|
||||
else
|
||||
return m_sndio->GetBestSize();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// StartProduction(int evt). See sndbase.h
|
||||
// --------------------------------------------------------------------------
|
||||
bool wxSoundRouterStream::StartProduction(int evt)
|
||||
{
|
||||
if (!m_router) {
|
||||
if (m_sndio->StartProduction(evt))
|
||||
return TRUE;
|
||||
|
||||
m_snderror = m_sndio->GetError();
|
||||
m_lastcount = m_sndio->GetLastAccess();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (m_router->StartProduction(evt))
|
||||
return TRUE;
|
||||
|
||||
m_snderror = m_router->GetError();
|
||||
m_lastcount = m_router->GetLastAccess();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// StopProduction(). See sndbase.h
|
||||
// --------------------------------------------------------------------------
|
||||
bool wxSoundRouterStream::StopProduction()
|
||||
{
|
||||
if (!m_router) {
|
||||
if (m_sndio->StopProduction())
|
||||
return TRUE;
|
||||
|
||||
m_snderror = m_sndio->GetError();
|
||||
m_lastcount = m_sndio->GetLastAccess();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (m_router->StopProduction())
|
||||
return TRUE;
|
||||
|
||||
m_snderror = m_router->GetError();
|
||||
m_lastcount = m_router->GetLastAccess();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// wxSoundFileStream: generic reader
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
wxSoundFileStream::wxSoundFileStream(wxInputStream& stream,
|
||||
wxSoundStream& io_sound)
|
||||
: m_codec(io_sound), m_sndio(&io_sound),
|
||||
m_input(&stream), m_output(NULL), m_state(wxSOUND_FILE_STOPPED)
|
||||
{
|
||||
m_length = 0;
|
||||
m_bytes_left = 0;
|
||||
m_prepared = FALSE;
|
||||
}
|
||||
|
||||
wxSoundFileStream::wxSoundFileStream(wxOutputStream& stream,
|
||||
wxSoundStream& io_sound)
|
||||
: m_codec(io_sound), m_sndio(&io_sound),
|
||||
m_input(NULL), m_output(&stream), m_state(wxSOUND_FILE_STOPPED)
|
||||
{
|
||||
m_length = 0;
|
||||
m_bytes_left = 0;
|
||||
m_prepared = FALSE;
|
||||
}
|
||||
|
||||
wxSoundFileStream::~wxSoundFileStream()
|
||||
{
|
||||
if (m_state != wxSOUND_FILE_STOPPED)
|
||||
Stop();
|
||||
}
|
||||
|
||||
bool wxSoundFileStream::Play()
|
||||
{
|
||||
if (m_state != wxSOUND_FILE_STOPPED)
|
||||
return FALSE;
|
||||
|
||||
if (!m_prepared)
|
||||
if (!PrepareToPlay())
|
||||
return FALSE;
|
||||
|
||||
m_state = wxSOUND_FILE_PLAYING;
|
||||
|
||||
if (!StartProduction(wxSOUND_OUTPUT))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxSoundFileStream::Record(wxUint32 time)
|
||||
{
|
||||
if (m_state != wxSOUND_FILE_STOPPED)
|
||||
return FALSE;
|
||||
|
||||
if (!PrepareToRecord(time))
|
||||
return FALSE;
|
||||
|
||||
FinishPreparation(m_sndformat->GetBytesFromTime(time));
|
||||
|
||||
m_state = wxSOUND_FILE_RECORDING;
|
||||
if (!StartProduction(wxSOUND_INPUT))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxSoundFileStream::Stop()
|
||||
{
|
||||
if (m_state == wxSOUND_FILE_STOPPED)
|
||||
return FALSE;
|
||||
|
||||
if (!StopProduction())
|
||||
return FALSE;
|
||||
|
||||
m_prepared = FALSE;
|
||||
|
||||
if (m_state == wxSOUND_FILE_RECORDING)
|
||||
if (!FinishRecording()) {
|
||||
m_state = wxSOUND_FILE_STOPPED;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (m_input)
|
||||
m_input->SeekI(0, wxFromStart);
|
||||
|
||||
if (m_output)
|
||||
m_output->SeekO(0, wxFromStart);
|
||||
|
||||
m_state = wxSOUND_FILE_STOPPED;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxSoundFileStream::Pause()
|
||||
{
|
||||
if (m_state == wxSOUND_FILE_PAUSED || m_state == wxSOUND_FILE_STOPPED)
|
||||
return FALSE;
|
||||
|
||||
if (!StopProduction())
|
||||
return FALSE;
|
||||
|
||||
m_oldstate = m_state;
|
||||
m_state = wxSOUND_FILE_PAUSED;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxSoundFileStream::Resume()
|
||||
{
|
||||
if (m_state == wxSOUND_FILE_PLAYING || m_state == wxSOUND_FILE_RECORDING ||
|
||||
m_state == wxSOUND_FILE_STOPPED)
|
||||
return FALSE;
|
||||
|
||||
if (!StartProduction( (m_oldstate == wxSOUND_FILE_PLAYING) ?
|
||||
wxSOUND_OUTPUT : wxSOUND_INPUT))
|
||||
return FALSE;
|
||||
|
||||
m_state = m_oldstate;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
wxSoundStream& wxSoundFileStream::Read(void *buffer, wxUint32 len)
|
||||
{
|
||||
if (!m_prepared || m_state != wxSOUND_FILE_PLAYING) {
|
||||
m_snderror = wxSOUND_NOTSTARTED;
|
||||
m_lastcount = 0;
|
||||
return *this;
|
||||
}
|
||||
m_lastcount = GetData(buffer, len);
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxSoundStream& wxSoundFileStream::Write(const void *buffer, wxUint32 len)
|
||||
{
|
||||
if (!m_prepared || m_state != wxSOUND_FILE_RECORDING) {
|
||||
m_snderror = wxSOUND_NOTSTARTED;
|
||||
m_lastcount = 0;
|
||||
return *this;
|
||||
}
|
||||
m_lastcount = PutData(buffer, len);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool wxSoundFileStream::StartProduction(int evt)
|
||||
{
|
||||
m_sndio->SetEventHandler(this);
|
||||
|
||||
if (!m_codec.StartProduction(evt))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxSoundFileStream::StopProduction()
|
||||
{
|
||||
return m_codec.StopProduction();
|
||||
}
|
||||
|
||||
void wxSoundFileStream::FinishPreparation(wxUint32 len)
|
||||
{
|
||||
m_bytes_left = m_length = len;
|
||||
m_prepared = TRUE;
|
||||
}
|
||||
|
||||
wxString wxSoundFileStream::GetCodecName() const
|
||||
{
|
||||
return wxString(wxT("wxSoundFileStream base codec"));
|
||||
}
|
||||
|
||||
wxUint32 wxSoundFileStream::GetLength()
|
||||
{
|
||||
if (m_input && !m_prepared && GetError() == wxSOUND_NOERROR)
|
||||
return (PrepareToPlay()) ? m_length : 0;
|
||||
|
||||
return m_length;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundFileStream::GetPosition()
|
||||
{
|
||||
if (!m_prepared && m_input != NULL && GetError() == wxSOUND_NOERROR)
|
||||
PrepareToPlay();
|
||||
|
||||
return m_length-m_bytes_left;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundFileStream::SetPosition(wxUint32 new_position)
|
||||
{
|
||||
if (!m_prepared && m_input != NULL && GetError() == wxSOUND_NOERROR)
|
||||
PrepareToPlay();
|
||||
|
||||
if (!m_prepared)
|
||||
return 0;
|
||||
|
||||
if (!RepositionStream(new_position))
|
||||
return m_length-m_bytes_left;
|
||||
|
||||
if (new_position >= m_length) {
|
||||
m_bytes_left = 0;
|
||||
return m_length;
|
||||
}
|
||||
|
||||
m_bytes_left = m_length-new_position;
|
||||
return new_position;
|
||||
}
|
||||
|
||||
void wxSoundFileStream::OnSoundEvent(int evt)
|
||||
{
|
||||
wxUint32 len = m_codec.GetBestSize();
|
||||
char *buffer;
|
||||
|
||||
buffer = new char[len];
|
||||
wxSoundStream::OnSoundEvent(evt);
|
||||
|
||||
while (!m_sndio->QueueFilled()) {
|
||||
switch(evt) {
|
||||
case wxSOUND_INPUT:
|
||||
if (len > m_bytes_left)
|
||||
len = m_bytes_left;
|
||||
|
||||
len = m_codec.Read(buffer, len).GetLastAccess();
|
||||
PutData(buffer, len);
|
||||
m_bytes_left -= len;
|
||||
if (m_bytes_left == 0) {
|
||||
Stop();
|
||||
delete[] buffer;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case wxSOUND_OUTPUT:
|
||||
if (len > m_bytes_left)
|
||||
len = m_bytes_left;
|
||||
|
||||
len = GetData(buffer, len);
|
||||
m_bytes_left -= len;
|
||||
if (m_bytes_left == 0) {
|
||||
Stop();
|
||||
delete[] buffer;
|
||||
return;
|
||||
}
|
||||
m_codec.Write(buffer, len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
delete[] buffer;
|
||||
}
|
||||
|
||||
bool wxSoundFileStream::SetSoundFormat(const wxSoundFormatBase& format)
|
||||
{
|
||||
wxSoundStream::SetSoundFormat(format);
|
||||
return m_codec.SetSoundFormat(format);
|
||||
}
|
@@ -1,309 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndg72x.cpp
|
||||
// Purpose:
|
||||
// Date: 08/26/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "sndg72x.cpp"
|
||||
#endif
|
||||
|
||||
#include <wx/wxprec.h>
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#endif
|
||||
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndfile.h"
|
||||
#include "wx/mmedia/sndpcm.h"
|
||||
#include "wx/mmedia/sndg72x.h"
|
||||
#include "wx/mmedia/internal/g72x.h"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// wxSoundFormatG72X
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
wxSoundFormatG72X::wxSoundFormatG72X()
|
||||
: m_srate(22050)
|
||||
{
|
||||
}
|
||||
|
||||
wxSoundFormatG72X::~wxSoundFormatG72X()
|
||||
{
|
||||
}
|
||||
|
||||
void wxSoundFormatG72X::SetSampleRate(wxUint32 srate)
|
||||
{
|
||||
m_srate = srate;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundFormatG72X::GetSampleRate() const
|
||||
{
|
||||
return m_srate;
|
||||
}
|
||||
|
||||
void wxSoundFormatG72X::SetG72XType(wxSoundG72XType type)
|
||||
{
|
||||
m_g72x_type = type;
|
||||
}
|
||||
|
||||
wxSoundFormatBase *wxSoundFormatG72X::Clone() const
|
||||
{
|
||||
wxSoundFormatG72X *g72x = new wxSoundFormatG72X();
|
||||
|
||||
g72x->m_srate = m_srate;
|
||||
g72x->m_g72x_type = m_g72x_type;
|
||||
return g72x;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundFormatG72X::GetTimeFromBytes(wxUint32 bytes) const
|
||||
{
|
||||
int n_bits;
|
||||
|
||||
switch (m_g72x_type) {
|
||||
case wxSOUND_G721:
|
||||
n_bits = 4;
|
||||
break;
|
||||
case wxSOUND_G723_24:
|
||||
n_bits = 3;
|
||||
break;
|
||||
case wxSOUND_G723_40:
|
||||
n_bits = 5;
|
||||
break;
|
||||
default:
|
||||
n_bits = 0;
|
||||
break;
|
||||
}
|
||||
return (wxUint32)((bytes / m_srate) * n_bits) / 8;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundFormatG72X::GetBytesFromTime(wxUint32 time) const
|
||||
{
|
||||
int n_bits;
|
||||
|
||||
switch (m_g72x_type) {
|
||||
case wxSOUND_G721:
|
||||
n_bits = 4;
|
||||
break;
|
||||
case wxSOUND_G723_24:
|
||||
n_bits = 3;
|
||||
break;
|
||||
case wxSOUND_G723_40:
|
||||
n_bits = 5;
|
||||
break;
|
||||
default:
|
||||
n_bits = 0;
|
||||
}
|
||||
return (wxUint32)((time * m_srate * n_bits) / 8);
|
||||
}
|
||||
|
||||
bool wxSoundFormatG72X::operator !=(const wxSoundFormatBase& frmt2) const
|
||||
{
|
||||
wxSoundFormatG72X *g72x = (wxSoundFormatG72X *)&frmt2;
|
||||
|
||||
if (frmt2.GetType() != wxSOUND_G72X)
|
||||
return TRUE;
|
||||
|
||||
return (g72x->m_srate != m_srate || g72x->m_g72x_type != m_g72x_type);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// wxSoundStreamG72X
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
wxSoundStreamG72X::wxSoundStreamG72X(wxSoundStream& sndio)
|
||||
: wxSoundStreamCodec(sndio)
|
||||
{
|
||||
// PCM converter
|
||||
m_router = new wxSoundRouterStream(sndio);
|
||||
m_state = new g72state;
|
||||
g72x_init_state(m_state);
|
||||
}
|
||||
|
||||
wxSoundStreamG72X::~wxSoundStreamG72X()
|
||||
{
|
||||
delete m_router;
|
||||
}
|
||||
|
||||
wxSoundStream& wxSoundStreamG72X::Read(void *buffer, wxUint32 len)
|
||||
{
|
||||
wxUint16 *old_linear;
|
||||
register wxUint16 *linear_buffer;
|
||||
register wxUint32 real_len;
|
||||
register wxUint32 countdown = len;
|
||||
|
||||
real_len = (len * 8 / m_n_bits);
|
||||
|
||||
old_linear = linear_buffer = new wxUint16[real_len];
|
||||
|
||||
m_router->Read(linear_buffer, real_len);
|
||||
|
||||
real_len = (wxUint32)(m_router->GetLastAccess() * ((float)m_n_bits / 8));
|
||||
if (!real_len)
|
||||
return *m_router;
|
||||
|
||||
m_io_buffer = (wxUint8 *)buffer;
|
||||
m_current_b_pos = 0;
|
||||
|
||||
while (countdown != 0) {
|
||||
PutBits(m_coder(*linear_buffer++, AUDIO_ENCODING_LINEAR, m_state));
|
||||
countdown--;
|
||||
}
|
||||
m_lastcount = real_len;
|
||||
m_snderror = m_router->GetError();
|
||||
|
||||
delete[] old_linear;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxSoundStream& wxSoundStreamG72X::Write(const void *buffer, wxUint32 len)
|
||||
{
|
||||
wxUint16 *old_linear;
|
||||
register wxUint16 *linear_buffer;
|
||||
register wxUint32 countdown = len;
|
||||
register wxUint32 real_len;
|
||||
|
||||
// Compute the real length (PCM format) to sendt to the sound card
|
||||
real_len = (len * m_n_bits / 8);
|
||||
|
||||
// Allocate a temporary buffer
|
||||
old_linear = linear_buffer = new wxUint16[real_len];
|
||||
|
||||
// Bad, we override the const
|
||||
m_io_buffer = (wxUint8 *)buffer;
|
||||
m_current_b_pos = 0;
|
||||
|
||||
// Decode the datas
|
||||
while (countdown != 0) {
|
||||
*linear_buffer++ = m_decoder(GetBits(), AUDIO_ENCODING_LINEAR, m_state);
|
||||
countdown--;
|
||||
}
|
||||
m_lastcount = len;
|
||||
|
||||
// Send them to the sound card
|
||||
m_router->Write(old_linear, real_len);
|
||||
|
||||
// Destroy the temporary buffer
|
||||
delete[] old_linear;
|
||||
|
||||
return *m_router;
|
||||
}
|
||||
|
||||
bool wxSoundStreamG72X::SetSoundFormat(const wxSoundFormatBase& format)
|
||||
{
|
||||
if (format.GetType() != wxSOUND_G72X) {
|
||||
m_snderror = wxSOUND_INVFRMT;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wxSoundFormatPcm pcm;
|
||||
wxSoundFormatG72X *g72x;
|
||||
|
||||
wxSoundStreamCodec::SetSoundFormat(format);
|
||||
|
||||
g72x = (wxSoundFormatG72X *)m_sndformat;
|
||||
|
||||
// Set PCM as the output format of the codec
|
||||
pcm.SetSampleRate(g72x->GetSampleRate());
|
||||
pcm.SetBPS(16);
|
||||
pcm.SetChannels(1); // Only mono supported
|
||||
pcm.Signed(TRUE);
|
||||
pcm.SetOrder(wxBYTE_ORDER);
|
||||
|
||||
// Look for the correct codec to use and set its bit width
|
||||
switch (g72x->GetG72XType()) {
|
||||
case wxSOUND_G721:
|
||||
m_n_bits = 4;
|
||||
m_coder = g721_encoder;
|
||||
m_decoder = g721_decoder;
|
||||
break;
|
||||
case wxSOUND_G723_24:
|
||||
m_n_bits = 3;
|
||||
m_coder = g723_24_encoder;
|
||||
m_decoder = g723_24_decoder;
|
||||
break;
|
||||
case wxSOUND_G723_40:
|
||||
m_n_bits = 5;
|
||||
m_coder = g723_40_encoder;
|
||||
m_decoder = g723_40_decoder;
|
||||
break;
|
||||
}
|
||||
|
||||
// Let the router finish the work
|
||||
m_router->SetSoundFormat(pcm);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define BYTE_SIZE 8
|
||||
|
||||
wxUint8 wxSoundStreamG72X::GetBits()
|
||||
{
|
||||
register wxUint8 bits;
|
||||
|
||||
// We have two bytes to compute
|
||||
if (m_current_b_pos < m_n_bits) {
|
||||
register wxUint8 b_left;
|
||||
|
||||
// TRANSLATE the mask
|
||||
m_current_mask >>= m_current_b_pos;
|
||||
|
||||
// GET the last bits: 0001..1
|
||||
bits = (m_current_byte & m_current_mask) << (m_n_bits - m_current_b_pos);
|
||||
|
||||
// GEN: 1. n times .1000
|
||||
b_left = BYTE_SIZE-m_n_bits;
|
||||
m_current_mask = ((1 << m_n_bits) - 1) << b_left;
|
||||
|
||||
// GET the next byte
|
||||
m_current_byte = *m_io_buffer++;
|
||||
|
||||
register wxUint8 tmp_mask;
|
||||
|
||||
// COMPUTE a new temporary mask to get the last bits
|
||||
b_left = m_n_bits - b_left;
|
||||
tmp_mask = (1 << b_left) - 1;
|
||||
// TRANSLATE the old mask to get ready for the next time
|
||||
m_current_mask >>= b_left;
|
||||
|
||||
// COMPUTE the new bit position
|
||||
b_left = BYTE_SIZE - b_left;
|
||||
m_current_b_pos = b_left;
|
||||
tmp_mask <<= b_left;
|
||||
|
||||
// GET the last bits
|
||||
bits |= (m_current_byte & tmp_mask) >> b_left;
|
||||
} else {
|
||||
m_current_mask >>= m_n_bits;
|
||||
m_current_b_pos -= m_n_bits;
|
||||
bits = (m_current_byte & m_current_mask) >> m_current_b_pos;
|
||||
}
|
||||
return bits;
|
||||
}
|
||||
|
||||
void wxSoundStreamG72X::PutBits(wxUint8 bits)
|
||||
{
|
||||
if (m_current_b_pos < m_n_bits) {
|
||||
register wxUint8 tmp_mask;
|
||||
register wxUint8 diff;
|
||||
|
||||
diff = m_n_bits - m_current_b_pos;
|
||||
// Pack bits and put the byte in the buffer
|
||||
m_current_byte |= bits >> diff;
|
||||
*m_io_buffer++ = m_current_byte;
|
||||
|
||||
// Gen a mask
|
||||
tmp_mask = ~((1 << diff) - 1);
|
||||
|
||||
m_current_b_pos = BYTE_SIZE - (m_n_bits - m_current_b_pos);
|
||||
|
||||
m_current_byte = (bits & (tmp_mask)) << m_current_b_pos;
|
||||
} else {
|
||||
m_current_b_pos -= m_n_bits;
|
||||
bits <<= m_current_b_pos;
|
||||
m_current_byte |= bits;
|
||||
}
|
||||
}
|
@@ -1,168 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndulaw.cpp
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "sndulaw.cpp"
|
||||
#endif
|
||||
|
||||
#include <wx/wxprec.h>
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndfile.h"
|
||||
#include "wx/mmedia/sndpcm.h"
|
||||
#include "wx/mmedia/sndmsad.h"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// wxSoundFormatMSAdpcm
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
wxSoundFormatMSAdpcm::wxSoundFormatMSAdpcm()
|
||||
: m_srate(22050)
|
||||
{
|
||||
m_coefs = new wxMSAdpcmCoefs();
|
||||
}
|
||||
|
||||
wxSoundFormatMSAdpcm::~wxSoundFormatMSAdpcm()
|
||||
{
|
||||
delete m_coefs;
|
||||
}
|
||||
|
||||
void wxSoundFormatMSAdpcm::SetSampleRate(wxUint32 srate)
|
||||
{
|
||||
m_srate = srate;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundFormatMSAdpcm::GetSampleRate() const
|
||||
{
|
||||
return m_srate;
|
||||
}
|
||||
|
||||
wxSoundFormatBase *wxSoundFormatMSAdpcm::Clone() const
|
||||
{
|
||||
wxSoundFormatMSAdpcm *adpcm = new wxSoundFormatMSAdpcm();
|
||||
|
||||
adpcm->m_srate = m_srate;
|
||||
adpcm->m_coefs = new wxMSAdpcmCoefs();
|
||||
*(adpcm->m_coefs) = *m_coefs;
|
||||
return adpcm;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundFormatMSAdpcm::GetTimeFromBytes(wxUint32 bytes) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundFormatMSAdpcm::GetBytesFromTime(wxUint32 time) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool wxSoundFormatMSAdpcm::operator !=(const wxSoundFormatBase& frmt2) const
|
||||
{
|
||||
wxSoundFormatUlaw *adpcm = (wxSoundFormatMSAdpcm *)&frmt2;
|
||||
|
||||
if (frmt2.GetType() != wxSOUND_MSADPCM)
|
||||
return TRUE;
|
||||
|
||||
return (adpcm->m_srate != m_srate) && 0;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// wxSoundStreamMSAdpcm
|
||||
// --------------------------------------------------------------------------
|
||||
wxSoundStreamMSAdpcm::wxSoundStreamMSAdpcm(wxSoundStream& sndio)
|
||||
: wxSoundStreamCodec(sndio)
|
||||
{
|
||||
// PCM converter
|
||||
m_router = new wxSoundRouterStream(sndio);
|
||||
m_got_header = FALSE;
|
||||
}
|
||||
|
||||
wxSoundStreamMSAdpcm::~wxSoundStreamMSAdpcm()
|
||||
{
|
||||
delete m_router;
|
||||
}
|
||||
|
||||
wxSoundStream& wxSoundStreamMSAdpcm::Read(void *buffer, wxUint32 len)
|
||||
{
|
||||
m_snderror = wxSOUND_NOCODEC;
|
||||
m_lastcount = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
static wxInt16 gl_ADPCMcoeff_delta[] = {
|
||||
230, 230, 230, 230, 307, 409, 512, 614, 768, 614, 512, 409, 307, 230, 230, 230
|
||||
};
|
||||
|
||||
static wxInt16 gl_ADPCMcoeff_1[] = {
|
||||
256, 512, 0, 192, 240, 460, 392
|
||||
};
|
||||
|
||||
static wxInt16 gl_ADPCMcoeff_2[] = {
|
||||
0, -256, 0, 64, 0, -208, -232
|
||||
};
|
||||
|
||||
wxSoundStream& wxSoundStreamMSAdpcm::Write(const void *buffer, wxUint32 len)
|
||||
{
|
||||
wxInt16 delta;
|
||||
wxUint8 ADPCMdata;
|
||||
wxUint16 *PCMdata;
|
||||
wxInt16 coeff1, coeff2;
|
||||
|
||||
#define GET_DATA_16 (*ADPCMdata++ | ((wxUint32)(*ADPCMdata++) << 8);
|
||||
#define GET_DATA_8 (*ADPCMdata++)
|
||||
|
||||
if (!m_got_header) {
|
||||
i_predict = GET_DATA_8;
|
||||
delta = GET_DATA_16;
|
||||
samp1 = GET_DATA_16;
|
||||
PCMdata = GET_DATA_16;
|
||||
len -= 3*2 + 1;
|
||||
m_got_header = TRUE;
|
||||
|
||||
coeff1 = gl_ADPCMcoeff_1[i_predict];
|
||||
coeff2 = gl_ADPCMcoeff_2[i_predict];
|
||||
}
|
||||
|
||||
while (len > 0) {
|
||||
nyb1 = GET_DATA_8;
|
||||
nyb0 = (nyb1 & 0xf0) >> 4;
|
||||
nyb1 &= 0x0f;
|
||||
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxUint32 wxSoundStreamMSAdpcm::GetBestSize() const
|
||||
{
|
||||
return m_sndio->GetBestSize() / 2;
|
||||
}
|
||||
|
||||
bool wxSoundStreamMSAdpcm::SetSoundFormat(const wxSoundFormatBase& format)
|
||||
{
|
||||
if (format.GetType() != wxSOUND_ULAW) {
|
||||
m_snderror = wxSOUND_INVFRMT;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wxSoundFormatPcm pcm;
|
||||
wxSoundFormatUlaw *ulaw;
|
||||
|
||||
wxSoundStreamCodec::SetSoundFormat(format);
|
||||
|
||||
ulaw = (wxSoundFormatMSAdpcm *)m_sndformat;
|
||||
|
||||
pcm.SetSampleRate(adpcm->GetSampleRate());
|
||||
pcm.SetBPS(16);
|
||||
pcm.SetChannels(adpcm->GetChannels());
|
||||
pcm.Signed(TRUE);
|
||||
pcm.SetOrder(wxBYTE_ORDER);
|
||||
|
||||
m_router->SetSoundFormat(pcm);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user