changeset 18915:99e20a22d5d0

modifies function declarations without parameters from () to the correct (void). Only files in libao2 are affected. patch by Stefan Huehner stefan AT huehner-org>
author reynaldo
date Thu, 06 Jul 2006 04:30:19 +0000
parents d450ec82ae57
children a95ed361d16b
files libao2/ao_alsa5.c libao2/ao_dsound.c libao2/ao_dxr2.c libao2/ao_jack.c libao2/ao_macosx.c libao2/ao_polyp.c libao2/ao_sgi.c libao2/ao_sun.c libao2/ao_win32.c
diffstat 9 files changed, 50 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_alsa5.c	Thu Jul 06 02:07:03 2006 +0000
+++ b/libao2/ao_alsa5.c	Thu Jul 06 04:30:19 2006 +0000
@@ -260,7 +260,7 @@
 }
 
 /* stop playing and empty buffers (for seeking/pause) */
-static void reset()
+static void reset(void)
 {
     int err;
 
@@ -284,7 +284,7 @@
 }
 
 /* stop playing, keep buffers (for pause) */
-static void audio_pause()
+static void audio_pause(void)
 {
     int err;
 
@@ -302,7 +302,7 @@
 }
 
 /* resume playing, after audio_pause() */
-static void audio_resume()
+static void audio_resume(void)
 {
     int err;
     if ((err = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0)
@@ -348,7 +348,7 @@
 }
 
 /* how many byes are free in the buffer */
-static int get_space()
+static int get_space(void)
 {
     snd_pcm_channel_status_t ch_stat;
     
@@ -361,7 +361,7 @@
 }
 
 /* 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;
     
--- a/libao2/ao_dsound.c	Thu Jul 06 02:07:03 2006 +0000
+++ b/libao2/ao_dsound.c	Thu Jul 06 04:30:19 2006 +0000
@@ -176,7 +176,7 @@
 /**
 \brief print the commandline help
 */
-static void print_help()
+static void print_help(void)
 {
   mp_msg(MSGT_AO, MSGL_FATAL,
            "\n-ao dsound commandline help:\n"
@@ -526,7 +526,7 @@
 /**
 \brief stop playing and empty buffers (for seeking/pause)
 */
-static void reset()
+static void reset(void)
 {
 	IDirectSoundBuffer_Stop(hdsbuf);
 	// reset directsound buffer
@@ -537,7 +537,7 @@
 /**
 \brief stop playing, keep buffers (for pause)
 */
-static void audio_pause()
+static void audio_pause(void)
 {
 	IDirectSoundBuffer_Stop(hdsbuf);
 }
@@ -545,7 +545,7 @@
 /**
 \brief resume playing, after audio_pause()
 */
-static void audio_resume()
+static void audio_resume(void)
 {
 	IDirectSoundBuffer_Play(hdsbuf, 0, 0, DSBPLAY_LOOPING);
 }
@@ -571,7 +571,7 @@
 \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
 */
-static int get_space()
+static int get_space(void)
 {
 	int space;
 	DWORD play_offset;
@@ -613,7 +613,7 @@
 \brief get the delay between the first and last sample in the buffer
 \return delay in seconds
 */
-static float get_delay()
+static float get_delay(void)
 {
 	DWORD play_offset;
 	int space;
--- a/libao2/ao_dxr2.c	Thu Jul 06 02:07:03 2006 +0000
+++ b/libao2/ao_dxr2.c	Thu Jul 06 04:30:19 2006 +0000
@@ -123,19 +123,19 @@
 }
 
 // stop playing and empty buffers (for seeking/pause)
-static void reset(){
+static void reset(void){
 
 }
 
 // stop playing, keep buffers (for pause)
-static void audio_pause()
+static void audio_pause(void)
 {
     // for now, just call reset();
     reset();
 }
 
 // resume playing, after audio_pause()
-static void audio_resume()
+static void audio_resume(void)
 {
 }
 
@@ -143,7 +143,7 @@
 extern void dxr2_send_lpcm_packet(unsigned char* data,int len,int id,int timestamp,int freq_id);
 extern int vo_pts;
 // 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;
     int y;
     if(x<=0) return 0;
@@ -174,7 +174,7 @@
 }
 
 // return: delay in seconds between first and last sample in buffer
-static float get_delay(){
+static float get_delay(void){
 
     return 0.0;
 }
--- a/libao2/ao_jack.c	Thu Jul 06 02:07:03 2006 +0000
+++ b/libao2/ao_jack.c	Thu Jul 06 04:30:19 2006 +0000
@@ -77,7 +77,7 @@
  * return value may change between immediately following two calls,
  * 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;
   if (free < 0) free += BUFFSIZE;
   return free;
@@ -91,7 +91,7 @@
  * return value may change between immediately following two calls,
  * 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;
   if (used < 0) used += BUFFSIZE;
   return used;
@@ -203,7 +203,7 @@
 /**
  * \brief print suboption usage help
  */
-static void print_help ()
+static void print_help (void)
 {
   mp_msg (MSGT_AO, MSGL_FATAL,
            "\n-ao jack commandline help:\n"
@@ -326,7 +326,7 @@
 /**
  * \brief stop playing and empty buffers (for seeking/pause)
  */
-static void reset() {
+static void reset(void) {
   paused = 1;
   read_pos = 0;
   write_pos = 0;
@@ -336,18 +336,18 @@
 /**
  * \brief stop playing, keep buffers (for pause)
  */
-static void audio_pause() {
+static void audio_pause(void) {
   paused = 1;
 }
 
 /**
  * \brief resume playing, after audio_pause()
  */
-static void audio_resume() {
+static void audio_resume(void) {
   paused = 0;
 }
 
-static int get_space() {
+static int get_space(void) {
   return buf_free();
 }
 
@@ -361,7 +361,7 @@
   return write_buffer(data, len);
 }
 
-static float get_delay() {
+static float get_delay(void) {
   int buffered = BUFFSIZE - CHUNK_SIZE - buf_free(); // could be less
   float in_jack = jack_latency;
   if (estimate && callback_interval > 0) {
--- a/libao2/ao_macosx.c	Thu Jul 06 02:07:03 2006 +0000
+++ b/libao2/ao_macosx.c	Thu Jul 06 04:30:19 2006 +0000
@@ -98,7 +98,7 @@
  *    two immediately following calls, and the real number of free bytes
  *    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;
   if (free < 0) free += ao->buffer_len;
   return free;
@@ -111,7 +111,7 @@
  *    two immediately following calls, and the real number of buffered bytes
  *    might actually be larger!
  */
-static int buf_used() {
+static int buf_used(void) {
   int used = ao->buf_write_pos - ao->buf_read_pos;
   if (used < 0) used += ao->buffer_len;
   return used;
@@ -346,7 +346,7 @@
 }
 
 /* set variables and buffer to initial state */
-static void reset()
+static void reset(void)
 {
   audio_pause();
   /* reset ring-buffer state */
@@ -359,14 +359,14 @@
 
 
 /* return available space */
-static int get_space()
+static int get_space(void)
 {
   return buf_free();
 }
 
 
 /* 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
   // inaccurate, should also contain the data buffered e.g. by the OS
@@ -393,7 +393,7 @@
 
 
 /* stop playing, keep buffers (for pause) */
-static void audio_pause()
+static void audio_pause(void)
 {
   OSErr status=noErr;
 
@@ -406,7 +406,7 @@
 
 
 /* resume playing, after audio_pause() */
-static void audio_resume()
+static void audio_resume(void)
 {
   OSErr status=noErr;
   
--- a/libao2/ao_polyp.c	Thu Jul 06 02:07:03 2006 +0000
+++ b/libao2/ao_polyp.c	Thu Jul 06 04:30:19 2006 +0000
@@ -197,19 +197,19 @@
 }
 
 /** 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);
     wait_for_operation(pa_stream_cork(stream, 1, NULL, NULL));
 }
 
 /** 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);
     wait_for_operation(pa_stream_cork(stream, 0, NULL, NULL));
 }
 
 /** 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);
     wait_for_operation(pa_stream_flush(stream, NULL, NULL));
 }
--- a/libao2/ao_sgi.c	Thu Jul 06 02:07:03 2006 +0000
+++ b/libao2/ao_sgi.c	Thu Jul 06 04:30:19 2006 +0000
@@ -224,7 +224,7 @@
 }
 
 // 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);
   
@@ -232,21 +232,21 @@
 }
 
 // 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);
     
 }
 
 // resume playing, after audio_pause()
-static void audio_resume() {
+static void audio_resume(void) {
 
   mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_ResumeInfo);
 
 }
 
 // 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: alGetFillable [%d] \n", alGetFillable(ao_port));
@@ -283,7 +283,7 @@
 }
 
 // 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);
   
--- a/libao2/ao_sun.c	Thu Jul 06 02:07:03 2006 +0000
+++ b/libao2/ao_sun.c	Thu Jul 06 04:30:19 2006 +0000
@@ -358,7 +358,7 @@
 }
 
 
-static void setup_device_paths()
+static void setup_device_paths(void)
 {
     if (audio_dev == NULL) {
 	if ((audio_dev = getenv("AUDIODEV")) == NULL)
@@ -621,7 +621,7 @@
 }
 
 // stop playing and empty buffers (for seeking/pause)
-static void reset(){
+static void reset(void){
     audio_info_t info;
 
     uninit(1);
@@ -650,7 +650,7 @@
 }
 
 // stop playing, keep buffers (for pause)
-static void audio_pause()
+static void audio_pause(void)
 {
     struct audio_info info;
     AUDIO_INITINFO(&info);
@@ -659,7 +659,7 @@
 }
 
 // resume playing, after audio_pause()
-static void audio_resume()
+static void audio_resume(void)
 {
     struct audio_info info;
     AUDIO_INITINFO(&info);
@@ -669,7 +669,7 @@
 
 
 // return: how many bytes can be played without blocking
-static int get_space(){
+static int get_space(void){
     audio_info_t info;
 
     // check buffer
@@ -721,7 +721,7 @@
 
 
 // return: delay in seconds between first and last sample in buffer
-static float get_delay(){
+static float get_delay(void){
     audio_info_t info;
     ioctl(audio_fd, AUDIO_GETINFO, &info);
 #if defined (__OpenBSD__) || defined(__NetBSD__)
--- a/libao2/ao_win32.c	Thu Jul 06 02:07:03 2006 +0000
+++ b/libao2/ao_win32.c	Thu Jul 06 04:30:19 2006 +0000
@@ -254,7 +254,7 @@
 }
 
 // stop playing and empty buffers (for seeking/pause)
-static void reset()
+static void reset(void)
 {
    	waveOutReset(hWaveOut);
 	buf_write=0;
@@ -264,19 +264,19 @@
 }
 
 // stop playing, keep buffers (for pause)
-static void audio_pause()
+static void audio_pause(void)
 {
     waveOutPause(hWaveOut);
 }
 
 // resume playing, after audio_pause()
-static void audio_resume()
+static void audio_resume(void)
 {
 	waveOutRestart(hWaveOut);
 }
 
 // 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;
 }
@@ -322,7 +322,7 @@
 }
 
 // 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;
 }