mirror of
https://github.com/mpv-player/mpv
synced 2025-01-19 13:51:14 +00:00
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:
parent
4aa477ef2c
commit
f50e7ffca9
@ -260,7 +260,7 @@ static void uninit(int immed)
|
||||
}
|
||||
|
||||
/* stop playing and empty buffers (for seeking/pause) */
|
||||
static void reset()
|
||||
static void reset(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
@ -284,7 +284,7 @@ static void reset()
|
||||
}
|
||||
|
||||
/* stop playing, keep buffers (for pause) */
|
||||
static void audio_pause()
|
||||
static void audio_pause(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
@ -302,7 +302,7 @@ static void audio_pause()
|
||||
}
|
||||
|
||||
/* 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 @@ static int play(void* data, int len, int flags)
|
||||
}
|
||||
|
||||
/* 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 @@ static int get_space()
|
||||
}
|
||||
|
||||
/* 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;
|
||||
|
||||
|
@ -176,7 +176,7 @@ static void UninitDirectSound(void)
|
||||
/**
|
||||
\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 @@ static int init(int rate, int channels, int format, int flags)
|
||||
/**
|
||||
\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 @@ static void reset()
|
||||
/**
|
||||
\brief stop playing, keep buffers (for pause)
|
||||
*/
|
||||
static void audio_pause()
|
||||
static void audio_pause(void)
|
||||
{
|
||||
IDirectSoundBuffer_Stop(hdsbuf);
|
||||
}
|
||||
@ -545,7 +545,7 @@ static void audio_pause()
|
||||
/**
|
||||
\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 @@ static void uninit(int immed)
|
||||
\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 @@ static int play(void* data, int len, int flags)
|
||||
\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;
|
||||
|
@ -123,19 +123,19 @@ static void uninit(int immed){
|
||||
}
|
||||
|
||||
// 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_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 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 @@ static int play(void* data,int len,int flags){
|
||||
}
|
||||
|
||||
// return: delay in seconds between first and last sample in buffer
|
||||
static float get_delay(){
|
||||
static float get_delay(void){
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ static volatile int write_pos;
|
||||
* 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 @@ static int buf_free() {
|
||||
* 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 @@ static int outputaudio(jack_nframes_t nframes, void *arg) {
|
||||
/**
|
||||
* \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 @@ static void uninit(int immed) {
|
||||
/**
|
||||
* \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 @@ static void reset() {
|
||||
/**
|
||||
* \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 @@ static int play(void *data, int len, int flags) {
|
||||
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) {
|
||||
|
@ -98,7 +98,7 @@ static ao_macosx_t *ao = NULL;
|
||||
* 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 @@ static int buf_free() {
|
||||
* 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 @@ static int play(void* output_samples,int num_bytes,int flags)
|
||||
}
|
||||
|
||||
/* set variables and buffer to initial state */
|
||||
static void reset()
|
||||
static void reset(void)
|
||||
{
|
||||
audio_pause();
|
||||
/* reset ring-buffer state */
|
||||
@ -359,14 +359,14 @@ static void reset()
|
||||
|
||||
|
||||
/* 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 @@ static void uninit(int immed)
|
||||
|
||||
|
||||
/* stop playing, keep buffers (for pause) */
|
||||
static void audio_pause()
|
||||
static void audio_pause(void)
|
||||
{
|
||||
OSErr status=noErr;
|
||||
|
||||
@ -406,7 +406,7 @@ static void audio_pause()
|
||||
|
||||
|
||||
/* resume playing, after audio_pause() */
|
||||
static void audio_resume()
|
||||
static void audio_resume(void)
|
||||
{
|
||||
OSErr status=noErr;
|
||||
|
||||
|
@ -197,19 +197,19 @@ static int play(void* data, int len, int flags) {
|
||||
}
|
||||
|
||||
/** 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));
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ static void uninit(int immed) {
|
||||
}
|
||||
|
||||
// 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 @@ static void reset() {
|
||||
}
|
||||
|
||||
// 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 @@ static int play(void* data, int len, int flags) {
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
|
@ -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 = getenv("AUDIODEV")) == NULL)
|
||||
@ -621,7 +621,7 @@ static void uninit(int immed){
|
||||
}
|
||||
|
||||
// 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 @@ static void reset(){
|
||||
}
|
||||
|
||||
// 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 @@ static void audio_pause()
|
||||
}
|
||||
|
||||
// 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 @@ static void audio_resume()
|
||||
|
||||
|
||||
// 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 @@ static int play(void* data,int len,int flags){
|
||||
|
||||
|
||||
// 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__)
|
||||
|
@ -254,7 +254,7 @@ static void uninit(int immed)
|
||||
}
|
||||
|
||||
// stop playing and empty buffers (for seeking/pause)
|
||||
static void reset()
|
||||
static void reset(void)
|
||||
{
|
||||
waveOutReset(hWaveOut);
|
||||
buf_write=0;
|
||||
@ -264,19 +264,19 @@ static void reset()
|
||||
}
|
||||
|
||||
// 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 @@ static int play(void* data,int len,int flags)
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user