simpleaudio: read returns ssize_t to allow for -1
This commit is contained in:
parent
35121ab63c
commit
188b899bb0
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 );
|
||||||
|
|
Loading…
Reference in New Issue