Mercurial > mplayer.hg
comparison libao2/ao_nas.c @ 17566:f580a7755ac5
Patch by Stefan Huehner / stefan % huehner ! org \
patch replaces '()' for the correct '(void)' in function
declarations/prototypes which have no parameters. The '()' syntax tell
thats there is a variable list of arguments, so that the compiler cannot
check this. The extra CFLAG '-Wstrict-declarations' shows those cases.
Comments about a similar patch applied to ffmpeg:
That in C++ these mean the same, but in ANSI C the semantics are
different; function() is an (obsolete) K&R C style forward declaration,
it basically means that the function can have any number and any types
of parameters, effectively completely preventing the compiler from doing
any sort of type checking. -- Erik Slagter
Defining functions with unspecified arguments is allowed but bad.
With arguments unspecified the compiler can't report an error/warning
if the function is called with incorrect arguments. -- M\ns Rullg\rd
author | rathann |
---|---|
date | Thu, 09 Feb 2006 14:08:03 +0000 |
parents | 2beb7a7cdac1 |
children | 24ae1f262dc2 |
comparison
equal
deleted
inserted
replaced
17565:dc65faaadb04 | 17566:f580a7755ac5 |
---|---|
504 free(nas_data->client_buffer); | 504 free(nas_data->client_buffer); |
505 free(nas_data->server_buffer); | 505 free(nas_data->server_buffer); |
506 } | 506 } |
507 | 507 |
508 // stop playing and empty buffers (for seeking/pause) | 508 // stop playing and empty buffers (for seeking/pause) |
509 static void reset(){ | 509 static void reset(void){ |
510 AuStatus as; | 510 AuStatus as; |
511 | 511 |
512 mp_msg(MSGT_AO, MSGL_DBG3, "ao_nas: reset()\n"); | 512 mp_msg(MSGT_AO, MSGL_DBG3, "ao_nas: reset()\n"); |
513 | 513 |
514 pthread_mutex_lock(&nas_data->buffer_mutex); | 514 pthread_mutex_lock(&nas_data->buffer_mutex); |
521 usleep(1000); | 521 usleep(1000); |
522 } | 522 } |
523 } | 523 } |
524 | 524 |
525 // stop playing, keep buffers (for pause) | 525 // stop playing, keep buffers (for pause) |
526 static void audio_pause() | 526 static void audio_pause(void) |
527 { | 527 { |
528 AuStatus as; | 528 AuStatus as; |
529 mp_msg(MSGT_AO, MSGL_DBG3, "ao_nas: audio_pause()\n"); | 529 mp_msg(MSGT_AO, MSGL_DBG3, "ao_nas: audio_pause()\n"); |
530 | 530 |
531 AuStopFlow(nas_data->aud, nas_data->flow, &as); | 531 AuStopFlow(nas_data->aud, nas_data->flow, &as); |
532 } | 532 } |
533 | 533 |
534 // resume playing, after audio_pause() | 534 // resume playing, after audio_pause() |
535 static void audio_resume() | 535 static void audio_resume(void) |
536 { | 536 { |
537 AuStatus as; | 537 AuStatus as; |
538 | 538 |
539 mp_msg(MSGT_AO, MSGL_DBG3, "ao_nas: audio_resume()\n"); | 539 mp_msg(MSGT_AO, MSGL_DBG3, "ao_nas: audio_resume()\n"); |
540 | 540 |
544 "play(): AuStartFlow", as); | 544 "play(): AuStartFlow", as); |
545 } | 545 } |
546 | 546 |
547 | 547 |
548 // return: how many bytes can be played without blocking | 548 // return: how many bytes can be played without blocking |
549 static int get_space() | 549 static int get_space(void) |
550 { | 550 { |
551 int result; | 551 int result; |
552 | 552 |
553 mp_msg(MSGT_AO, MSGL_DBG3, "ao_nas: get_space()\n"); | 553 mp_msg(MSGT_AO, MSGL_DBG3, "ao_nas: get_space()\n"); |
554 | 554 |
595 | 595 |
596 return writelen; | 596 return writelen; |
597 } | 597 } |
598 | 598 |
599 // return: delay in seconds between first and last sample in buffer | 599 // return: delay in seconds between first and last sample in buffer |
600 static float get_delay() | 600 static float get_delay(void) |
601 { | 601 { |
602 float result; | 602 float result; |
603 | 603 |
604 mp_msg(MSGT_AO, MSGL_DBG3, "ao_nas: get_delay()\n"); | 604 mp_msg(MSGT_AO, MSGL_DBG3, "ao_nas: get_delay()\n"); |
605 | 605 |