Commit 5d4d2480 authored by Romain Beauxis's avatar Romain Beauxis

Imported Upstream version 0.2.1

parent d619f34d
0.2.1 (2013-02-18)
=====
* Add pulseaudio backend.
* Add channel and rate parameters for AO.
* Add resampling mode (`Nearest or `Linear).
* Remove on-the-fly samplerate conversions which were of bad quality (please
use a proper resampler such as ocaml-samplerate instead).
* Handle BGRA format.
* Check for memory allocation failures.
* Add a video player example.
0.2.0 (2011-10-04)
=====
* Add alpha channel for drawn lines.
......
......@@ -2,6 +2,7 @@
if [ -d m4 ]; then
OPTIONS="-I m4"
aclocal -I m4
fi
autoreconf -f -i $OPTIONS $1
# autoconf maintainers have not yet implemented
......
......@@ -2,9 +2,9 @@
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
# 2011, 2012 Free Software Foundation, Inc.
timestamp='2011-05-11'
timestamp='2012-02-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -17,9 +17,7 @@ timestamp='2011-05-11'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
......@@ -57,8 +55,8 @@ GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
Software Foundation, Inc.
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......@@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
......@@ -792,13 +790,12 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
......@@ -807,6 +804,9 @@ EOF
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
......@@ -861,6 +861,13 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
......@@ -895,13 +902,16 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
......@@ -943,7 +953,7 @@ EOF
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
......@@ -978,13 +988,13 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-tilera-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
......@@ -1315,6 +1325,9 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
......
......@@ -2,9 +2,9 @@
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
# 2011, 2012 Free Software Foundation, Inc.
timestamp='2011-03-23'
timestamp='2012-04-18'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
......@@ -21,9 +21,7 @@ timestamp='2011-03-23'
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
......@@ -76,8 +74,8 @@ version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
Software Foundation, Inc.
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......@@ -132,6 +130,10 @@ case $maybe_os in
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
......@@ -223,6 +225,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
;;
-lynx*5)
os=-lynxos5
;;
-lynx*)
os=-lynxos
;;
......@@ -247,17 +255,22 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
......@@ -291,7 +304,7 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
| rx \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
......@@ -300,7 +313,7 @@ case $basic_machine in
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
......@@ -315,8 +328,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
......@@ -329,7 +341,10 @@ case $basic_machine in
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
......@@ -352,11 +367,13 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
......@@ -365,8 +382,10 @@ case $basic_machine in
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
......@@ -400,7 +419,7 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| romp-* | rs6000-* | rx-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
......@@ -408,10 +427,11 @@ case $basic_machine in
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile-* | tilegx-* \
| tile*-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
......@@ -711,7 +731,6 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
......@@ -808,10 +827,18 @@ case $basic_machine in
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i386-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
......@@ -1120,13 +1147,8 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
# This must be matched before tile*.
tilegx*)
basic_machine=tilegx-unknown
os=-linux-gnu
;;
tile*)
basic_machine=tile-unknown
basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
......@@ -1336,7 +1358,7 @@ case $os in
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
......@@ -1521,6 +1543,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
hexagon-*)
os=-elf
;;
tic54x-*)
os=-coff
;;
......@@ -1548,9 +1573,6 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout
......
This diff is collapsed.
AC_INIT([ocaml-mm],[0.2.0],[savonet-users@lists.sourceforge.net])
AC_INIT([ocaml-mm],[0.2.1],[savonet-users@lists.sourceforge.net])
VERSION=$PACKAGE_VERSION
AC_MSG_RESULT(configuring $PACKAGE_STRING)
......@@ -26,6 +26,10 @@ AC_CHECK_OCAML_PKG([ao])
INCDIRS="$INCDIRS $OCAML_DIR_ao"
AC_SUBST(OCAML_HAS_ao)
AC_CHECK_OCAML_PKG([pulseaudio])
INCDIRS="$INCDIRS $OCAML_DIR_pulseaudio"
AC_SUBST(OCAML_HAS_pulseaudio)
AC_CHECK_OCAML_PKG([gstreamer])
INCDIRS="$INCDIRS $OCAML_DIR_gstreamer"
AC_SUBST(OCAML_HAS_gstreamer)
......@@ -97,6 +101,7 @@ Supported external libraries:
- Mad : $OCAML_HAS_mad
- ogg : $OCAML_HAS_ogg
- OSS : $W_OSS
- Pulseaudio: $OCAML_HAS_pulseaudio
- SDL : $OCAML_HAS_sdl
- Theora : $OCAML_HAS_theora
- V4L : $W_V4L
......
SOURCES = test.ml
RESULT = test
INCDIRS = ../../src ../../external/sdl ../../external/oss ../../../ocaml-gstreamer/src/ +sdl
LIBS = unix bigarray mm sdl mm.sdl mm.oss gstreamer
OCAMLNCFLAGS = -p
ANNOTATE = yes
all: pnc
test: all
OCAMLRUNPARAM=b ./test
gstest:
#gst-launch -v filesrc location=../test.wmv ! decodebin ! ffmpegcolorspace ! videoscale ! ximagesink
#gst-launch -v filesrc location=../test.wmv ! decodebin ! ffmpegcolorspace ! videoscale ! videorate ! video/x-raw-rgb,width=320,height=240,framerate='(fraction)'10/1,bpp=32,depth=24 ! ximagesink
# ! audio/x-raw-int,width=16,channels=2,rate=44100,endianness=4321,signed=true
gst-launch -v filesrc location=../test.wmv ! decodebin ! audioconvert ! audioresample ! audio/x-raw-int,width=16,channels=2,rate=44100,signed=true ! autoaudiosink
include OCamlMakefile
This diff is collapsed.
open Gstreamer
let width = 320
let height = 240
let fps = 24
let audio_channels = 2
let audio_rate = 44100
let src = "filesrc location=../test.wmv"
let pipeline =
Printf.sprintf "%s ! decodebin name=decode \
decode. ! ffmpegcolorspace ! videoscale ! videorate ! appsink max-buffers=2 drop=true name=videosink caps=\"video/x-raw-rgb,width=%d,height=%d,pixel-aspect-ratio=1/1,bpp=(int)24,depth=(int)24,endianness=(int)4321,red_mask=(int)0xff0000,green_mask=(int)0x00ff00,blue_mask=(int)0x0000ff,framerate=(fraction)%d/1\" \
decode. ! audioconvert ! audioresample ! appsink max-buffers=2 drop=true name=audiosink caps=\"audio/x-raw-int,width=16,channels=%d,rate=%d,signed=true\"" src width height fps audio_channels audio_rate
let () =
Gstreamer.init ();
Printf.printf "%s\n%!" (version_string ());
Printf.printf "%s\n%!" pipeline;
let bin = Pipeline.parse_launch pipeline in
let videosink = Bin.get_by_name (Bin.of_element bin) "videosink" in
let audiosink = Bin.get_by_name (Bin.of_element bin) "audiosink" in
let sdl = new MMSDL.writer_to_screen width height in
let oss = new MMOSS.writer audio_channels audio_rate in
let vid = Video.create 1 in
ignore (Element.set_state bin State_playing);
while true do
(* Video *)
let b = App_sink.pull_buffer (App_sink.of_element videosink) in
let img = Image.Generic.make_rgb Image.Generic.Pixel.RGB24 width height b in
let out = Image.RGBA32.create width height in
Image.Generic.convert ~copy:true ~proportional:true img (Image.Generic.of_RGBA32 out);
vid.(0) <- out;
sdl#write vid 0 1;
(* Audio *)
let b = App_sink.pull_buffer_string (App_sink.of_element audiosink) in
let samples = Audio.S16LE.duration audio_channels (String.length b) in
let buf = Audio.create audio_channels samples in
Audio.S16LE.to_audio b 0 buf 0 samples;
oss#write buf 0 samples
done;
ignore (Element.set_state bin State_null)
......@@ -8,7 +8,7 @@ endif
ifeq "yes" "yes"
LIBS += ffmpeg
endif
ifeq "no" "yes"
ifeq "yes" "yes"
LIBS += gstreamer
endif
ifeq "yes" "yes"
......
......@@ -2,9 +2,10 @@ OCAMLFLAGS =
OCAMLNCFLAGS =
OCAMLLDFLAGS = -linkall
CFLAGS = -g -O2 -I.. -g -Wall -O3
INCDIRS = .. /usr/lib/ocaml/alsa /usr/lib/ocaml/ao /usr/lib/ocaml/mad /usr/lib/ocaml/ogg /usr/lib/ocaml/sdl /usr/lib/ocaml/theora
INCDIRS = .. /usr/lib/ocaml/alsa /usr/lib/ocaml/ao /usr/lib/ocaml/pulseaudio /usr/lib/ocaml/gstreamer /usr/lib/ocaml/mad /usr/lib/ocaml/ogg /usr/lib/ocaml/sdl /usr/lib/ocaml/theora
NO_CUSTOM = yes
OCAMLDOCFLAGS = -sort -stars
ANNOTATE = yes
OCAMLMAKEFILE = OCamlMakefile
OCAMLFIND = ocamlfind
......@@ -26,4 +27,4 @@ PS2PDF = @PS2PDF@
OCAMLLIBPATH = /usr/lib/ocaml
OCAMLBEST = byte opt
INCDIRS+= .. /usr/lib/ocaml/alsa /usr/lib/ocaml/ao /usr/lib/ocaml/mad /usr/lib/ocaml/ogg /usr/lib/ocaml/sdl /usr/lib/ocaml/theora
INCDIRS+= .. /usr/lib/ocaml/alsa /usr/lib/ocaml/ao /usr/lib/ocaml/pulseaudio /usr/lib/ocaml/gstreamer /usr/lib/ocaml/mad /usr/lib/ocaml/ogg /usr/lib/ocaml/sdl /usr/lib/ocaml/theora
......@@ -5,6 +5,7 @@ CFLAGS = @CFLAGS@ -g -Wall -O3
INCDIRS = @INCDIRS@
NO_CUSTOM = yes
OCAMLDOCFLAGS = -sort -stars
ANNOTATE = yes
OCAMLMAKEFILE = OCamlMakefile
OCAMLFIND = @OCAMLFIND@
......
MMAlsa.cmo: MMAlsa.cmi
MMAlsa.cmx: MMAlsa.cmi
SOURCES = MMAlsa.mli MMAlsa.ml
RESULT = mm.alsa
INCDIRS = ../../src
OCAMLCFLAGS = -g
all: ncl
include OCamlMakefile
include ../Makefile.defs
INCDIRS += ../../src
\ No newline at end of file
MMAO.cmo: MMAO.cmi
MMAO.cmx: MMAO.cmi
......@@ -32,9 +32,9 @@
*)
(* unit argument because we might put optional arguments for parameters *)
class writer () =
class writer channels rate =
object (self)
val dev = Ao.open_live ()
val dev = Ao.open_live ~channels ~rate ~byte_format:`LITTLE_ENDIAN ()
method write buf ofs len =
let s = Audio.S16LE.make buf ofs len in
......
class writer : unit -> Audio.IO.Writer.t
class writer : int -> int -> Audio.IO.Writer.t
SOURCES = MMAO.mli MMAO.ml
RESULT = mm.ao
INCDIRS = ../../src
OCAMLCFLAGS = -g
all: ncl
include OCamlMakefile
include ../Makefile.defs
INCDIRS += ../../src
\ No newline at end of file
MMFFmpeg.cmo: MMFFmpeg.cmi
MMFFmpeg.cmx: MMFFmpeg.cmi
SOURCES = ffmpeg_stubs.c MMFFmpeg.mli MMFFmpeg.ml
RESULT = mm.ffmpeg
INCDIRS = ../../src
OCAMLFLAGS = -g
OCAMLLDFLAGS = -g
OCAMLNCFLAGS = -p
......@@ -11,3 +10,4 @@ all: ncl
include OCamlMakefile
include ../Makefile.defs
INCDIRS += ../../src
\ No newline at end of file
MMMad.cmo: MMMad.cmi
MMMad.cmx: MMMad.cmi
SOURCES = MMMad.mli MMMad.ml
RESULT = mm.mad
INCDIRS = ../../src
OCAMLFLAGS = -g
OCAMLNDFLAGS = -g
......@@ -8,3 +7,4 @@ all: ncl
include OCamlMakefile
include ../Makefile.defs
INCDIRS += ../../src
\ No newline at end of file
MMOSS.cmo: MMOSS.cmi
MMOSS.cmx: MMOSS.cmi
SOURCES = oss_stubs.c MMOSS.mli MMOSS.ml
RESULT = mm.oss
INCDIRS = ../../src
OCAMLFLAGS = -g
OCAMLLDFLAGS = -g
OCAMLNCFLAGS = -p
......@@ -10,3 +9,4 @@ all: ncl
include OCamlMakefile
include ../Makefile.defs
INCDIRS += ../../src
\ No newline at end of file
(*
* Copyright 2011 The Savonet Team
*
* This file is part of ocaml-mm.
*
* ocaml-mm is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* ocaml-mm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with ocaml-mm; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* As a special exception to the GNU Library General Public License, you may
* link, statically or dynamically, a "work that uses the Library" with a publicly
* distributed version of the Library to produce an executable file containing
* portions of the Library, and distribute that executable file under terms of
* your choice, without any of the additional requirements listed in clause 6
* of the GNU Library General Public License.
* By "a publicly distributed version of the Library", we mean either the unmodified
* Library as distributed by The Savonet Team, or a modified version of the Library that is
* distributed under the conditions defined in clause 3 of the GNU Library General
* Public License. This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU Library General Public License.
*
*)
open Pulseaudio
class writer client_name stream_name channels rate =
object (self)
val dev =
let sample =
{
sample_format = Sample_format_float32le;
sample_rate = rate;
sample_chans = channels;
}
in
Simple.create ~client_name ~dir:Dir_playback ~stream_name ~sample ()
method write buf ofs len =
Simple.write dev buf ofs len
method close =
Simple.free dev
end
class writer : string -> string -> int -> int -> Audio.IO.Writer.t
SOURCES = MMPulseaudio.mli MMPulseaudio.ml
RESULT = mm.pulseaudio
OCAMLCFLAGS = -g
all: ncl
include OCamlMakefile
include ../Makefile.defs
INCDIRS += ../../src
This diff is collapsed.