Commit 3cbfc06d authored by Sam Hocevar's avatar Sam Hocevar

. nouveaux plugins - ne fonctionnent pas encore tous

parent 1b79957c
Tue Jun 20 14:17:56 CEST 2000
0.1.99d :
* fixed RPM build
* .deb is now more lintian-friendly
Sun Jun 18 18:54:48 CEST 2000
0.1.99c :
* fixed Makefile.in for debug version
* caught Delete Window event in Gnome and X11 modes
* fixed manpage
* GGI output now works
* fixed a segfault on exit for the Gnome plugin
* fixed compile problems for BeOS
* sound support almost works under BeOS
* fixed a warning in ac3_exponent.c
* automatic support for .rpm and .deb building
* fixed Makefile.in for debug version
* caught Delete Window event in Gnome and X11 modes
* fixed manpage
* GGI output now works
* fixed a segfault on exit for the Gnome plugin
* fixed compile problems for BeOS
* sound support almost works under BeOS
* fixed a warning in ac3_exponent.c
* automatic support for .rpm and .deb building
Sat Jun 17 03:35:02 CEST 2000
0.1.99b :
* fixed a bug preventing to quit when run with no arguments
* new VLAN changing code
* created the ChangeLog file :)
* fixed a bug preventing to quit when run with no arguments
* new VLAN changing code
* created the ChangeLog file :)
INSTALL file for vlc, the VideoLAN Client
Building VideoLAN
=================
A typical way to configure the vlc is :
./configure --prefix=/usr --enable-ppro --enable-mmx --enable-gnome
See `./configure --help' for more information.
Then, run `make', and `make install' to install it.
To build a Debian package, you may use :
dpkg-buildpackage -rfakeroot -us -uc
To build RedHat packages, use :
rpm -ba vlc.spec
Installing and running VideoLAN
===============================
You can install the vlc and its plugins by typing :
make install
But you don't need to do it if you don't want ; vlc can be launched
from the current directory as well :
./vlc
......@@ -13,10 +13,7 @@
DEBUG=0
SYS=@SYS@
ARCH=@ARCH@
AOUT=@AOUT@
VOUT=@VOUT@
INTF=@VOUT@
PLUGINS=@PLUGINS@
SNAPSHOTDIR=vlc-@VLC_VERSION@
INSTALL=@INSTALL@
prefix=@prefix@
......@@ -249,12 +246,44 @@ endif
#
# Plugins
#
intf_plugin = $(INTF:%=plugins/intf/intf_%.so)
aout_plugin = $(AOUT:%=plugins/aout/aout_%.so)
vout_plugin = $(VOUT:%=plugins/vout/vout_%.so)
PLUGINS := $(PLUGINS:%=lib/%.so)
PLUGIN_OBJ = $(intf_plugin) $(aout_plugin) $(vout_plugin)
PLUGIN_BEOS = plugins/beos/aout_beos.o \
plugins/beos/intf_beos.o \
plugins/beos/vout_beos.o
PLUGIN_DSP = plugins/dsp/aout_dsp.o
PLUGIN_DUMMY = plugins/dummy/aout_dummy.o \
plugins/dummy/intf_dummy.o \
plugins/dummy/vout_dummy.o
PLUGIN_ESD = plugins/esd/aout_esd.o
PLUGIN_FB = plugins/fb/intf_fb.o \
plugins/fb/vout_fb.o
PLUGIN_GGI = plugins/ggi/intf_ggi.o \
plugins/ggi/vout_ggi.o
PLUGIN_GLIDE = plugins/glide/intf_glide.o \
plugins/glide/vout_glide.o
PLUGIN_GNOME = plugins/gnome/intf_gnome.o \
plugins/gnome/intf_gnome_callbacks.o \
plugins/gnome/intf_gnome_interface.o \
plugins/gnome/intf_gnome_support.o \
plugins/gnome/vout_gnome.o
PLUGIN_MGA = plugins/mga/intf_mga.o \
plugins/fb/vout_mga.o
PLUGIN_X11 = plugins/x11/intf_x11.o \
plugins/x11/vout_x11.o
PLUGIN_OBJ = $(PLUGIN_BEOS) $(PLUGIN_DSP) $(PLUGIN_DUMMY) $(PLUGIN_ESD) \
$(PLUGIN_FB) $(PLUGIN_GGI) $(PLUGIN_GLIDE) $(PLUGIN_GNOME) \
$(PLUGIN_MGA) $(PLUGIN_X11)
#
# Other lists of files
#
......@@ -280,7 +309,7 @@ clean:
rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
distclean: clean
rm -f */*/*.o plugins/*/*.so **/*~ *.log
rm -f src/*/*.o plugins/*/*.o lib/*.so **/*~ *.log
rm -f Makefile include/defs.h include/config.h
rm -f config.status config.cache config.log
rm -f vlc gmon.out core build-stamp
......@@ -290,9 +319,9 @@ install:
$(INSTALL) vlc $(prefix)/bin
mkdir -p $(prefix)/lib/videolan/vlc
mkdir -p $(prefix)/share/videolan/vlc
$(INSTALL) $(PLUGIN_OBJ) $(prefix)/lib/videolan/vlc
$(INSTALL) share/*.psf $(prefix)/share/videolan/vlc
$(INSTALL) share/*.png $(prefix)/share/videolan/vlc
$(INSTALL) -m 644 $(PLUGINS) $(prefix)/lib/videolan/vlc
$(INSTALL) -m 644 share/*.psf $(prefix)/share/videolan/vlc
$(INSTALL) -m 644 share/*.png $(prefix)/share/videolan/vlc
show:
@echo "Command line for C objects:"
......@@ -316,12 +345,6 @@ snapshot:
mv /tmp/${SNAPSHOTDIR}.tar.gz ..
@echo "Sources are in ../${SNAPSHOTDIR}.tar.gz"
deb:
dpkg-buildpackage -rfakeroot -us -uc
rpm:
rpm -ba vlc.spec
FORCE:
#
......@@ -336,7 +359,7 @@ else
$(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
endif
plugins: $(PLUGIN_OBJ)
plugins: $(PLUGINS)
#
# Generic rules (see below)
......@@ -359,57 +382,56 @@ $(ASM_OBJ): %.o: %.S
#$(PLUGIN_OBJ): %.so: Makefile.dep
#$(PLUGIN_OBJ): %.so: .dep/%.d
# audio plugins
plugins/aout/aout_dummy.so plugins/aout/aout_dsp.so: %.so: %.c
ifeq ($(SYS),beos)
$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
else
$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
endif
#$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
lib/beos.so: $(PLUGIN_BEOS)
ld -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
$(PLUGIN_BEOS): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
plugins/aout/aout_esd.so: %.so: %.c
lib/esd.so: $(PLUGIN_ESD)
ifneq (,$(findstring bsd,$(SYS)))
$(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $<
ld -shared -lesd -o $@ $^
else
$(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $<
ld -shared -laudiofile -lesd -o $@ $^
endif
$(PLUGIN_ESD): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
plugins/aout/aout_beos.so: %.so: %.cpp
$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
# video plugins
plugins/intf/intf_dummy.so plugins/vout/vout_dummy.so \
plugins/intf/intf_fb.so plugins/vout/vout_fb.so: %.so: %.c
ifeq ($(SYS),beos)
$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
else
$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
endif
plugins/intf/intf_x11.so plugins/vout/vout_x11.so: %.so: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
plugins/intf/intf_mga.so plugins/vout/vout_mga.so: %.so: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
lib/dummy.so: $(PLUGIN_DUMMY)
ld -shared -o $@ $^
$(PLUGIN_DUMMY): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
plugins/intf/intf_gnome.so: %.so: %.c
$(CC) $(CCFLAGS) $(CFLAGS) $(LCFLAGS) `gnome-config --libs --cflags gnomeui` -shared -o $@ $< plugins/intf/intf_gnome_callbacks.c plugins/intf/intf_gnome_interface.c plugins/intf/intf_gnome_support.c
lib/fb.so: $(PLUGIN_FB)
ld -shared -o $@ $^
$(PLUGIN_FB): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
plugins/vout/vout_gnome.so: %.so: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
lib/x11.so: $(PLUGIN_X11)
ld -shared -L/usr/X11R6/lib -lX11 -lXext -o $@ $^
$(PLUGIN_X11): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
plugins/intf/intf_glide.so plugins/vout/vout_glide.so: %.so: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/include/glide -lglide2x -shared -o $@ $<
lib/mga.so: $(PLUGIN_MGA)
ld -shared -L/usr/X11R6/lib -lX11 -lXext -o $@ $^
$(PLUGIN_MGA): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
plugins/intf/intf_ggi.so plugins/vout/vout_ggi.so: %.so: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -lggi -shared -o $@ $<
lib/gnome.so: $(PLUGIN_GNOME)
ld -shared `gnome-config --libs gnomeui | sed 's,-rdynamic,,'` -o $@ $^
$(PLUGIN_GNOME): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) `gnome-config --cflags gnomeui`-c -o $@ $<
plugins/intf/intf_beos.so: %.so: %.cpp
$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
lib/glide.so: $(PLUGIN_GLIDE)
ld -shared -lglide2x -o $@ $^
$(PLUGIN_GLIDE): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/include/glide -c -o $@ $<
plugins/vout/vout_beos.so: %.so: %.cpp
$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
lib/ggi.so: $(PLUGIN_GGI)
ld -shared -lggi -o $@ $^
$(PLUGIN_GGI): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
################################################################################
# Note on generic rules and dependancies
......
README for vlc, the VideoLAN Client
README for vlc, the VideoLAN Client
... Introduction
Introduction
============
[ nothing appropriate yet ]
Building, Installing and Running VideoLAN
=========================================
... Building VideoLAN
See the INSTALL file for this.
A typical way to configure the vlc is :
./configure --prefix=/usr --enable-ppro --enable-mmx --enable-gnome
Troubleshooting
===============
See `./configure --help' for more information.
A mailing-list has been set up for support and discussion about the
vlc. Its address is :
Then, run `make'.
<vlc@videolan.org>
To subscribe, send a mail to <listar@videolan.org> with the following
words in the mail body :
... Running VideoLAN
subscribe vlc
[ nothing appropriate yet ]
To unsubscribe, do the same with the words :
unsubscribe vlc
... Troubleshooting
When reporting bugs, try to be as precise as possible (which OS, which
distribution, what plugins you were trying, and so on).
[ nothing appropriate yet ]
... Resources
Resources
=========
[ nothing appropriate yet ]
... The team
The team
========
The following teachers were involved in the VideoLAN project :
......@@ -52,6 +56,7 @@ The following students were members of the VideoLAN team :
Antoine Brenner <brenner@via.ecp.fr>
Rgis Duchesne <regis@via.ecp.fr>
Alexandre Francois <francois@via.ecp.fr>
Christian Gross <gross@via.ecp.fr>
Hugo Haas <hugo@via.ecp.fr>
Mikael Journo <mj32@cornell.edu>
Michel Lespinasse <walken@wrs.com>
......@@ -61,7 +66,6 @@ The following students were members of the VideoLAN team :
Olivier Baxa <oli@via.ecp.fr>
Patrice Bazerque <patrice.bazerque@via.ecp.fr>
Etienne Bernard <eb@via.ecp.fr>
Arnaud Bienvenu <arnaud.bienvenu@via.ecp.fr>
Rgis Clment <clement@via.ecp.fr>
Alexandre Duret <alex@via.ecp.fr>
......
This diff is collapsed.
......@@ -4,7 +4,7 @@ AC_CONFIG_HEADER(include/defs.h)
AC_CANONICAL_HOST
VLC_VERSION=0.1.99c
VLC_VERSION=0.1.99d
AC_SUBST(VLC_VERSION)
VLC_CODENAME=Onatopp
AC_SUBST(VLC_CODENAME)
......@@ -58,34 +58,30 @@ AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_ARG_ENABLE(dummy,
[ --enable-vout-dummy dummy video support (default enabled)])
if test x$enable_vout_dummy != xno; then VOUT=${VOUT}"dummy "; fi
AC_ARG_ENABLE(x11,
[ --enable-x11 X11 video support (default enabled)])
if test x$enable_x11 != xno; then VOUT=${VOUT}"x11 "; fi
AC_ARG_ENABLE(fb,
[ --enable-fb Linux framebuffer video support (default disabled)],
[if test x$enable_fb = xyes; then VOUT=${VOUT}"fb "; fi])
AC_ARG_ENABLE(gnome,
[ --enable-gnome Gnome video support (default disabled)],
[if test x$enable_gnome = xyes; then VOUT=${VOUT}"gnome "; fi])
AC_ARG_ENABLE(glide,
[ --enable-glide Glide (3dfx) video support (default disabled)],
[if test x$enable_glide = xyes; then VOUT=${VOUT}"glide "; fi])
AC_ARG_ENABLE(ggi,
[ --enable-ggi GGI video support (default disabled)],
[if test x$enable_ggi = xyes; then VOUT=${VOUT}"ggi "; fi])
AC_ARG_ENABLE(dummy,
[ --enable-aout-dummy dummy audio support (default enabled)])
if test x$enable_aout_dummy != xno; then AOUT=${AOUT}"dummy "; fi
AC_ARG_ENABLE(dsp,
[ --enable-dsp Linux /dev/dsp support (default enabled)])
if test x$enable_dsp != xno; then AOUT=${AOUT}"dsp "; fi
if test x$enable_dsp != xno; then PLUGINS=${PLUGINS}"dsp "; fi
AC_ARG_ENABLE(dummy,
[ --enable-dummy dummy audio and video support (default enabled)])
if test x$enable_dummy != xno; then PLUGINS=${PLUGINS}"dummy "; fi
AC_ARG_ENABLE(esd,
[ --enable-esd Esound library support (default disabled)],
[if test x$enable_gnome = xyes; then AOUT=${AOUT}"esd "; fi])
[if test x$enable_gnome = xyes; then PLUGINS=${PLUGINS}"esd "; fi])
AC_ARG_ENABLE(fb,
[ --enable-fb Linux framebuffer support (default disabled)],
[if test x$enable_fb = xyes; then PLUGINS=${PLUGINS}"fb "; fi])
AC_ARG_ENABLE(ggi,
[ --enable-ggi GGI support (default disabled)],
[if test x$enable_ggi = xyes; then PLUGINS=${PLUGINS}"ggi "; fi])
AC_ARG_ENABLE(glide,
[ --enable-glide Glide (3dfx) support (default disabled)],
[if test x$enable_glide = xyes; then PLUGINS=${PLUGINS}"glide "; fi])
AC_ARG_ENABLE(gnome,
[ --enable-gnome Gnome support (default disabled)],
[if test x$enable_gnome = xyes; then PLUGINS=${PLUGINS}"gnome "; fi])
AC_ARG_ENABLE(x11,
[ --enable-x11 X11 support (default enabled)])
if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi
ARCH=${host_cpu}
AC_ARG_ENABLE(ppro,
......@@ -99,14 +95,12 @@ SYS=${host_os}
# special cases
if test x$host_os = xbeos; then
VOUT="dummy beos"
AOUT="dummy beos"
PLUGINS="dummy beos"
fi
AC_SUBST(SYS)
AC_SUBST(ARCH)
AC_SUBST(VOUT)
AC_SUBST(AOUT)
AC_SUBST(PLUGINS)
AC_OUTPUT([Makefile include/config.h])
......@@ -116,6 +110,5 @@ vlc configuration
vlc version : ${VLC_VERSION}
system : ${SYS}
architecture : ${ARCH}
vout : ${VOUT}
aout : ${AOUT}
plugins : ${PLUGINS}
"
vlc (0.1.99d) unstable; urgency=low
* .deb is now more lintian-friendly
-- Samuel Hocevar <sam@via.ecp.fr> Tue, 20 Jun 2000 14:17:33 +0200
vlc (0.1.99c) unstable; urgency=low
* Caught Delete Window event in Gnome and X11 modes
......
......@@ -26,7 +26,7 @@ typedef int plugin_id_t;
typedef void* plugin_id_t;
#endif
int RequestPlugin ( plugin_id_t * p_plugin, char * psz_mask, char * psz_name );
int RequestPlugin ( plugin_id_t * p_plugin, char * psz_name );
void TrashPlugin ( plugin_id_t p_plugin );
void * GetPluginFunction ( plugin_id_t plugin, char *name );
/*****************************************************************************
* aout_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
* Samuel Hocevar <sam@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdio.h>
#include <stdlib.h> /* malloc(), free() */
#include <sys/types.h> /* on BSD, uio.h needs types.h */
#include <sys/uio.h> /* "input.h" */
#include <kernel/OS.h>
#include <View.h>
#include <Application.h>
#include <Message.h>
#include <Locker.h>
#include <media/MediaDefs.h>
#include <game/PushGameSound.h>
#include <malloc.h>
#include <string.h>
extern "C"
{
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "plugins.h"
#include "audio_output.h"
#include "intf_msg.h"
#include "main.h"
}
/*****************************************************************************
* aout_sys_t: esd audio output method descriptor
*****************************************************************************
* This structure is part of the audio output thread descriptor.
* It describes some esd specific variables.
*****************************************************************************/
typedef struct aout_sys_s
{
BPushGameSound * p_sound;
gs_audio_format * p_format;
void * p_buffer;
long i_buffer_size;
long i_buffer_pos;
} aout_sys_t;
extern "C"
{
/*****************************************************************************
* aout_SysOpen: opens a BPushGameSound
*****************************************************************************/
int aout_SysOpen( aout_thread_t *p_aout )
{
/* Allocate structure */
p_aout->p_sys = (aout_sys_t*) malloc( sizeof( aout_sys_t ) );
if( p_aout->p_sys == NULL )
{
intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
return( 1 );
}
/* Allocate gs_audio_format */
p_aout->p_sys->p_format = (gs_audio_format *) malloc( sizeof( gs_audio_format ) );
if( p_aout->p_sys->p_format == NULL )
{
free( p_aout->p_sys );
intf_ErrMsg("error: cannot allocate memory for gs_audio_format\n" );
return( 1 );
}
/* Initialize some variables */
p_aout->i_format = AOUT_DEFAULT_FORMAT;
p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR,
AOUT_STEREO_DEFAULT );
p_aout->l_rate = main_GetIntVariable( AOUT_RATE_VAR, AOUT_RATE_DEFAULT );
p_aout->p_sys->p_format->frame_rate = 44100.0;
p_aout->p_sys->p_format->channel_count = p_aout->i_channels;
p_aout->p_sys->p_format->format = gs_audio_format::B_GS_S16;
p_aout->p_sys->p_format->byte_order = B_MEDIA_LITTLE_ENDIAN;
p_aout->p_sys->p_format->buffer_size = 8192;
/* Allocate BPushGameSound */
p_aout->p_sys->p_sound = new BPushGameSound( 8192,
p_aout->p_sys->p_format,
2, NULL );
if( p_aout->p_sys->p_sound == NULL )
{
free( p_aout->p_sys->p_format );
free( p_aout->p_sys );
intf_ErrMsg("error: cannot allocate memory for BPushGameSound\n" );
return( 1 );
}
if( p_aout->p_sys->p_sound->InitCheck() != B_OK )
{
free( p_aout->p_sys->p_format );
free( p_aout->p_sys );
intf_ErrMsg("error: cannot allocate memory for BPushGameSound\n" );
return( 1 );
}
p_aout->p_sys->p_sound->StartPlaying( );
p_aout->p_sys->p_sound->LockForCyclic( &p_aout->p_sys->p_buffer,
(size_t *)&p_aout->p_sys->i_buffer_size );
return( 0 );
}
/*****************************************************************************
* aout_SysReset: resets the dsp
*****************************************************************************/
int aout_SysReset( aout_thread_t *p_aout )
{
return( 0 );
}
/*****************************************************************************
* aout_SysSetFormat: sets the dsp output format
*****************************************************************************/
int aout_SysSetFormat( aout_thread_t *p_aout )
{
return( 0 );
}
/*****************************************************************************
* aout_SysSetChannels: sets the dsp's stereo or mono mode
*****************************************************************************/
int aout_SysSetChannels( aout_thread_t *p_aout )
{
return( 0 );
}
/*****************************************************************************
* aout_SysSetRate: sets the dsp's audio output rate
*****************************************************************************/
int aout_SysSetRate( aout_thread_t *p_aout )
{
return( 0 );
}
/*****************************************************************************
* aout_SysGetBufInfo: buffer status query
*****************************************************************************/
long aout_SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )
{
long i_hard_pos = 4 * p_aout->p_sys->p_sound->CurrentPosition();
/*fprintf( stderr, "read 0x%.6lx - write 0x%.6lx = ",
i_hard_pos, p_aout->p_sys->i_buffer_pos );*/
if( i_hard_pos < p_aout->p_sys->i_buffer_pos )
{
i_hard_pos += p_aout->p_sys->i_buffer_size;
}
/*fprintf( stderr, "0x%.6lx\n", i_hard_pos - p_aout->p_sys->i_buffer_pos ); */
return( (p_aout->p_sys->i_buffer_size - (i_hard_pos - p_aout->p_sys->i_buffer_pos)) );
}
/*****************************************************************************
* aout_SysPlaySamples: plays a sound samples buffer
*****************************************************************************
* This function writes a buffer of i_length bytes in the dsp
*****************************************************************************/
void aout_SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size )
{
long i_newbuf_pos;
//fprintf( stderr, "writing %i\n", i_size );
if( (i_newbuf_pos = p_aout->p_sys->i_buffer_pos + i_size)
> p_aout->p_sys->i_buffer_size )
{
memcpy( (void *)((int)p_aout->p_sys->p_buffer
+ p_aout->p_sys->i_buffer_pos),
buffer,
p_aout->p_sys->i_buffer_size - p_aout->p_sys->i_buffer_pos );
memcpy( (void *)((int)p_aout->p_sys->p_buffer),
buffer,
i_size - ( p_aout->p_sys->i_buffer_size
- p_aout->p_sys->i_buffer_pos ) );
p_aout->p_sys->i_buffer_pos = i_newbuf_pos - p_aout->p_sys->i_buffer_size;
}
else
{
memcpy( (void *)((int)p_aout->p_sys->p_buffer + p_aout->p_sys->i_buffer_pos),
buffer, i_size );
p_aout->p_sys->i_buffer_pos = i_newbuf_pos;
}
}
/*****************************************************************************
* aout_SysClose: closes the dsp audio device
*****************************************************************************/
void aout_SysClose( aout_thread_t *p_aout )
{
p_aout->p_sys->p_sound->UnlockCyclic();
p_aout->p_sys->p_sound->StopPlaying( );
delete p_aout->p_sys->p_sound;
free( p_aout->p_sys->p_format );
free( p_aout->p_sys );
}
} /* extern "C" */
/*****************************************************************************
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
* Jean-Marc Dressler
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdio.h>
#include <stdlib.h> /* malloc(), free() */
#include <sys/types.h> /* on BSD, uio.h needs types.h */
#include <sys/uio.h> /* "input.h" */
#include <kernel/OS.h>
#include <View.h>
#include <Application.h>
#include <Message.h>
#include <Locker.h>
#include <DirectWindow.h>
#include <malloc.h>
#include <string.h>
extern "C"
{
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "plugins.h"
#include