modifies function declarations without parameters from ()

to the correct (void). Only files in libao2 are affected.

patch by Stefan Huehner stefan AT huehner-org>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18920 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reynaldo 2006-07-06 04:30:19 +00:00
parent 4aa477ef2c
commit f50e7ffca9
9 changed files with 50 additions and 50 deletions

View File

@ -260,7 +260,7 @@ static void uninit(int immed)
} }
/* stop playing and empty buffers (for seeking/pause) */ /* stop playing and empty buffers (for seeking/pause) */
static void reset() static void reset(void)
{ {
int err; int err;
@ -284,7 +284,7 @@ static void reset()
} }
/* stop playing, keep buffers (for pause) */ /* stop playing, keep buffers (for pause) */
static void audio_pause() static void audio_pause(void)
{ {
int err; int err;
@ -302,7 +302,7 @@ static void audio_pause()
} }
/* resume playing, after audio_pause() */ /* resume playing, after audio_pause() */
static void audio_resume() static void audio_resume(void)
{ {
int err; int err;
if ((err = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) if ((err = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0)
@ -348,7 +348,7 @@ static int play(void* data, int len, int flags)
} }
/* how many byes are free in the buffer */ /* how many byes are free in the buffer */
static int get_space() static int get_space(void)
{ {
snd_pcm_channel_status_t ch_stat; snd_pcm_channel_status_t ch_stat;
@ -361,7 +361,7 @@ static int get_space()
} }
/* delay in seconds between first and last sample in buffer */ /* delay in seconds between first and last sample in buffer */
static float get_delay() static float get_delay(void)
{ {
snd_pcm_channel_status_t ch_stat; snd_pcm_channel_status_t ch_stat;

View File

@ -176,7 +176,7 @@ static void UninitDirectSound(void)
/** /**
\brief print the commandline help \brief print the commandline help
*/ */
static void print_help() static void print_help(void)
{ {
mp_msg(MSGT_AO, MSGL_FATAL, mp_msg(MSGT_AO, MSGL_FATAL,
"\n-ao dsound commandline help:\n" "\n-ao dsound commandline help:\n"
@ -526,7 +526,7 @@ static int init(int rate, int channels, int format, int flags)
/** /**
\brief stop playing and empty buffers (for seeking/pause) \brief stop playing and empty buffers (for seeking/pause)
*/ */
static void reset() static void reset(void)
{ {
IDirectSoundBuffer_Stop(hdsbuf); IDirectSoundBuffer_Stop(hdsbuf);
// reset directsound buffer // reset directsound buffer
@ -537,7 +537,7 @@ static void reset()
/** /**
\brief stop playing, keep buffers (for pause) \brief stop playing, keep buffers (for pause)
*/ */
static void audio_pause() static void audio_pause(void)
{ {
IDirectSoundBuffer_Stop(hdsbuf); IDirectSoundBuffer_Stop(hdsbuf);
} }
@ -545,7 +545,7 @@ static void audio_pause()
/** /**
\brief resume playing, after audio_pause() \brief resume playing, after audio_pause()
*/ */
static void audio_resume() static void audio_resume(void)
{ {
IDirectSoundBuffer_Play(hdsbuf, 0, 0, DSBPLAY_LOOPING); IDirectSoundBuffer_Play(hdsbuf, 0, 0, DSBPLAY_LOOPING);
} }
@ -571,7 +571,7 @@ static void uninit(int immed)
\brief find out how many bytes can be written into the audio buffer without \brief find out how many bytes can be written into the audio buffer without
\return free space in bytes, has to return 0 if the buffer is almost full \return free space in bytes, has to return 0 if the buffer is almost full
*/ */
static int get_space() static int get_space(void)
{ {
int space; int space;
DWORD play_offset; DWORD play_offset;
@ -613,7 +613,7 @@ static int play(void* data, int len, int flags)
\brief get the delay between the first and last sample in the buffer \brief get the delay between the first and last sample in the buffer
\return delay in seconds \return delay in seconds
*/ */
static float get_delay() static float get_delay(void)
{ {
DWORD play_offset; DWORD play_offset;
int space; int space;

View File

@ -123,19 +123,19 @@ static void uninit(int immed){
} }
// stop playing and empty buffers (for seeking/pause) // stop playing and empty buffers (for seeking/pause)
static void reset(){ static void reset(void){
} }
// stop playing, keep buffers (for pause) // stop playing, keep buffers (for pause)
static void audio_pause() static void audio_pause(void)
{ {
// for now, just call reset(); // for now, just call reset();
reset(); reset();
} }
// resume playing, after audio_pause() // resume playing, after audio_pause()
static void audio_resume() static void audio_resume(void)
{ {
} }
@ -143,7 +143,7 @@ extern void dxr2_send_packet(unsigned char* data,int len,int id,int timestamp);
extern void dxr2_send_lpcm_packet(unsigned char* data,int len,int id,int timestamp,int freq_id); extern void dxr2_send_lpcm_packet(unsigned char* data,int len,int id,int timestamp,int freq_id);
extern int vo_pts; extern int vo_pts;
// return: how many bytes can be played without blocking // return: how many bytes can be played without blocking
static int get_space(){ static int get_space(void){
float x=(float)(vo_pts-ao_data.pts)/90000.0; float x=(float)(vo_pts-ao_data.pts)/90000.0;
int y; int y;
if(x<=0) return 0; if(x<=0) return 0;
@ -174,7 +174,7 @@ static int play(void* data,int len,int flags){
} }
// return: delay in seconds between first and last sample in buffer // return: delay in seconds between first and last sample in buffer
static float get_delay(){ static float get_delay(void){
return 0.0; return 0.0;
} }

View File

@ -77,7 +77,7 @@ static volatile int write_pos;
* return value may change between immediately following two calls, * return value may change between immediately following two calls,
* and the real number of free bytes might be larger! * and the real number of free bytes might be larger!
*/ */
static int buf_free() { static int buf_free(void) {
int free = read_pos - write_pos - CHUNK_SIZE; int free = read_pos - write_pos - CHUNK_SIZE;
if (free < 0) free += BUFFSIZE; if (free < 0) free += BUFFSIZE;
return free; return free;
@ -91,7 +91,7 @@ static int buf_free() {
* return value may change between immediately following two calls, * return value may change between immediately following two calls,
* and the real number of buffered bytes might be larger! * and the real number of buffered bytes might be larger!
*/ */
static int buf_used() { static int buf_used(void) {
int used = write_pos - read_pos; int used = write_pos - read_pos;
if (used < 0) used += BUFFSIZE; if (used < 0) used += BUFFSIZE;
return used; return used;
@ -203,7 +203,7 @@ static int outputaudio(jack_nframes_t nframes, void *arg) {
/** /**
* \brief print suboption usage help * \brief print suboption usage help
*/ */
static void print_help () static void print_help (void)
{ {
mp_msg (MSGT_AO, MSGL_FATAL, mp_msg (MSGT_AO, MSGL_FATAL,
"\n-ao jack commandline help:\n" "\n-ao jack commandline help:\n"
@ -326,7 +326,7 @@ static void uninit(int immed) {
/** /**
* \brief stop playing and empty buffers (for seeking/pause) * \brief stop playing and empty buffers (for seeking/pause)
*/ */
static void reset() { static void reset(void) {
paused = 1; paused = 1;
read_pos = 0; read_pos = 0;
write_pos = 0; write_pos = 0;
@ -336,18 +336,18 @@ static void reset() {
/** /**
* \brief stop playing, keep buffers (for pause) * \brief stop playing, keep buffers (for pause)
*/ */
static void audio_pause() { static void audio_pause(void) {
paused = 1; paused = 1;
} }
/** /**
* \brief resume playing, after audio_pause() * \brief resume playing, after audio_pause()
*/ */
static void audio_resume() { static void audio_resume(void) {
paused = 0; paused = 0;
} }
static int get_space() { static int get_space(void) {
return buf_free(); return buf_free();
} }
@ -361,7 +361,7 @@ static int play(void *data, int len, int flags) {
return write_buffer(data, len); return write_buffer(data, len);
} }
static float get_delay() { static float get_delay(void) {
int buffered = BUFFSIZE - CHUNK_SIZE - buf_free(); // could be less int buffered = BUFFSIZE - CHUNK_SIZE - buf_free(); // could be less
float in_jack = jack_latency; float in_jack = jack_latency;
if (estimate && callback_interval > 0) { if (estimate && callback_interval > 0) {

View File

@ -98,7 +98,7 @@ static ao_macosx_t *ao = NULL;
* two immediately following calls, and the real number of free bytes * two immediately following calls, and the real number of free bytes
* might actually be larger! * might actually be larger!
*/ */
static int buf_free() { static int buf_free(void) {
int free = ao->buf_read_pos - ao->buf_write_pos - ao->chunk_size; int free = ao->buf_read_pos - ao->buf_write_pos - ao->chunk_size;
if (free < 0) free += ao->buffer_len; if (free < 0) free += ao->buffer_len;
return free; return free;
@ -111,7 +111,7 @@ static int buf_free() {
* two immediately following calls, and the real number of buffered bytes * two immediately following calls, and the real number of buffered bytes
* might actually be larger! * might actually be larger!
*/ */
static int buf_used() { static int buf_used(void) {
int used = ao->buf_write_pos - ao->buf_read_pos; int used = ao->buf_write_pos - ao->buf_read_pos;
if (used < 0) used += ao->buffer_len; if (used < 0) used += ao->buffer_len;
return used; return used;
@ -346,7 +346,7 @@ static int play(void* output_samples,int num_bytes,int flags)
} }
/* set variables and buffer to initial state */ /* set variables and buffer to initial state */
static void reset() static void reset(void)
{ {
audio_pause(); audio_pause();
/* reset ring-buffer state */ /* reset ring-buffer state */
@ -359,14 +359,14 @@ static void reset()
/* return available space */ /* return available space */
static int get_space() static int get_space(void)
{ {
return buf_free(); return buf_free();
} }
/* return delay until audio is played */ /* return delay until audio is played */
static float get_delay() static float get_delay(void)
{ {
int buffered = ao->buffer_len - ao->chunk_size - buf_free(); // could be less int buffered = ao->buffer_len - ao->chunk_size - buf_free(); // could be less
// inaccurate, should also contain the data buffered e.g. by the OS // inaccurate, should also contain the data buffered e.g. by the OS
@ -393,7 +393,7 @@ static void uninit(int immed)
/* stop playing, keep buffers (for pause) */ /* stop playing, keep buffers (for pause) */
static void audio_pause() static void audio_pause(void)
{ {
OSErr status=noErr; OSErr status=noErr;
@ -406,7 +406,7 @@ static void audio_pause()
/* resume playing, after audio_pause() */ /* resume playing, after audio_pause() */
static void audio_resume() static void audio_resume(void)
{ {
OSErr status=noErr; OSErr status=noErr;

View File

@ -197,19 +197,19 @@ static int play(void* data, int len, int flags) {
} }
/** Pause the audio stream by corking it on the server */ /** Pause the audio stream by corking it on the server */
static void audio_pause() { static void audio_pause(void) {
assert(stream && context && pa_stream_get_state(stream) == PA_STREAM_READY); assert(stream && context && pa_stream_get_state(stream) == PA_STREAM_READY);
wait_for_operation(pa_stream_cork(stream, 1, NULL, NULL)); wait_for_operation(pa_stream_cork(stream, 1, NULL, NULL));
} }
/** Resume the audio stream by uncorking it on the server */ /** Resume the audio stream by uncorking it on the server */
static void audio_resume() { static void audio_resume(void) {
assert(stream && context && pa_stream_get_state(stream) == PA_STREAM_READY); assert(stream && context && pa_stream_get_state(stream) == PA_STREAM_READY);
wait_for_operation(pa_stream_cork(stream, 0, NULL, NULL)); wait_for_operation(pa_stream_cork(stream, 0, NULL, NULL));
} }
/** Reset the audio stream, i.e. flush the playback buffer on the server side */ /** Reset the audio stream, i.e. flush the playback buffer on the server side */
static void reset() { static void reset(void) {
assert(stream && context && pa_stream_get_state(stream) == PA_STREAM_READY); assert(stream && context && pa_stream_get_state(stream) == PA_STREAM_READY);
wait_for_operation(pa_stream_flush(stream, NULL, NULL)); wait_for_operation(pa_stream_flush(stream, NULL, NULL));
} }

View File

@ -224,7 +224,7 @@ static void uninit(int immed) {
} }
// stop playing and empty buffers (for seeking/pause) // stop playing and empty buffers (for seeking/pause)
static void reset() { static void reset(void) {
mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_Reset); mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_Reset);
@ -232,21 +232,21 @@ static void reset() {
} }
// stop playing, keep buffers (for pause) // stop playing, keep buffers (for pause)
static void audio_pause() { static void audio_pause(void) {
mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_PauseInfo); mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_PauseInfo);
} }
// resume playing, after audio_pause() // resume playing, after audio_pause()
static void audio_resume() { static void audio_resume(void) {
mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_ResumeInfo); mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_ResumeInfo);
} }
// return: how many bytes can be played without blocking // return: how many bytes can be played without blocking
static int get_space() { static int get_space(void) {
// printf("ao_sgi, get_space: (ao_outburst %d)\n", ao_data.outburst); // printf("ao_sgi, get_space: (ao_outburst %d)\n", ao_data.outburst);
// printf("ao_sgi, get_space: alGetFillable [%d] \n", alGetFillable(ao_port)); // printf("ao_sgi, get_space: alGetFillable [%d] \n", alGetFillable(ao_port));
@ -283,7 +283,7 @@ static int play(void* data, int len, int flags) {
} }
// return: delay in seconds between first and last sample in buffer // return: delay in seconds between first and last sample in buffer
static float get_delay(){ static float get_delay(void){
// printf("ao_sgi, get_delay: (ao_buffersize %d)\n", ao_buffersize); // printf("ao_sgi, get_delay: (ao_buffersize %d)\n", ao_buffersize);

View File

@ -358,7 +358,7 @@ find_highest_samplerate(int dev)
} }
static void setup_device_paths() static void setup_device_paths(void)
{ {
if (audio_dev == NULL) { if (audio_dev == NULL) {
if ((audio_dev = getenv("AUDIODEV")) == NULL) if ((audio_dev = getenv("AUDIODEV")) == NULL)
@ -621,7 +621,7 @@ static void uninit(int immed){
} }
// stop playing and empty buffers (for seeking/pause) // stop playing and empty buffers (for seeking/pause)
static void reset(){ static void reset(void){
audio_info_t info; audio_info_t info;
uninit(1); uninit(1);
@ -650,7 +650,7 @@ static void reset(){
} }
// stop playing, keep buffers (for pause) // stop playing, keep buffers (for pause)
static void audio_pause() static void audio_pause(void)
{ {
struct audio_info info; struct audio_info info;
AUDIO_INITINFO(&info); AUDIO_INITINFO(&info);
@ -659,7 +659,7 @@ static void audio_pause()
} }
// resume playing, after audio_pause() // resume playing, after audio_pause()
static void audio_resume() static void audio_resume(void)
{ {
struct audio_info info; struct audio_info info;
AUDIO_INITINFO(&info); AUDIO_INITINFO(&info);
@ -669,7 +669,7 @@ static void audio_resume()
// return: how many bytes can be played without blocking // return: how many bytes can be played without blocking
static int get_space(){ static int get_space(void){
audio_info_t info; audio_info_t info;
// check buffer // check buffer
@ -721,7 +721,7 @@ static int play(void* data,int len,int flags){
// return: delay in seconds between first and last sample in buffer // return: delay in seconds between first and last sample in buffer
static float get_delay(){ static float get_delay(void){
audio_info_t info; audio_info_t info;
ioctl(audio_fd, AUDIO_GETINFO, &info); ioctl(audio_fd, AUDIO_GETINFO, &info);
#if defined (__OpenBSD__) || defined(__NetBSD__) #if defined (__OpenBSD__) || defined(__NetBSD__)

View File

@ -254,7 +254,7 @@ static void uninit(int immed)
} }
// stop playing and empty buffers (for seeking/pause) // stop playing and empty buffers (for seeking/pause)
static void reset() static void reset(void)
{ {
waveOutReset(hWaveOut); waveOutReset(hWaveOut);
buf_write=0; buf_write=0;
@ -264,19 +264,19 @@ static void reset()
} }
// stop playing, keep buffers (for pause) // stop playing, keep buffers (for pause)
static void audio_pause() static void audio_pause(void)
{ {
waveOutPause(hWaveOut); waveOutPause(hWaveOut);
} }
// resume playing, after audio_pause() // resume playing, after audio_pause()
static void audio_resume() static void audio_resume(void)
{ {
waveOutRestart(hWaveOut); waveOutRestart(hWaveOut);
} }
// return: how many bytes can be played without blocking // return: how many bytes can be played without blocking
static int get_space() static int get_space(void)
{ {
return BUFFER_COUNT*BUFFER_SIZE - buffered_bytes; return BUFFER_COUNT*BUFFER_SIZE - buffered_bytes;
} }
@ -322,7 +322,7 @@ static int play(void* data,int len,int flags)
} }
// return: delay in seconds between first and last sample in buffer // return: delay in seconds between first and last sample in buffer
static float get_delay() static float get_delay(void)
{ {
return (float)(buffered_bytes + ao_data.buffersize)/(float)ao_data.bps; return (float)(buffered_bytes + ao_data.buffersize)/(float)ao_data.bps;
} }