diff options
author | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-05 18:40:44 +0000 |
---|---|---|
committer | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-05 18:40:44 +0000 |
commit | 5c50d3e7dd839be03468e5058ce7d5eb60dfe1d8 (patch) | |
tree | 5c630dd1bec808dfe785e27b47615982d84040ad /libao2/ao_sdl.c | |
parent | 49ea21d07367275022349403cb4a60f8316e5634 (diff) | |
download | mpv-5c50d3e7dd839be03468e5058ce7d5eb60dfe1d8.tar.bz2 mpv-5c50d3e7dd839be03468e5058ce7d5eb60dfe1d8.tar.xz |
applied solaris8/netbsd/other fixes patch by Jürgen Keil <jk@tools.de>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1039 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2/ao_sdl.c')
-rw-r--r-- | libao2/ao_sdl.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c index bdd11ab4c4..717a63e9da 100644 --- a/libao2/ao_sdl.c +++ b/libao2/ao_sdl.c @@ -11,6 +11,7 @@ */ #include <stdio.h> +#include <stdlib.h> #include "audio_out.h" #include "audio_out_internal.h" @@ -57,6 +58,7 @@ static unsigned int buf_write_pos=0; static int full_buffers=0; static int buffered_bytes=0; + static int write_buffer(unsigned char* data,int len){ int len2=0; int x; @@ -105,6 +107,23 @@ static int read_buffer(unsigned char* data,int len){ #include <SDL/SDL.h> #endif +#if defined(sun) && defined(__svr4__) +/* setenv is missing on solaris */ +static void setenv(const char *name, const char *val, int _xx) +{ + int len = strlen(name) + strlen(val) + 2; + char *env = malloc(len); + + if (env != NULL) { + strcpy(env, name); + strcat(env, "="); + strcat(env, val); + putenv(env); + } +} +#endif + + // to set/get/query special features/parameters static int control(int cmd,int arg){ return -1; @@ -196,6 +215,19 @@ static void reset(){ } +// stop playing, keep buffers (for pause) +static void audio_pause() +{ + // for now, just call reset(); + reset(); +} + +// resume playing, after audio_pause() +static void audio_resume() +{ +} + + // return: how many bytes can be played without blocking static int get_space(){ return (NUM_BUFS-full_buffers)*BUFFSIZE - buf_write_pos; |