simpleaudio: read returns ssize_t to allow for -1

This commit is contained in:
Kamal Mostafa 2011-06-07 16:31:26 -07:00
parent 35121ab63c
commit 188b899bb0
5 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@
*/ */
static size_t static ssize_t
sa_pulse_read( simpleaudio *sa, float *buf, size_t nframes ) sa_pulse_read( simpleaudio *sa, float *buf, size_t nframes )
{ {
int error; int error;

View File

@ -14,7 +14,7 @@
*/ */
static size_t static ssize_t
sa_sndfile_read( simpleaudio *sa, float *buf, size_t nframes ) sa_sndfile_read( simpleaudio *sa, float *buf, size_t nframes )
{ {
SNDFILE *s = (SNDFILE *)sa->backend_handle; SNDFILE *s = (SNDFILE *)sa->backend_handle;

View File

@ -14,7 +14,7 @@ simpleaudio_get_channels( simpleaudio *sa )
return sa->channels; return sa->channels;
} }
size_t ssize_t
simpleaudio_read( simpleaudio *sa, float *buf, size_t nframes ) simpleaudio_read( simpleaudio *sa, float *buf, size_t nframes )
{ {
return sa->backend->simpleaudio_read(sa, buf, nframes); return sa->backend->simpleaudio_read(sa, buf, nframes);

View File

@ -30,7 +30,7 @@ simpleaudio_get_rate( simpleaudio *sa );
unsigned int unsigned int
simpleaudio_get_channels( simpleaudio *sa ); simpleaudio_get_channels( simpleaudio *sa );
size_t ssize_t
simpleaudio_read( simpleaudio *sa, float *buf, size_t nframes ); simpleaudio_read( simpleaudio *sa, float *buf, size_t nframes );
void void

View File

@ -21,7 +21,7 @@ struct simpleaudio {
}; };
struct simpleaudio_backend { struct simpleaudio_backend {
size_t ssize_t
(*simpleaudio_read)( simpleaudio *sa, float *buf, size_t nframes ); (*simpleaudio_read)( simpleaudio *sa, float *buf, size_t nframes );
void void
(*simpleaudio_close)( simpleaudio *sa ); (*simpleaudio_close)( simpleaudio *sa );